/* ===== FONTS ===== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #30d5c8;
    --primary-dark: #1fb8ac;
    --accent: #6c63ff;
    --bg-dark: #0b0f19;
    --bg-card: #121829;
    --bg-card-hover: #1a2236;
    --text: #e4e6ef;
    --text-muted: #8a8fa8;
    --gradient: linear-gradient(135deg, #30d5c8 0%, #6c63ff 100%);
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    display: flex;
    flex-direction: column;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.25s ease;
}
a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== LAYOUT ===== */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ===== HEADER / NAV ===== */
header {
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    max-width: 180px;
    transition: transform 0.3s ease;
}
.logo:hover {
    transform: scale(1.05);
}

.nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 6px 0;
    position: relative;
    transition: color 0.25s ease;
}
.nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.nav ul li a:hover,
.nav ul li a.active {
    color: #fff;
}
.nav ul li a:hover::after,
.nav ul li a.active::after {
    width: 100%;
}

.nav-instagram {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gradient);
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.nav-instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
    color: #fff !important;
}
.nav-instagram::after {
    display: none !important;
}
.nav-instagram svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ===== HERO ===== */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(48, 213, 200, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 20px;
}
.hero h1 .gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 24px rgba(48, 213, 200, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 8px 32px rgba(48, 213, 200, 0.45);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid rgba(255, 255, 255, 0.15);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(48, 213, 200, 0.15);
}

/* ===== SECTION ===== */
.section {
    padding: 80px 0;
}
.section-alt {
    background: rgba(18, 24, 41, 0.5);
}

.section-title {
    text-align: center;
    margin-bottom: 56px;
}
.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    background: rgba(48, 213, 200, 0.1);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
}

/* ===== TECH STACK GRID ===== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.tech-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 36px 28px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.tech-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(48, 213, 200, 0.2);
}

.tech-card .tech-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    background: rgba(48, 213, 200, 0.1);
    color: var(--primary);
}
.tech-card .tech-icon.purple {
    background: rgba(108, 99, 255, 0.1);
    color: var(--accent);
}
.tech-card .tech-icon.orange {
    background: rgba(255, 159, 67, 0.1);
    color: #ff9f43;
}

.tech-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.tech-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== PROJECT CARDS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.project-card .project-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.project-card .project-body {
    padding: 28px;
}

.project-card .project-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 14px;
}
.project-badge.released {
    background: rgba(48, 213, 200, 0.15);
    color: var(--primary);
}
.project-badge.upcoming {
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent);
}

.project-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.project-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 18px;
}

.project-card .project-tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.project-card .project-tech span {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
}
.project-link:hover {
    color: var(--accent);
}
.project-link svg {
    width: 16px;
    height: 16px;
}

/* ===== FEATURES (game page) ===== */
.features-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.feature {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.feature img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.feature.portrait img {
    aspect-ratio: 9/16;
    object-fit: contain;
    background: #0b0f19;
    max-height: 420px;
}

.feature .feature-body {
    padding: 24px;
}

.feature h2, .feature h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== ABOUT SECTION ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.about-text h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 20px;
}
.about-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 16px;
    line-height: 1.8;
}
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== PRIVACY PAGE ===== */
.privacy-section {
    padding: 60px 0 80px;
}
.privacy-section h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 32px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.privacy-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 12px;
    color: #fff;
}
.privacy-section p,
.privacy-section ul {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 14px;
}
.privacy-section ul {
    padding-left: 24px;
}
.privacy-section ul li {
    margin-bottom: 8px;
}
.privacy-section a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.privacy-section a:hover {
    color: var(--accent);
}

/* ===== CONTACT PAGE ===== */
.contact-hero {
    padding: 80px 0;
    text-align: center;
}
.contact-hero h2 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 16px;
}
.contact-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 40px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}
.contact-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}
.contact-card .contact-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
    background: rgba(48, 213, 200, 0.1);
    color: var(--primary);
}
.contact-card .contact-icon.purple {
    background: rgba(108, 99, 255, 0.1);
    color: var(--accent);
}
.contact-card h3 {
    font-weight: 700;
    margin-bottom: 8px;
}
.contact-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== FOOTER ===== */
footer {
    background: rgba(11, 15, 25, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 40px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}
.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.25s ease;
}
.footer-links a:hover {
    color: #fff;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.footer-social a:hover {
    background: var(--gradient);
    color: #fff;
    transform: translateY(-2px);
}
.footer-social a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ===== GAME PAGE HERO ===== */
.game-hero {
    padding: 80px 0 40px;
    text-align: center;
}
.game-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 16px;
}
.game-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.game-links {
    margin-top: 40px;
}
.game-links h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.game-links ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.game-links ul li a {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.25s ease;
}
.game-links ul li a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}
.animate-in.delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-in.delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-in.delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-in.delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 16px;
    }
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .hero {
        padding: 60px 0 50px;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero .subtitle {
        font-size: 1rem;
    }
    .section {
        padding: 50px 0;
    }
    .section-title h2 {
        font-size: 1.7rem;
    }
    .about-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .features-container {
        grid-template-columns: 1fr;
    }
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    .game-hero h1 {
        font-size: 2rem;
    }
    .contact-hero h2 {
        font-size: 1.8rem;
    }
    .game-links ul {
        justify-content: center;
    }
}

