/* ============================================================
   Sidebar Neo Gaming – Complete Theme CSS
   Neon Purple/Cyan cyber gaming aesthetic.
   ============================================================ */

/* === CUSTOM PROPERTIES === */
:root {
    --color-primary: #a855f7;
    --color-primary-hover: #c084fc;
    --color-primary-dark: #7c3aed;
    --color-secondary: #22d3ee;
    --color-accent: #f97316;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;

    --bg-body: #080810;
    --bg-surface: #0d0d1a;
    --bg-card: #151526;
    --bg-card-hover: #1e1e38;
    --bg-input: #12122a;
    --bg-header: rgba(8, 8, 16, 0.97);
    --bg-overlay: rgba(0, 0, 0, 0.75);

    --text-primary: #eee8ff;
    --text-secondary: #9ca0b8;
    --text-muted: #64687f;
    --text-link: #a855f7;

    --border-color: rgba(168, 85, 247, 0.12);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-focus: #a855f7;

    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
    --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.3);
    --shadow-glow-intense: 0 0 60px rgba(168, 85, 247, 0.5);
    --shadow-neon-cyan: 0 0 30px rgba(34, 211, 238, 0.3);

    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-display: 'Orbitron', 'Inter', sans-serif;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;

    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    --header-height: 60px;
    --sidebar-width: 250px;
    --max-width: 1400px;
    --game-card-width: 200px;

    --z-dropdown: 100;
    --z-sticky: 200;
    --z-header: 300;
    --z-overlay: 400;
    --z-modal: 500;
    --z-toast: 600;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); background: var(--bg-body); color: var(--text-primary); line-height: 1.6; min-height: 100vh; overflow-x: hidden; }
body::before { content:''; position:fixed; inset:0; background: radial-gradient(ellipse at 15% 10%, rgba(168,85,247,0.06) 0%, transparent 50%), radial-gradient(ellipse at 85% 90%, rgba(34,211,238,0.04) 0%, transparent 50%); pointer-events:none; z-index:-1; }
a { color: var(--text-link); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-primary-hover); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
p { margin-bottom: var(--space-md); }
::selection { background: var(--color-primary); color: white; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--color-primary-dark); border-radius: var(--radius-full); }

/* === CONTAINERS === */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-lg); }

/* === SIDEBAR-LEFT LAYOUT === */
.layout-sidebar-left .layout-wrapper { display: flex; min-height: 100vh; }
.layout-sidebar-left .sidebar-left { width: var(--sidebar-width); background: var(--bg-surface); border-right: 1px solid var(--border-color); position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: var(--z-header); transition: transform var(--transition-normal); }
.layout-sidebar-left .main-area { margin-left: var(--sidebar-width); flex: 1; min-width: 0; }

.sidebar-logo { padding: var(--space-lg); border-bottom: 1px solid var(--border-color); }
.sidebar-logo a { display: flex; align-items: center; gap: var(--space-sm); font-family: var(--font-display); font-weight: 900; font-size: var(--text-lg); text-decoration: none; }
.sidebar-logo a span { background: linear-gradient(135deg, #a855f7, #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; filter: drop-shadow(0 0 10px rgba(168,85,247,0.4)); }
.sidebar-search { padding: var(--space-md) var(--space-lg); }
.sidebar-search input { width: 100%; padding: 8px 12px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-size: var(--text-sm); outline: none; }
.sidebar-search input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(168,85,247,0.2); }
.sidebar-links { padding: var(--space-sm) var(--space-md); }
.sidebar-link { display: flex; align-items: center; gap: var(--space-sm); padding: 9px 12px; border-radius: var(--radius-md); color: var(--text-secondary); font-size: var(--text-sm); font-weight: 500; transition: all var(--transition-fast); text-decoration: none; }
.sidebar-link:hover { background: var(--bg-card); color: var(--text-primary); }
.sidebar-link.active { background: rgba(168,85,247,0.12); color: var(--color-primary); }
.sidebar-link-sm { padding: 5px 12px; font-size: var(--text-xs); justify-content: space-between; }
.sidebar-section-title { padding: var(--space-md) var(--space-lg) var(--space-xs); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); }
.sidebar-categories { max-height: 320px; overflow-y: auto; }

