@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0b0e1a;
    --bg-secondary: #111627;
    --bg-card: #161b2e;
    --bg-card-hover: #1c2340;
    --accent: #4fa8d6;
    --accent-hover: #6ec0ee;
    --accent-glow: rgba(79, 168, 214, 0.25);
    --text-primary: #e8eaf0;
    --text-secondary: #9ba3b8;
    --text-muted: #5e6580;
    --border: rgba(79, 168, 214, 0.15);
    --border-strong: rgba(79, 168, 214, 0.3);
    --gold: #d4a843;
    --gold-hover: #e6be5a;
    --danger: #e05555;
    --success: #4caf7d;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --transition: 0.3s ease;
    --font: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====== HEADER ====== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 14, 26, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.header-logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

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

.nav a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 4px 0;
    transition: color var(--transition);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: width var(--transition);
}

.nav a:hover,
.nav a.active {
    color: var(--text-primary);
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ====== HERO ====== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11,14,26,0.3) 0%, var(--bg-primary) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.hero-logo {
    margin: 0 auto 24px;
    border-radius: 16px;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 28px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
    background: rgba(79, 168, 214, 0.08);
    color: var(--accent-hover);
    border-color: var(--accent);
}

.btn.disabled {
    cursor: default;
    opacity: 0.7;
    pointer-events: none;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.88rem;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.google-play-badge {
    display: inline-block;
    transition: opacity var(--transition);
}

.google-play-badge:hover {
    opacity: 0.9;
}

.google-play-badge img {
    display: block;
    height: auto;
}

.google-play-badge-lg img {
    width: 200px;
}

/* ====== NOTICE ====== */
.notice {
    padding: 60px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.notice .container {
    max-width: 800px;
    text-align: center;
}

.notice-icon {
    margin: 0 auto 16px;
    border-radius: 12px;
}

.notice h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--gold);
}

.notice p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.notice a {
    color: var(--accent);
    font-weight: 600;
}

/* ====== GAME CARDS ====== */
.game-cards-section {
    padding: 80px 20px;
}

.game-cards-section .section-title {
    margin-bottom: 12px;
}

.game-cards-section .section-subtitle {
    margin-bottom: 48px;
}

.game-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.game-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.game-card-placeholder .game-card-image {
    cursor: default;
}

.game-card-placeholder .game-card-image-wrapper {
    cursor: default;
    pointer-events: none;
}

.game-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-secondary);
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-card-content {
    padding: 24px;
}

.game-card-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

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

.game-card-image-link {
    display: block;
    color: inherit;
}

.game-card-image-link:hover {
    color: inherit;
}

.game-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.games-page .game-cards-grid {
    margin-bottom: 0;
}

/* ====== FEATURES ====== */
.features {
    padding: 80px 20px;
    background: var(--bg-secondary);
}

.features .section-title {
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all var(--transition);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-card .icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card .icon img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ====== ABOUT ====== */
.about {
    padding: 80px 20px;
}

.about .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 320px;
}

.about-text h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-text .btn {
    margin-top: 12px;
}