/* ===== COOKIE BANNER ===== */
#cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    opacity: 0;
    width: calc(100% - 48px);
    max-width: 720px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}
#cookie-banner.cb-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
#cookie-banner .cb-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    flex-wrap: wrap;
}
#cookie-banner .cb-text {
    flex: 1;
    min-width: 200px;
}
#cookie-banner .cb-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
#cookie-banner .cb-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}
#cookie-banner .cb-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
#cookie-banner .cb-btn {
    padding: 9px 22px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}
#cookie-banner .cb-btn:hover {
    transform: translateY(-1px);
}
#cookie-banner .cb-decline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
#cookie-banner .cb-decline:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}
#cookie-banner .cb-accept {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(48, 213, 200, 0.3);
}
#cookie-banner .cb-accept:hover {
    box-shadow: 0 6px 24px rgba(48, 213, 200, 0.45);
}
@media (max-width: 480px) {
    #cookie-banner .cb-inner {
        flex-direction: column;
        align-items: stretch;
    }
    #cookie-banner .cb-actions {
        justify-content: stretch;
    }
    #cookie-banner .cb-btn {
        flex: 1;
        text-align: center;
    }
}

/* ===== HAMBURGER NAV (mobile) ===== */
.nav-toggle-input { display: none; }
.nav-toggle-label { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.nav-toggle-label span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }

@media (max-width: 768px) {
    .nav-toggle-label { display: flex; }
    .nav { display: none; width: 100%; order: 3; }
    .nav-toggle-input:checked ~ .nav { display: block; }
    .nav ul { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 0; }
    .header-inner { flex-wrap: wrap; }
    .nav-toggle-input:checked + .nav-toggle-label span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-toggle-input:checked + .nav-toggle-label span:nth-child(2) { opacity: 0; }
    .nav-toggle-input:checked + .nav-toggle-label span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}

/* ===== RECENTLY PLAYED ===== */
.recently-played {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 32px;
}
.recently-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.recent-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: border-color 0.25s, color 0.25s;
}
.recent-chip:hover { border-color: var(--primary); color: var(--primary); }

/* ===== GAMES GRID ===== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}
.games-grid-preview {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    margin-bottom: 32px;
}

/* ===== GAME CARD ===== */
.game-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.game-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(48,213,200,0.2);
    color: inherit;
}
.game-card-emoji {
    font-size: 2.4rem;
    padding: 24px 24px 12px;
    line-height: 1;
}
.game-card-body { padding: 0 24px 24px; flex: 1; }
.game-card-category {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    background: rgba(48,213,200,0.1);
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 10px;
}
.game-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.game-card p  { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; }
.game-card-score { font-size: 0.8rem; font-weight: 700; color: var(--primary); }

/* ===== SECTION CTA ===== */
.section-cta { text-align: center; margin-top: 40px; }

/* ===== GAME SHELL ===== */
.game-section { padding: 32px 0 60px; }
.game-container { max-width: 640px; }
.game-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.game-back-btn {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.25s;
    white-space: nowrap;
}
.game-back-btn:hover { color: var(--primary); }
.game-title-wrap { display: flex; align-items: center; gap: 10px; }
.game-title-emoji { font-size: 1.5rem; }
.game-title { font-size: 1.4rem; font-weight: 800; margin: 0; }
.game-best { font-size: 0.9rem; font-weight: 700; color: var(--primary); white-space: nowrap; }

.game-canvas-wrap {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}
.game-canvas-wrap canvas {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
}

.game-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.game-score-wrap { font-size: 1rem; font-weight: 700; color: var(--text-muted); }
.game-score-wrap span { color: #fff; }
.game-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.game-btn { padding: 10px 22px; font-size: 0.88rem; }

.game-status-text {
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 36px;
}

/* ===== MOBILE GAME TOUCH BUTTONS ===== */
.touch-controls {
    display: none;
    grid-template-columns: repeat(3, 52px);
    grid-template-rows: repeat(3, 52px);
    gap: 6px;
    justify-content: center;
    margin-top: 16px;
}
.touch-controls .tc-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.15s;
}
.touch-controls .tc-btn:active { background: rgba(48,213,200,0.2); }
@media (pointer: coarse) {
    .touch-controls { display: grid; }
}