/* Mini Header */
.mini-header { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-lg); height: var(--header-height); background: var(--bg-header); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-color); gap: var(--space-md); }
.sidebar-toggle { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; padding: var(--space-sm); font-size: 1.2rem; }
.mini-search { flex: 1; max-width: 380px; }
.mini-search input { width: 100%; padding: 7px 14px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-full); color: var(--text-primary); font-size: var(--text-sm); outline: none; }
.mini-search input:focus { border-color: var(--color-primary); }
.mini-user { display: flex; align-items: center; gap: var(--space-sm); }
.mini-avatar-img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-primary); }
.xp-badge { padding: 2px 8px; background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 700; color: white; }

.layout-sidebar-left .main-content { max-width: 1100px; margin: 0 auto; padding: var(--space-xl) var(--space-lg); }

.layout-sidebar-left.sidebar-collapsed .sidebar-left { transform: translateX(-100%); }
.layout-sidebar-left.sidebar-collapsed .main-area { margin-left: 0; }

/* === TOPBAR LAYOUT === */
.layout-topbar .site-header { position: sticky; top: 0; z-index: var(--z-header); background: var(--bg-header); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-color); height: var(--header-height); display: flex; align-items: center; }
.layout-topbar .header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-lg); gap: var(--space-lg); }
.layout-topbar .site-logo { font-family: var(--font-display); font-weight: 900; font-size: var(--text-xl); text-decoration: none; }
.layout-topbar .site-logo span { background: linear-gradient(135deg, #a855f7, #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.layout-topbar .header-search { flex: 1; max-width: 500px; position: relative; }
.layout-topbar .header-search input { width: 100%; padding: 9px 16px 9px 40px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-full); color: var(--text-primary); font-size: var(--text-sm); outline: none; }
.layout-topbar .header-search input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(168,85,247,0.2); }
.layout-topbar .header-search .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.layout-topbar .header-nav { display: flex; align-items: center; gap: var(--space-sm); }
.layout-topbar .header-nav a { padding: 7px 12px; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary); transition: all var(--transition-fast); }
.layout-topbar .header-nav a:hover { color: var(--text-primary); background: var(--bg-card); }
.layout-topbar .main-content { padding: var(--space-xl) var(--space-lg); }
.menu-toggle { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; padding: var(--space-sm); font-size: 1.3rem; }

/* === BUTTONS === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm); padding: 9px 18px; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 600; border: none; border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-fast); text-decoration: none; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, #a855f7, #7c3aed); color: white; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow-intense); color: white; }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--color-primary); }
.btn-sm { padding: 5px 10px; font-size: var(--text-xs); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-card); color: var(--text-primary); }
.btn-outline { background: transparent; border: 1px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: white; }

/* === GAME CARDS === */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--game-card-width), 1fr)); gap: var(--space-lg); padding: var(--space-lg) 0; }
.game-card { position: relative; background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-subtle); transition: all var(--transition-normal); cursor: pointer; text-decoration: none; color: inherit; display: block; }
.game-card:hover { transform: translateY(-5px) scale(1.02); border-color: var(--color-primary); box-shadow: var(--shadow-glow-intense); }
.game-card-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-surface); }
.game-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.game-card:hover .game-card-thumb img { transform: scale(1.1); }
.game-card-overlay { position: absolute; inset: 0; background: var(--bg-overlay); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--transition-normal); }
.game-card:hover .game-card-overlay { opacity: 1; }
.play-btn-circle { width: 50px; height: 50px; border-radius: 50%; background: var(--color-primary); display: flex; align-items: center; justify-content: center; color: white; font-size: 1.3rem; box-shadow: var(--shadow-glow); transition: transform var(--transition-fast); }
.game-card:hover .play-btn-circle { transform: scale(1.15); }
.game-badge { position: absolute; top: 8px; left: 8px; padding: 3px 10px; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; z-index: 2; }
.game-badge-featured { background: linear-gradient(135deg, #f59e0b, #ef4444); color: white; }
.game-badge-new { background: var(--color-secondary); color: #080810; }
.game-badge-hot { background: var(--color-danger); color: white; }
.game-card-info { padding: var(--space-md); }
.game-card-title { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); margin-bottom: var(--space-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-sans); }
.game-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: var(--text-xs); color: var(--text-muted); }
.game-card-category { color: var(--color-primary); }
.game-card-plays { display: flex; align-items: center; gap: 3px; }

/* === FEATURED GRID === */
.neo-featured { margin-bottom: var(--space-2xl); }
.featured-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-md); }
.featured-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/9; display: block; border: 1px solid var(--border-subtle); transition: all var(--transition-normal); }
.featured-card img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.featured-card:hover img { transform: scale(1.08); }
.featured-card-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0,0,0,0.85) 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: var(--space-lg); }
.featured-card-title { font-size: var(--text-lg); font-weight: 700; color: white; }
.featured-card-play { font-size: var(--text-sm); color: var(--color-primary); font-weight: 600; margin-top: var(--space-xs); }
.featured-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-glow); }