/* ====== APP CTA ====== */
.app-cta,
.games-cta {
    padding: 80px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.app-cta-content {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.app-cta-content img {
    margin: 0 auto 20px;
    border-radius: 16px;
}

.app-cta-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.app-cta-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 28px;
    line-height: 1.7;
}

/* ====== LEGAL PAGES ====== */
.legal-page {
    padding: 120px 20px 80px;
    min-height: 80vh;
}

.legal-page .container {
    max-width: 800px;
}

.legal-page-icon {
    margin-bottom: 20px;
    border-radius: 12px;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.legal-page h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 32px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-page h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.legal-page p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.legal-page ul {
    color: var(--text-secondary);
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-page ul li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* ====== PAGE HERO ====== */
.page-hero {
    padding: 120px 20px 40px;
    text-align: center;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.page-hero-icon {
    margin: 0 auto 16px;
    border-radius: 16px;
}

.page-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.page-hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ====== ABOUT PAGE ====== */
.about-page {
    padding: 60px 20px 80px;
}

.about-page-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: start;
}

.about-page-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.about-page-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 320px;
}

.about-page-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.about-page-content h2:first-child {
    margin-top: 0;
}

.about-page-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-features {
    padding: 60px 20px 80px;
    background: var(--bg-secondary);
}

.about-features .features-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* ====== FOOTER ====== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 20px 24px;
}

.footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 36px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.footer-brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

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

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-notice {
    padding: 24px 0 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-notice p {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto 12px;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: center;
    padding-top: 12px;
}

/* ====== SCROLL TO TOP ====== */
.scroll-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all var(--transition);
    z-index: 999;
}

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

.scroll-top:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* ====== AGE POPUP ====== */
.age-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.age-popup-overlay.hidden {
    display: none;
}

.age-popup {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.age-popup img {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 12px;
}

.age-popup h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.age-popup p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 28px;
}

.age-popup-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.age-popup-buttons .btn {
    min-width: 140px;
    justify-content: center;
}

.btn-leave {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-leave:hover {
    background: rgba(224, 85, 85, 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

/* ====== COOKIE POPUP ====== */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 24px;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: translateY(120%);
    transition: transform 0.4s ease;
}

.cookie-popup.visible {
    transform: translateY(0);
}

.cookie-popup.hidden {
    display: none;
}

.cookie-popup p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.cookie-popup-buttons {
    display: flex;
    gap: 10px;
}

.cookie-popup-buttons .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* ====== SECTION TITLE ====== */
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 40px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .game-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about .container {
        grid-template-columns: 1fr;
    }
    .about-image {
        order: -1;
    }
    .about-page-grid {
        grid-template-columns: 1fr;
    }
    .about-page-image {
        order: -1;
    }
    .about-features .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-content h1 {
        font-size: 2.6rem;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-120%);
        opacity: 0;
        transition: all var(--transition);
        pointer-events: none;
    }
    .nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    .burger {
        display: flex;
    }
    .burger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .burger.active span:nth-child(2) {
        opacity: 0;
    }
    .burger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    .hero {
        min-height: 70vh;
        padding: 100px 20px 60px;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .game-cards-grid {
        grid-template-columns: 1fr;
    }
    .footer-top {
        flex-direction: column;
        gap: 24px;
    }
    .age-popup {
        padding: 28px 20px;
    }
    .age-popup-buttons {
        flex-direction: column;
    }
    .cookie-popup {
        left: 12px;
        right: 12px;
        max-width: 100%;
    }
    .about-features .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.65rem;
    }
    .section-title,
    .legal-page h1,
    .page-hero h1 {
        font-size: 1.8rem;
    }
    .game-card-actions {
        flex-direction: column;
    }
    .game-card-actions .btn,
    .game-card-actions .btn.disabled {
        width: 100%;
        justify-content: center;
    }
}

/* ====== GAME DETAIL PAGE ====== */
.game-detail-hero {
    padding: 120px 20px 48px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.game-detail-header {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.game-detail-icon {
    flex-shrink: 0;
}

.game-detail-icon img {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    border: 1px solid var(--border);
}

.game-detail-title-wrap h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-detail-developer {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.game-detail-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.game-detail-content {
    padding: 48px 20px 60px;
}

.game-detail-main {
    max-width: 900px;
    margin: 0 auto;
}

.game-about h2,
.game-screenshots h2,
.game-reviews h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.game-about p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.game-screenshots {
    margin-top: 48px;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.screenshots-grid img {
    width: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.game-reviews {
    margin-top: 48px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.review-rating {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.95rem;
}

.review-author {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.review-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

.game-detail-cta {
    padding: 40px 20px 80px;
    background: var(--bg-secondary);
    text-align: center;
}

.game-detail-cta .btn {
    margin: 0 8px 12px;
}

@media (max-width: 768px) {
    .game-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .game-detail-title-wrap h1 {
        font-size: 1.8rem;
    }
    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .screenshots-grid {
        grid-template-columns: 1fr;
    }
}
