:root {
    /* Vibrant Dark Mode Palette */
    --bg-base: #09090b;
    --surface-mica: rgba(24, 24, 27, 0.75);
    --surface-solid: #18181b;
    --surface-hover: #27272a;
    --surface-active: #3f3f46;
    --surface-card: #1f1f22;
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.12);
    
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-disabled: #52525b;
    
    --accent-base: #6366f1; /* Premium Indigo */
    --accent-hover: #818cf8;
    
    --radius-window: 16px;
    --radius-card: 12px;
    --radius-control: 8px;
    
    --shadow-flyout: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-window: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    
    --transition-fluent: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Utilities */
.text-center { text-align: center; }
.mb-5 { margin-bottom: 3rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Premium Controls */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--accent-base) 0%, #a855f7 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-control);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px -3px rgba(99, 102, 241, 0.4);
    transition: all var(--transition-fluent);
    cursor: pointer;
}
.btn-primary:hover {
    box-shadow: 0 8px 20px -4px rgba(99, 102, 241, 0.6);
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--surface-solid);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-control);
    font-size: 0.9rem;
    text-decoration: none;
    transition: background var(--transition-fluent), border-color var(--transition-fluent);
}
.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
}

/* Navbar / Header */
.navbar {
    background: rgba(9, 9, 11, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: padding 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.navbar.is-scrolled {
    padding: 10px 0;
    border-bottom-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.8);
    background: rgba(5, 5, 5, 0.85);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-actions {
    display: none;
}

.mobile-menu-toggle {
    display: none;
}

.mobile-search-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
}

.nav-menu-wrapper {
    display: flex;
    flex: 1;
    justify-content: space-between;
    align-items: center;
}

.mobile-drawer-overlay, .drawer-header, .mobile-only {
    display: none;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo img {
    height: 32px;
    display: block;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-btn {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-control);
    transition: all var(--transition-fluent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    color: #fff;
    background: var(--surface-hover);
}

.nav-btn svg {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border-strong);
    margin: 0 4px;
}

.nav-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.search-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-control);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 280px;
    color: var(--text-disabled);
    transition: all 0.3s ease;
}

.search-form:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-base);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.search-form input,
.search-form input:focus,
.search-form input:focus-visible,
.search-form input:active {
    background: transparent !important;
    border: none !important;
    color: var(--text-primary);
    font-size: 0.95rem;
    width: 100%;
    outline: none !important;
    box-shadow: none !important;
    font-family: inherit;
    padding: 0;
}

.search-form input::placeholder {
    color: var(--text-disabled);
}

.user-btn {
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Layout Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Hero Section */
.hero {
    padding: 60px 0;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--surface-solid) 0%, transparent 100%);
    border-radius: var(--radius-window);
    border: 1px solid var(--border-subtle);
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
}

/* Typography Headings */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.section-icon {
    color: var(--accent-base);
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

/* Fluent Game Card */
.game-card {
    background: var(--surface-solid);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-window);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    position: relative;
}

.game-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0);
    transition: box-shadow 0.3s ease;
    pointer-events: none;
}

.game-card:hover {
    background: var(--surface-hover);
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.6);
    border-color: rgba(99, 102, 241, 0.4);
}

.game-card:hover::after {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2) inset;
}

.game-card:active {
    transform: scale(0.96) translateY(-2px);
}

.game-thumbnail {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-bottom: 1px solid var(--border-subtle);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.game-card:hover .game-thumbnail {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.game-play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.game-play-btn {
    width: 48px;
    height: 48px;
    background: var(--accent-base);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8) translateY(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.6);
}

.game-play-btn svg {
    width: 24px;
    height: 24px;
    margin-left: 2px; /* optical center adjustment for play triangle */
}

.game-card:hover .game-play-overlay {
    opacity: 1;
}

.game-card:hover .game-play-btn {
    transform: scale(1) translateY(0);
}

.game-info {
    padding: 12px 16px;
}

.game-title {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.game-category {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.game-rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #facc15;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 2px;
}
.game-rating svg { width: 12px; height: 12px; }

/* Sort / filter bar (category, search) */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.sort-bar-count { color: var(--text-secondary); font-size: 0.9rem; }
.sort-bar-controls { display: flex; align-items: center; gap: 10px; }
.sort-bar-controls label { color: var(--text-secondary); font-size: 0.85rem; }
.sort-bar-controls select {
    background: var(--surface-solid);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-control);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}
.sort-bar-controls select:focus-visible { outline: 2px solid var(--accent-base); outline-offset: 2px; }

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 8px;
    margin-bottom: 48px;
}
.pagination-status { color: var(--text-secondary); font-size: 0.9rem; }

.badge-hot {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}
.badge-hot svg { width: 11px; height: 11px; }