/* === NEO SECTION === */
.neo-section { margin-bottom: var(--space-2xl); }
.neon-icon { color: var(--color-secondary); filter: drop-shadow(0 0 6px rgba(34,211,238,0.5)); }

/* === SECTION HEADER === */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); }
.section-title { font-size: var(--text-2xl); font-weight: 700; display: flex; align-items: center; gap: var(--space-sm); font-family: var(--font-display); }
.section-link { color: var(--color-primary); font-size: var(--text-sm); font-weight: 500; }

/* === SIDEBAR WIDGETS === */
.sidebar-widget { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-lg); margin-bottom: var(--space-lg); }
.sidebar-widget-title { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-md); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border-color); font-family: var(--font-sans); }
.sidebar-cat-link { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; color: var(--text-secondary); font-size: var(--text-sm); transition: color var(--transition-fast); }
.sidebar-cat-link:hover { color: var(--color-primary); }

/* === GAME PLAYER === */
.game-player-container { background: var(--bg-surface); border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border-color); margin-bottom: var(--space-xl); }
.game-player { aspect-ratio: 16/9; max-height: 80vh; position: relative; background: #000; }
.game-player iframe { width: 100%; height: 100%; border: none; }
.game-player-splash { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%); z-index: 5; cursor: pointer; text-align: center; }
.game-player-splash img { width: 180px; height: 180px; object-fit: cover; border-radius: var(--radius-xl); margin-bottom: var(--space-lg); box-shadow: var(--shadow-glow); }
.splash-play-btn { width: 72px; height: 72px; border-radius: 50%; background: var(--color-primary); display: flex; align-items: center; justify-content: center; color: white; box-shadow: var(--shadow-glow-intense); margin-top: var(--space-md); transition: transform var(--transition-fast); border: none; cursor: pointer; }
.splash-play-btn:hover { transform: scale(1.15); }
.game-player-toolbar { display: flex; align-items: center; justify-content: space-between; padding: var(--space-md) var(--space-lg); background: var(--bg-card); border-top: 1px solid var(--border-color); }
.toolbar-actions { display: flex; gap: var(--space-sm); }
.game-info-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-xl); margin-bottom: var(--space-xl); }
.game-meta-row { display: flex; flex-wrap: wrap; gap: var(--space-lg); font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--space-lg); }
.game-meta-item { display: flex; align-items: center; gap: var(--space-xs); }
.game-description { color: var(--text-secondary); line-height: 1.8; margin-bottom: var(--space-lg); }
.game-tags { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* === BADGES === */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 600; }
.badge-primary { background: rgba(168,85,247,0.15); color: var(--color-primary); }
.badge-sm { font-size: 0.65rem; padding: 1px 6px; }
.tag { display: inline-block; padding: 4px 12px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-full); font-size: var(--text-xs); color: var(--text-secondary); transition: all var(--transition-fast); }
.tag:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* === BREADCRUMB === */
.breadcrumb { display: flex; gap: var(--space-sm); font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-lg); }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .sep { opacity: 0.4; }

