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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #141520;
    color: #e2e8f0;
    min-height: 100vh;
}

/* ── Header ── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(22, 22, 35, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    line-height: 1.15;
    color: #e2e8f0;
}

nav {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

/* ── Language Switcher ── */
.lang-switcher {
    position: relative;
    margin-left: 0.5rem;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.05em;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    z-index: 200;
    min-width: 60px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.lang-switcher.open .lang-dropdown {
    display: flex;
    flex-direction: column;
}

.lang-option {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 5px;
    font-family: inherit;
    text-align: left;
    transition: all 0.15s;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.lang-option.active {
    color: #818cf8;
}

nav a {
    color: #7a8599;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: #fff;
}

nav a.hide-mobile {}  /* marker class */

/* ── Game Count Bar ── */
.section-bar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.2rem 2rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-bar h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── Filter Tabs ── */
.filter-tabs {
    display: flex;
    gap: 0.4rem;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border-color: rgba(255, 255, 255, 0.12);
}

.filter-tab.active {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.3);
}

.filter-tab svg {
    flex-shrink: 0;
}

/* ── Empty Likes ── */
.empty-likes {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 4rem 2rem;
    color: #4a5568;
}

.empty-likes p {
    font-size: 0.9rem;
    font-weight: 500;
}

.game-count {
    font-size: 0.85rem;
    color: #64748b;
}

/* ── Game Grid ── */
.game-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    padding: 0 2rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ── Game Card ── */
.game-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #1a1a2e;
}

.card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.game-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.game-card:hover .card-thumb {
    transform: scale(1.08);
}

/* Card sizes */
.game-card.featured {
    grid-column: span 2;
    grid-row: span 2;
}

.game-card.wide {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

/* Badge */
.badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    z-index: 3;
    text-transform: uppercase;
}

.card-name {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: rgba(37, 99, 235, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 6px;
    text-align: center;
    z-index: 2;
    letter-spacing: 0.02em;
    pointer-events: none;
    white-space: nowrap;
}

.badge.new {
    background: #dc2626;
    color: #fff;
}

.badge.hot {
    background: #f97316;
    color: #fff;
}

.badge.updated {
    background: #2563eb;
    color: #fff;
}

/* ── Like Button (card) ── */
.like-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    color: rgba(255, 255, 255, 0.7);
    padding: 0;
}

.like-btn:hover {
    transform: scale(1.15);
    background: rgba(0, 0, 0, 0.6);
    color: #ef4444;
}

.like-btn:hover .heart-icon {
    stroke: #ef4444;
}

.like-btn.liked {
    color: #ef4444;
}

.like-btn.liked .heart-icon {
    fill: #ef4444;
    stroke: #ef4444;
}

.like-btn .heart-icon {
    pointer-events: none;
    transition: fill 0.2s, stroke 0.2s;
}

/* ── Footer ── */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 1rem;
    padding: 3rem 2rem 2rem;
    background: #0e0e18;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand .tagline {
    color: #4a5568;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.footer-brand .copyright {
    color: #374151;
    margin-top: 0.3rem;
    font-size: 0.8rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col h3 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-col a {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #e2e8f0;
}

.footer-bottom {
    max-width: 1400px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    text-align: center;
    color: #374151;
    font-size: 0.8rem;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .game-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 850px) {
    .game-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 0 1rem 2rem;
    }

    nav {
        gap: 0.8rem;
    }

    nav a {
        font-size: 0.78rem;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 0 0.6rem 2rem;
    }

    .game-card.featured {
        grid-column: span 2;
        grid-row: span 2;
    }

    .game-card.wide {
        grid-column: span 2;
    }

    .header-inner {
        padding: 0.6rem 0.8rem;
    }

    .logo-icon { font-size: 1.4rem; }
    .logo-text { font-size: 0.65rem; letter-spacing: 0.12em; }

    nav {
        gap: 0.6rem;
    }

    nav a {
        font-size: 0.72rem;
    }

    nav a.hide-mobile {
        display: none;
    }

    .lang-btn {
        padding: 3px 7px;
        font-size: 0.68rem;
    }

    .section-bar {
        padding: 0.7rem 0.8rem 0.5rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .filter-tab {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }

    .game-count {
        font-size: 0.75rem;
    }

    .card-name {
        font-size: 0.6rem;
        padding: 3px 8px;
        bottom: 5px;
    }

    .badge {
        font-size: 0.55rem;
        padding: 1px 5px;
        top: 5px;
        right: 5px;
    }

    .like-btn {
        width: 28px;
        height: 28px;
        top: 5px;
        left: 5px;
    }

    .like-btn .heart-icon {
        width: 13px;
        height: 13px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    footer {
        padding: 2rem 1rem 1.5rem;
    }

    .footer-col h3 { font-size: 0.78rem; }
    .footer-col a { font-size: 0.8rem; }
    .footer-bottom { font-size: 0.7rem; }

    .empty-likes {
        padding: 2rem 1rem;
    }
}

@media (max-width: 400px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        padding: 0 0.5rem 1.5rem;
    }

    .header-inner {
        padding: 0.5rem 0.6rem;
    }

    nav a { font-size: 0.65rem; }
    nav { gap: 0.5rem; }

    .section-bar {
        padding: 0.6rem 0.6rem 0.4rem;
    }

    .filter-tab {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .card-name {
        font-size: 0.55rem;
        padding: 2px 6px;
    }
}