/* ===== PROJECT IMG PLACEHOLDER ===== */
.project-img-placeholder {
    width: 100%;
    aspect-ratio: 16/10;
}
/* ===== DIFFICULTY BUTTONS ===== */
.game-btn-difficulty { padding: 8px 14px; font-size: 0.82rem; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); color: var(--text-muted); cursor: pointer; transition: background 0.15s, color 0.15s; }
.game-btn-difficulty:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.game-btn-difficulty.easy.active  { background: rgba(48,213,100,0.2);  border-color: #30d564; color: #30d564; }
.game-btn-difficulty.medium.active { background: rgba(255,200,0,0.2);   border-color: #ffc800; color: #ffc800; }
.game-btn-difficulty.hard.active  { background: rgba(255,80,80,0.2);   border-color: #ff5050; color: #ff5050; }

/* ===== ADS ===== */
.ad-slot-wrap { min-height: 90px; }
.ad-slot-wrap ins { max-width: 100%; }

/* ===== VIEW TRANSITIONS ===== */
@keyframes viewEnter {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.view-enter { animation: viewEnter 0.2s ease forwards; }

/* ===== FULLSCREEN BUTTON ===== */
.game-btn-fs {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.game-btn-fs:hover { color: var(--text); border-color: rgba(255,255,255,0.35); }

/* Canvas fills screen when fullscreen */
#g-wrap:-webkit-full-screen { background: #000; display: flex; align-items: center; justify-content: center; width: 100vw; height: 100vh; }
#g-wrap:-moz-full-screen    { background: #000; display: flex; align-items: center; justify-content: center; width: 100vw; height: 100vh; }
#g-wrap:fullscreen           { background: #000; display: flex; align-items: center; justify-content: center; width: 100vw; height: 100vh; }
#g-wrap:fullscreen canvas,
#g-wrap:-webkit-full-screen canvas,
#g-wrap:-moz-full-screen canvas {
    max-height: 100vh !important;
    width: auto !important;
    height: 100vh !important;
    max-width: 100vw !important;
}

/* ===== MOBILE GAME MODE ===== */
@media (max-width: 768px) {
    /* Hide site header when playing — back button in game-topbar is enough */
    body.in-game header { display: none; }

    /* Tighten game section padding */
    body.in-game .game-section { padding-top: 10px !important; padding-bottom: 10px !important; }
    body.in-game .game-container { padding: 0 10px; }

    /* Compact topbar */
    body.in-game .game-topbar { margin-bottom: 8px; gap: 8px; }
    body.in-game .game-title { font-size: 1.1rem; }
    body.in-game .game-title-emoji { font-size: 1.2rem; }
    body.in-game .game-best { font-size: 0.8rem; }

    /* Compact statusbar */
    body.in-game .game-statusbar { margin-top: 8px; gap: 6px; }
    body.in-game .game-score-wrap { font-size: 0.9rem; }
    body.in-game .game-btn { padding: 7px 14px; font-size: 0.8rem; }
    body.in-game .game-btn-difficulty { padding: 5px 10px; font-size: 0.78rem; }
    body.in-game .game-actions { gap: 6px; }

    /* Share button — icon only on small screens */
    body.in-game .game-btn-share-text { display: none; }
}

/* ===== INSTRUCTIONS OVERLAY ===== */
.game-btn-info {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1;
    padding: 4px 9px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;
    margin-left: 4px;
}
.game-btn-info:hover { color: var(--text); border-color: rgba(255,255,255,0.35); }

.game-instructions-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.game-instructions-overlay[hidden] { display: none; }
.gi-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.gi-title { font-size: 1.3rem; margin: 0 0 8px; font-weight: 800; }
.gi-goal { font-size: 0.95rem; color: var(--text-muted); margin: 0 0 16px; line-height: 1.5; }
.gi-controls { width: 100%; border-collapse: collapse; margin: 0 0 16px; }
.gi-controls tr { border-bottom: 1px solid rgba(255,255,255,0.06); }
.gi-controls tr:last-child { border-bottom: none; }
.gi-keys { padding: 8px 8px 8px 0; font-family: monospace; font-size: 0.85rem; color: var(--primary); white-space: nowrap; vertical-align: top; }
.gi-action { padding: 8px 0; font-size: 0.9rem; color: var(--text); }
.gi-tips { font-size: 0.85rem; color: var(--text-muted); background: rgba(255,200,0,0.06); padding: 10px 12px; border-radius: 8px; margin: 0 0 16px; line-height: 1.5; }
.gi-close { width: 100%; }

@media (max-width: 480px) {
    .gi-card { padding: 18px; }
    .gi-title { font-size: 1.15rem; }
}