/* === FORMS === */
.search-form-inline { max-width: 560px; margin-bottom: var(--space-xl); position: relative; }
.search-form-inline input { width: 100%; padding: 12px 18px 12px 46px; background: var(--bg-input); border: 2px solid var(--border-color); border-radius: var(--radius-full); color: var(--text-primary); font-size: var(--text-lg); outline: none; }
.search-form-inline input:focus { border-color: var(--color-primary); box-shadow: var(--shadow-glow); }
.search-form-inline .search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }

/* === PROFILE === */
.profile-header { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); padding: var(--space-2xl); display: flex; align-items: center; gap: var(--space-xl); margin-bottom: var(--space-xl); }
.profile-avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid var(--color-primary); box-shadow: var(--shadow-glow); }
.profile-info h1 { margin-bottom: var(--space-xs); }
.profile-bio { color: var(--text-secondary); font-size: var(--text-sm); }
.level-badge { display: inline-flex; align-items: center; gap: var(--space-xs); padding: 4px 12px; background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 700; color: white; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); margin-bottom: var(--space-xl); }
.stat-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-lg); text-align: center; }
.stat-number { font-size: var(--text-3xl); font-weight: 800; color: var(--color-primary); font-family: var(--font-display); }
.stat-label { font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-xs); }

/* === EMPTY STATE === */
.empty-state { text-align: center; padding: var(--space-3xl); color: var(--text-muted); }
.empty-state .icon { font-size: 3rem; margin-bottom: var(--space-md); }

/* === PAGE CONTENT === */
.page-content { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-2xl); line-height: 1.8; color: var(--text-secondary); }
.page-content h1, .page-content h2, .page-content h3 { color: var(--text-primary); margin-top: var(--space-xl); margin-bottom: var(--space-md); }

/* === PAGINATION === */
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-xs); margin-top: var(--space-2xl); }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary); background: var(--bg-card); border: 1px solid var(--border-subtle); transition: all var(--transition-fast); text-decoration: none; }
.pagination a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination .active { background: var(--color-primary); border-color: var(--color-primary); color: white; }

/* === FOOTER === */
.site-footer { background: var(--bg-surface); border-top: 1px solid var(--border-color); margin-top: var(--space-3xl); padding: var(--space-2xl) 0 var(--space-xl); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-2xl); max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-lg); }
.footer-about p { color: var(--text-secondary); font-size: var(--text-sm); }
.footer-title { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-md); font-family: var(--font-sans); }
.footer-links a { display: block; padding: 3px 0; color: var(--text-secondary); font-size: var(--text-sm); }
.footer-links a:hover { color: var(--color-primary); }
.footer-bottom { text-align: center; padding-top: var(--space-lg); margin-top: var(--space-lg); border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: var(--text-xs); }

/* === TOAST === */
.toast-container { position: fixed; top: calc(var(--header-height) + var(--space-md)); right: var(--space-lg); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--space-sm); }
.toast { display: flex; align-items: center; gap: var(--space-md); padding: 12px 18px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); min-width: 280px; max-width: 400px; animation: slideIn 0.3s ease; font-size: var(--text-sm); }
.toast-success { border-left: 3px solid var(--color-success); }
.toast-error { border-left: 3px solid var(--color-danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* === NEON EFFECTS === */
.game-card:hover { box-shadow: 0 0 20px rgba(168,85,247,0.25), 0 0 50px rgba(168,85,247,0.1), 0 8px 30px rgba(0,0,0,0.4); }
.section-title::after { content: ''; display: block; width: 50px; height: 2px; background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), transparent); margin-top: var(--space-xs); border-radius: var(--radius-full); }
.main-content { animation: pageIn 0.3s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
*:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .layout-sidebar-left .sidebar-left { transform: translateX(-100%); }
    .layout-sidebar-left .sidebar-left.open { transform: translateX(0); }
    .layout-sidebar-left .main-area { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    :root { --header-height: 54px; --game-card-width: 150px; }
    .layout-topbar .header-search { display: none; }
    .layout-topbar .header-nav { display: none; }
    .menu-toggle { display: block; }
    .footer-grid { grid-template-columns: 1fr; }
    .featured-grid { grid-template-columns: 1fr; }
    .games-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--space-md); }
    .profile-header { flex-direction: column; text-align: center; }
    .profile-stats { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .games-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
    .game-card-info { padding: var(--space-sm); }
}