/* Scroll-reveal (applied via JS in views/layout/main.php) */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.reveal-in {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* Visible keyboard-focus states — hover alone isn't enough for a11y */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.game-card:focus-visible,
.tag-pill:focus-visible,
.cat-pill:focus-visible {
    outline: 2px solid var(--accent-base);
    outline-offset: 2px;
    border-radius: var(--radius-control);
}

/* Play Page - Window Style */
.player-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 1024px) {
    .player-container {
        grid-template-columns: 1fr 300px;
    }
}

.player-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.game-window {
    background: #000000;
    border-radius: var(--radius-window);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-window);
    overflow: hidden;
    aspect-ratio: 16/9;
    width: 100%;
    position: relative;
}

.game-window iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .game-window {
        aspect-ratio: auto;
        height: 65vh;
        min-height: 400px;
    }
}

.game-details-card {
    background: var(--surface-solid);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-window);
    padding: 24px;
}

.player-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Share menu */
.share-menu { position: relative; }
.share-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-flyout);
    padding: 6px;
    z-index: 30;
    flex-direction: column;
    gap: 2px;
}
.share-dropdown.open { display: flex; }
.share-dropdown a,
.share-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border-radius: var(--radius-control);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.share-dropdown a:hover,
.share-dropdown button:hover { background: var(--surface-hover); }

/* Star rating widget */
.star-input { display: inline-flex; gap: 2px; vertical-align: middle; cursor: pointer; }
.star-input .star { color: var(--text-disabled); transition: color 0.15s ease, transform 0.15s ease; }
.star-input .star:hover { transform: scale(1.15); }
.star-input .star.filled { color: #facc15; }

/* Comments */
.comments-section { margin-top: 48px; padding-top: 8px; }
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 32px;
}
.comment-form textarea {
    width: 100%;
    background: var(--surface-solid);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-control);
    color: var(--text-primary);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}
.comment-list { display: flex; flex-direction: column; gap: 20px; }
.comment { display: flex; gap: 14px; }
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-base);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.comment-body { flex: 1; background: var(--surface-solid); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); padding: 14px 16px; }
.comment-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.comment-meta strong { font-size: 0.9rem; }
.comment-meta span { color: var(--text-disabled); font-size: 0.78rem; }
.comment-body p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; }

.game-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.meta-item svg {
    width: 16px;
    height: 16px;
}

.game-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: var(--surface-solid);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fluent);
}
.tag-pill:hover {
    background: var(--surface-hover);
    border-color: var(--accent-base);
    color: var(--accent-base);
}

/* Sidebar & Ads */
.sidebar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.sidebar-grid .game-thumbnail {
    aspect-ratio: 1/1;
}
.sidebar-grid .game-info {
    padding: 8px 10px;
}
.sidebar-grid .game-title {
    font-size: 0.85rem;
}

.ad-slot {
    background: var(--surface-solid);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-window);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-disabled);
    font-size: 0.85rem;
}
.ad-sidebar {
    height: 250px;
    margin-bottom: 24px;
}
.ad-footer {
    height: 90px;
    margin-top: 40px;
}

