:root {
    --bg: #0f172a;
    --bg-2: #111827;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #34a249;
    --brand: #22c55e;
    --header-h: 64px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow: auto !important;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50000;
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    flex-wrap: nowrap;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.25);
}

.brand-text {
    font-size: 18px;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    padding: 8px;
    border-radius: 8px;
}

.nav-list {
    display: flex;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.install-btn {
    margin-left: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(52, 162, 73, 0.6);
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.25);
    white-space: nowrap;
}

.install-btn:hover {
    filter: brightness(1.05);
}

.page-section {
    padding: 40px 0;
}

main {
    padding-top: var(--header-h);
}

.game-section {
    padding: 0;
    background: var(--bg-2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.game-section {
    --content-height: calc(100vh - var(--header-h));
}

.game-wrapper {
    width: 100%;
    min-height: calc(100vh - var(--header-h));
}

.game-section .row {
    height: var(--content-height);
}

.game-section .content {
    overflow: visible !important;
}

.game-iframe {
    width: 100%;
    height: var(--content-height);
    border: 0;
    display: block;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    background: #000;
}

.info-section {
    background: var(--bg);
}

.game-info {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 24px;
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
}

.game-icon {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #16a34a, #34d399);
    color: #042a17;
    font-size: 40px;
    font-weight: 800;
}

.game-info-right h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.game-info-right p {
    margin: 0 0 12px;
    color: var(--muted);
}

.other-games h2,
.other-doodles h2,
.content-section h2,
.faq-section h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.grid-item {
    position: relative;
    border-radius: 16px;
    background: #0f172a;
    color: var(--text);
    font-weight: 600;
    overflow: hidden;
}

.grid-item::before {
    content: "";
    display: block;
    padding-top: 100%;
}

.grid-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 200ms ease;
}

.grid-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.grid-item:hover {
    transform: translateY(-2px);
    transition: transform 200ms ease;
    border-color: rgba(255, 255, 255, 0.22);
}

.grid-item:hover .grid-overlay {
    opacity: 1;
}

.content-section {
    background: var(--bg);
}

.content-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
}

.prose {
    max-width: none;
    line-height: 1.8;
    color: var(--muted);
    text-align: left;
}

.prose h2,
.prose h3 {
    color: var(--text);
}

.key-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 12px 24px;
    padding-left: 0;
    list-style: none;
    text-align: left;
}

.key-points li {
    position: relative;
    padding-left: 28px;
    color: var(--muted);
}

.key-points li::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--brand);
}

.steps {
    list-style: none;
    counter-reset: step;
    padding-left: 0;
    display: grid;
    gap: 12px;
}

.steps li {
    position: relative;
    padding-left: 36px;
    color: var(--muted);
    text-align: left;
}

.faq-section details {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

.faq-section details+details {
    margin-top: 10px;
}

.faq-section summary {
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-section summary::before {
    content: "▸";
    color: var(--brand);
    transition: transform 150ms ease;
}

.faq-section details[open] summary::before {
    transform: rotate(90deg);
}

.faq-section p {
    margin: 10px 0 0;
    color: var(--muted);
}

.page-footer {
    background: var(--bg-2);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 0;
    color: var(--muted);
}

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

.footer-links a {
    color: var(--muted);
}

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

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-inner {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 14px;
    }
    .footer-links a {
        padding: 6px 10px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 10px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04));
    }
}

@media (max-width: 700px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .game-info {
        grid-template-columns: 64px 1fr;
    }
    .game-icon {
        width: 64px;
        height: 64px;
        border-radius: 12px;
        font-size: 28px;
    }
    .key-points {
        grid-template-columns: 1fr;
    }
    .footer-links {
        gap: 8px 12px;
    }
    .footer-links a {
        font-size: 14px;
    }
}

@media (max-width: 560px) {
    .nav-toggle {
        display: inline-block;
    }
    .nav-list {
        display: none;
        position: fixed;
        left: 0;
        right: 0;
        top: var(--header-h);
        bottom: 0;
        background: linear-gradient(180deg, rgba(17, 24, 39, 0.97), rgba(12, 18, 29, 0.97));
        backdrop-filter: saturate(180%) blur(8px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 24px 16px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        justify-content: flex-start;
        z-index: 50001;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
    }
    .nav-list.open {
        display: flex;
    }
    .nav-link {
        padding: 1px;
        text-align: left;
        width: 100%;
    }
    .nav-list .menu-center {
        display: flex;
        justify-content: center;
    }
    .nav-list .install-btn {
        width: 100%;
        justify-content: center;
    }
    .nav-list .lang-switcher {
        margin: 8px 0 0;
        width: 100%;
        display: flex;
        justify-content: center;
        z-index: 50002;
    }
    .nav-list .lang-toggle {
        display: inline-flex;
    }
    .nav-list .lang-menu {
        position: static;
        display: none;
        flex-direction: column;
        gap: 10px;
        align-items: center;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
    }
    .nav-list .lang-switcher.open .lang-menu {
        display: flex;
    }
    .nav-list .lang-menu a {
        padding: 14px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        max-width: 420px;
        text-align: left;
    }
}

.content-visual img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.game-brand-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
}

.game-info-right {
    text-align: left !important;
}

.lang-switcher {
    position: relative;
    margin-left: 8px;
    z-index: 50002;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04));
    color: var(--muted);
    cursor: pointer;
}

.lang-toggle:hover {
    color: var(--text);
}

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 8px;
    display: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    z-index: 50003;
}

.lang-switcher.open .lang-menu {
    display: block;
}

.lang-menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--muted);
}

.lang-menu a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

#primaryNav li a {
    text-align: center;
}

.nav-list {
    align-items: center;
}

.play-wrapper {
    width: 100%;
    text-align: center;
    margin: 40px 0;
}

.play-btn {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #ff6200, #ff2e63);
    color: #fff;
    font-size: 20px;
    font-family: 'Montserrat', sans-serif;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(255, 50, 70, 0.35);
    transition: 0.2s ease;
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 50, 70, 0.45);
}