/* === HEADER AUTH === */
.header-auth { display: flex; align-items: center; gap: var(--space-sm); }
.header-user { gap: var(--space-md); }
.header-avatar { display: flex; align-items: center; }
.header-avatar .avatar-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-primary); transition: border-color var(--transition-fast); }
.header-avatar:hover .avatar-img { border-color: var(--color-secondary); }
.header-username { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); white-space: nowrap; }

/* XP Pill */
.xp-pill { display: flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-full); cursor: default; }
.xp-level { font-size: var(--text-xs); font-weight: 700; color: var(--color-primary); white-space: nowrap; }
.xp-bar { width: 60px; height: 4px; background: var(--bg-input); border-radius: 2px; overflow: hidden; }
.xp-bar-fill { height: 100%; background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)); border-radius: 2px; transition: width 0.5s ease; width: 0; }

/* Notification Bell */
.notif-wrapper { position: relative; }
.notif-bell { background: none; border: none; cursor: pointer; font-size: 1.2rem; padding: 4px; position: relative; color: var(--text-secondary); transition: color var(--transition-fast); }
.notif-bell:hover { color: var(--text-primary); }
.notif-count { position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; background: #ef4444; color: white; font-size: 10px; font-weight: 700; border-radius: 8px; display: flex; align-items: center; justify-content: center; line-height: 1; }
.notif-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 320px; max-height: 400px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-elevated); overflow: hidden; display: none; z-index: 1000; }
.notif-dropdown.open { display: block; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border-color); font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.notif-mark-all { background: none; border: none; color: var(--color-primary); cursor: pointer; font-size: var(--text-xs); font-weight: 500; }
.notif-mark-all:hover { text-decoration: underline; }
.notif-list { max-height: 340px; overflow-y: auto; }
.notification-item { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border-subtle); cursor: pointer; transition: background var(--transition-fast); }
.notification-item:hover { background: var(--bg-input); }
.notification-item.unread { background: rgba(168, 85, 247, 0.06); }
.notification-icon { font-size: 1.2rem; flex-shrink: 0; width: 28px; text-align: center; }
.notification-text { flex: 1; min-width: 0; }
.notification-text p { margin: 0; font-size: var(--text-sm); color: var(--text-primary); line-height: 1.3; }
.notification-time { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.notification-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: var(--text-sm); }

/* Toast styles */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 10000; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 10px 16px; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 500; color: white; opacity: 0; transform: translateX(100%); transition: all 0.3s ease; box-shadow: var(--shadow-elevated); }
.toast.show { opacity: 1; transform: translateX(0); }
.toast.hide { opacity: 0; transform: translateX(100%); }
.toast-success { background: #22c55e; }
.toast-error { background: #ef4444; }
.toast-warning { background: #f59e0b; color: #1a1a2e; }
.toast-info { background: #3b82f6; }
.toast-achievement { background: linear-gradient(135deg, #f59e0b, #d97706); }
.toast-levelup { background: linear-gradient(135deg, #a855f7, #7c3aed); }

/* Logout button */
#logoutBtn { padding: 4px 8px; font-size: var(--text-xs); background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-fast); }
#logoutBtn:hover { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.1); }

/* === PRINT === */
@media print {
    .site-header, .site-footer, .sidebar-left, .sidebar, .mini-header, .toast-container { display: none !important; }
    body { background: white; color: black; }
    .layout-sidebar-left .main-area { margin-left: 0; }
}