/* Blog Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.blog-card-img {
    height: 180px;
    width: 100%;
    object-fit: cover;
    border-bottom: 1px solid var(--border-subtle);
}

.blog-card-info {
    padding: 20px;
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-card-date {
    color: var(--text-disabled);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 12px;
}

.blog-post-container {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post-header {
    margin-bottom: 32px;
}

.blog-post-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.blog-post-img {
    width: 100%;
    border-radius: var(--radius-window);
    border: 1px solid var(--border-subtle);
    margin-bottom: 32px;
}

.blog-post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.blog-post-content p {
    margin-bottom: 20px;
}

/* Empty State / 404 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface-solid);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-window);
}

.empty-icon {
    color: var(--text-disabled);
    margin-bottom: 16px;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 40px 0 16px;
    margin-top: 60px;
    background: linear-gradient(to bottom, var(--surface-bg) 0%, #050505 100%);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-base), transparent);
    opacity: 0.3;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 30px;
    margin-bottom: 24px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.footer-brand-logo img {
    height: 48px;
    width: auto;
}

.footer-desc {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
    max-width: 350px;
}

.footer-col { border: none; }
.footer-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    list-style: none;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer-title::-webkit-details-marker { display: none; }
.footer-title::after {
    content: "";
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    display: inline-block;
}

.footer-list a:hover {
    color: var(--accent-base);
    transform: translateX(4px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-disabled);
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom-text {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.footer-bottom-links a {
    color: var(--text-disabled);
    text-decoration: none;
}
.footer-bottom-links a:hover { color: var(--accent-base); }
.footer-bottom-dot { color: var(--border-strong); }

.footer-socials {
    display: flex;
    gap: 8px;
}

.footer-socials a {
    color: var(--text-secondary);
    background: var(--surface-solid);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-subtle);
}

.footer-socials a:hover {
    color: var(--accent-base);
    border-color: var(--accent-base);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(114, 137, 218, 0.2);
}

/* -------------------------------------
   MOBILE RESPONSIVENESS
-------------------------------------- */
@media (max-width: 768px) {
    /* Mobile Search Dropdown */
    .mobile-search-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--surface-solid);
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-subtle);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 999;
        display: none;
    }
    .mobile-search-dropdown.active {
        display: block !important;
    }
    .mobile-search-dropdown .search-form {
        background: rgba(255,255,255,0.05);
        border: 1px solid var(--border-strong);
    }

    /* Navbar Drawer */
    .nav-container {
        position: relative;
        flex-wrap: wrap;
        padding: 12px 16px;
    }
    .mobile-nav-actions {
        display: flex !important;
        align-items: center;
        gap: 16px;
    }
    .mobile-menu-toggle {
        display: flex !important;
        background: transparent;
        border: none;
        color: var(--text-primary);
        cursor: pointer;
        padding: 4px;
        align-items: center;
        justify-content: center;
    }
    .mobile-search-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .footer {
        padding: 20px 0 16px;
        margin-top: 40px;
    }
    
    .nav-menu-wrapper {
        position: fixed;
        top: 0;
        right: -320px;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: var(--bg-base);
        z-index: 1001;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 24px;
        gap: 24px;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -4px 0 24px rgba(0,0,0,0.5);
        overflow-y: auto;
    }
    .nav-menu-wrapper.active {
        right: 0;
    }
    
    .mobile-drawer-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(4px);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    .mobile-drawer-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-only {
        display: flex !important;
    }
    
    .drawer-header {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border-subtle);
    }
    .drawer-title {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--text-primary);
    }
    .drawer-close {
        background: transparent;
        border: none;
        color: var(--text-secondary);
        cursor: pointer;
        padding: 4px;
    }
    
    .nav-links, .nav-right {
        display: flex !important; /* override the display:none from before */
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-top: 0;
    }
    .nav-divider {
        display: none;
    }
    .nav-btn {
        width: 100%;
    }

    /* Search Bar */
    .nav-right > div {
        width: 100% !important;
    }

    /* Hero Resizing - Handled in home.php natively */

    /* Footer Resizing */
    .footer-top {
        grid-template-columns: 1fr;
        gap: 0;
        text-align: center;
    }
    .footer-brand {
        align-items: center;
        margin-bottom: 28px;
    }
    .footer-bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    .footer-bottom-text {
        justify-content: center;
    }
    .footer-bottom-links {
        justify-content: center;
    }

    /* Footer columns become tap-to-collapse accordions on mobile — they
       start open (same content as desktop, no JS/FOUC needed to decide),
       but can be tapped shut so the footer doesn't have to stay long. */
    .footer-col {
        text-align: left;
        border-top: 1px solid var(--border-subtle);
        padding: 16px 0;
    }
    .footer-col[open] { padding-bottom: 18px; }
    .footer-title {
        cursor: pointer;
        margin-bottom: 0;
    }
    .footer-col[open] .footer-title { margin-bottom: 14px; }
    .footer-title::after {
        content: "";
        width: 9px;
        height: 9px;
        border-right: 2px solid var(--text-disabled);
        border-bottom: 2px solid var(--text-disabled);
        transform: rotate(45deg);
        transition: transform 0.2s ease;
        flex-shrink: 0;
    }
    .footer-col[open] .footer-title::after {
        transform: rotate(-135deg);
    }
    .footer-socials {
        justify-content: flex-start;
    }

    /* Game Grid adjustment */
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    .game-title {
        font-size: 0.85rem;
    }

    /* Player Container */
    .player-title {
        font-size: 1.3rem;
    }
    .game-window {
        aspect-ratio: auto;
        height: 60vh; /* responsive height instead of strict ratio on mobile */
    }
    .game-window.fullscreen-mode {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        height: 100vh !important;
        width: 100vw !important;
        z-index: 9999;
        border-radius: 0;
    }
}

/* AJAX Search Results */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 300px;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    margin-top: 8px;
    box-shadow: var(--shadow-flyout);
    z-index: 1000;
    overflow: hidden;
}
.search-results-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 768px) {
    .search-results-dropdown {
        position: static;
        width: 100%;
        margin-top: 4px;
        box-shadow: none;
        border: none;
        background: rgba(0,0,0,0.2);
    }
    .search-results-content {
        max-height: 250px;
    }
}

/* =========================================
   Scroll to Top
   ========================================= */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--surface-card);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.scroll-to-top .arrow-icon {
    color: var(--text-primary);
    z-index: 2;
    transition: color 0.3s;
}

.scroll-to-top:hover .arrow-icon {
    color: var(--accent-base);
}

.progress-circle {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: var(--border-subtle);
    stroke-width: 4;
}

.progress-bar {
    fill: none;
    stroke: var(--accent-base);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s ease;
}
