:root {
    --bg: #020817;
    --bg-soft: #06152d;
    --panel: rgba(6, 26, 54, 0.86);
    --panel-strong: #071d3a;
    --cyan: #00dcff;
    --cyan-soft: #7feeff;
    --blue: #168cff;
    --gold: #ffd34e;
    --red: #ff5d73;
    --green: #48f0a7;
    --text: #e8fbff;
    --muted: #9ec9d7;
    --line: rgba(0, 220, 255, 0.28);
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
    --radius: 24px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 12%, rgba(0, 140, 255, 0.13), transparent 28rem),
        radial-gradient(circle at 90% 34%, rgba(0, 220, 255, 0.09), transparent 30rem),
        linear-gradient(180deg, #020817 0%, #01040e 100%);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.65;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    opacity: 0.65;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.85) 0 1px, transparent 1.4px),
        radial-gradient(circle, rgba(0,220,255,.7) 0 1px, transparent 1.4px);
    background-position: 0 0, 47px 73px;
    background-size: 120px 120px, 190px 190px;
}

a {
    color: var(--cyan-soft);
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
    font: inherit;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 1000;
    padding: 10px 16px;
    border-radius: 10px;
    color: #001019;
    background: var(--cyan);
}

.skip-link:focus {
    top: 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 78px;
    padding: 14px max(24px, calc((100vw - var(--max-width)) / 2));
    border-bottom: 1px solid var(--line);
    background: rgba(2, 8, 23, 0.86);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 900;
    letter-spacing: 0.18em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--cyan);
    border-radius: 50%;
    color: var(--cyan);
    box-shadow: 0 0 22px rgba(0, 220, 255, 0.3);
}

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

.site-nav a {
    position: relative;
    color: var(--text);
    font-size: 0.95rem;
    text-decoration: none;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -7px;
    height: 2px;
    background: var(--cyan);
    transition: right 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
    right: 0;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--text);
    background: var(--panel-strong);
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
    align-items: center;
    gap: 60px;
    width: min(calc(100% - 40px), var(--max-width));
    min-height: calc(100vh - 78px);
    margin: 0 auto;
    padding: 80px 0;
    overflow: hidden;
}

.hero h1,
.section-heading h2,
.cta-section h2,
.privacy-hero h1 {
    margin: 0;
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.hero h1 {
    max-width: 850px;
    font-size: clamp(3.2rem, 7.5vw, 7.2rem);
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-copy {
    max-width: 720px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 12px 22px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button.primary {
    color: #00131a;
    background: linear-gradient(135deg, var(--cyan), #75f7ff);
    box-shadow: 0 14px 34px rgba(0, 220, 255, 0.2);
}

.button.secondary {
    border-color: var(--line);
    color: var(--text);
    background: rgba(8, 35, 70, 0.72);
}

.device-message {
    margin: 22px 0 0;
    color: var(--cyan-soft);
}

.hero-visual {
    position: relative;
    min-height: 500px;
}

.planet {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(31vw, 360px);
    aspect-ratio: 1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle at 30% 28%, #b8fbff 0 3%, #168cff 18%, #072451 55%, #020817 74%);
    box-shadow:
        0 0 40px rgba(0, 220, 255, 0.35),
        0 0 120px rgba(0, 110, 255, 0.18);
}

.orbit {
    position: absolute;
    inset: 50% auto auto 50%;
    border: 1px solid rgba(0, 220, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-18deg);
}

.orbit-one {
    width: 115%;
    height: 55%;
}

.orbit-two {
    width: 86%;
    height: 126%;
    transform: translate(-50%, -50%) rotate(44deg);
}

.hero-ship {
    position: absolute;
    left: 16%;
    top: 17%;
    color: var(--cyan);
    font-size: 4rem;
    filter: drop-shadow(0 0 14px var(--cyan));
    transform: rotate(42deg);
    animation: floatShip 3.2s ease-in-out infinite;
}

@keyframes floatShip {
    0%, 100% { transform: rotate(42deg) translateY(0); }
    50% { transform: rotate(42deg) translateY(-15px); }
}

.section {
    width: min(calc(100% - 40px), var(--max-width));
    margin: 0 auto;
    padding: 110px 0;
}

.section-heading {
    max-width: 780px;
    margin-bottom: 42px;
}

.section-heading h2,
.cta-section h2,
.privacy-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.section-heading > p:last-child {
    color: var(--muted);
    font-size: 1.08rem;
}

.game-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(1, 8, 24, 0.88);
    box-shadow: var(--shadow), 0 0 50px rgba(0, 153, 255, 0.08);
}

.game-toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 29, 58, 0.92);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat span {
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.stat strong {
    color: var(--cyan-soft);
    font-size: 1.35rem;
}

.small-button {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 14px;
    color: var(--text);
    background: #09244a;
    cursor: pointer;
}

.small-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.canvas-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #01040d;
}

#spaceGame {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.game-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 5, 18, 0.73);
    backdrop-filter: blur(5px);
}

.game-overlay[hidden] {
    display: none;
}

.overlay-card {
    width: min(100%, 520px);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: clamp(22px, 5vw, 42px);
    text-align: center;
    background: rgba(5, 24, 50, 0.94);
    box-shadow: var(--shadow);
}

.overlay-card h3 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.overlay-card p:not(.eyebrow) {
    color: var(--muted);
}

.touch-controls {
    display: none;
    grid-template-columns: 1fr 1.3fr 1fr;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--line);
}

.touch-controls button {
    min-height: 54px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: #09244a;
    font-weight: 900;
    touch-action: none;
}

.touch-controls button[data-control="fire"] {
    color: #00141b;
    background: var(--cyan);
}

.game-help {
    margin: 0;
    padding: 14px 18px 18px;
    color: var(--muted);
    text-align: center;
}

.ad-section {
    width: min(calc(100% - 40px), 1000px);
    margin: 180px auto 40px;
    text-align: center;
}

.ad-label {
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
}

.ad-safe-area {
    display: block;
    width: 100%;
    min-height: 120px;
    border: none;
    border-radius: 0;
    background: transparent;
}

.ad-safe-area .adsbygoogle {
    display: block;
    width: 100%;
    min-height: 100px;
}

.version-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}

.version-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(26px, 5vw, 48px);
    background: linear-gradient(155deg, rgba(7, 34, 70, 0.95), rgba(3, 15, 33, 0.96));
    box-shadow: var(--shadow);
}

.version-card::before {
    content: "";
    position: absolute;
    inset: -40% auto auto 55%;
    width: 300px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(0, 220, 255, 0.1);
    filter: blur(10px);
}

.card-icon {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--cyan);
    background: rgba(0, 220, 255, 0.08);
    font-size: 1.8rem;
}

.card-label {
    margin: 24px 0 0;
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: 0.16em;
}

.version-card h3 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.version-card p,
.version-card li {
    color: var(--muted);
}

.version-card ul {
    display: grid;
    gap: 8px;
    margin: 24px 0 30px;
    padding-left: 20px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.feature-grid article {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 26px;
    background: rgba(6, 26, 54, 0.72);
}

.feature-grid span {
    color: var(--cyan);
    font-size: 2rem;
}

.feature-grid h3 {
    margin: 14px 0 8px;
}

.feature-grid p {
    margin: 0;
    color: var(--muted);
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-list details {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px 22px;
    background: rgba(6, 26, 54, 0.72);
}

.faq-list summary {
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.faq-list p {
    margin-bottom: 0;
    color: var(--muted);
}

.cta-section {
    width: min(calc(100% - 40px), var(--max-width));
    margin: 60px auto 110px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: clamp(36px, 8vw, 86px);
    text-align: center;
    background:
        radial-gradient(circle at 50% 120%, rgba(0, 220, 255, 0.22), transparent 52%),
        rgba(6, 26, 54, 0.78);
    box-shadow: var(--shadow);
}

.cta-section .hero-actions {
    justify-content: center;
}

.site-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px 40px;
    padding: 42px max(24px, calc((100vw - var(--max-width)) / 2));
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: #01040d;
}

.site-footer strong {
    color: var(--text);
    letter-spacing: 0.14em;
}

.site-footer p {
    margin: 6px 0 0;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 18px;
}

.site-footer > p {
    grid-column: 1 / -1;
    padding-top: 18px;
    border-top: 1px solid rgba(126, 238, 255, 0.12);
    font-size: 0.9rem;
}

/* PolÃ­tica de privacidad */
.privacy-page {
    background:
        radial-gradient(circle at 50% -15%, rgba(0, 220, 255, 0.15), transparent 34rem),
        #020817;
}

.privacy-main {
    width: min(calc(100% - 40px), 980px);
    margin: 0 auto;
    padding: 70px 0 110px;
}

.privacy-hero {
    margin-bottom: 38px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: clamp(30px, 7vw, 70px);
    background:
        linear-gradient(135deg, rgba(9, 45, 85, 0.9), rgba(2, 10, 26, 0.92));
    box-shadow: var(--shadow);
}

.privacy-hero p:last-child {
    color: var(--muted);
}

.privacy-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
}

.privacy-index {
    position: sticky;
    top: 104px;
    align-self: start;
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    background: rgba(6, 26, 54, 0.82);
}

.privacy-index strong {
    margin-bottom: 5px;
}

.privacy-index a {
    padding: 6px 0;
    color: var(--muted);
    font-size: 0.92rem;
    text-decoration: none;
}

.privacy-index a:hover {
    color: var(--cyan);
}

.privacy-content {
    display: grid;
    gap: 18px;
}

.policy-card {
    scroll-margin-top: 104px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: clamp(24px, 5vw, 38px);
    background: rgba(6, 26, 54, 0.72);
}

.policy-card h2 {
    margin: 0 0 12px;
    color: var(--cyan-soft);
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.policy-card h3 {
    margin: 25px 0 8px;
}

.policy-card p,
.policy-card li {
    color: var(--muted);
}

.policy-card li + li {
    margin-top: 8px;
}

.policy-notice {
    border-left: 4px solid var(--gold);
    padding: 14px 18px;
    color: #fff3bd;
    background: rgba(255, 211, 78, 0.08);
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        text-align: center;
    }

    .hero-content {
        z-index: 1;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        min-height: 350px;
    }

    .version-grid,
    .privacy-layout {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .privacy-index {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .site-header {
        min-height: 68px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: calc(100% + 8px);
        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 10px;
        background: rgba(2, 8, 23, 0.98);
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        padding: 10px 12px;
    }

    .site-nav a::after {
        display: none;
    }

    .hero {
        width: min(calc(100% - 28px), var(--max-width));
        padding-top: 60px;
    }

    .hero h1 {
        font-size: clamp(2.8rem, 15vw, 5rem);
    }

    .section {
        width: min(calc(100% - 28px), var(--max-width));
        padding: 80px 0;
    }

    .game-toolbar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .game-toolbar .small-button {
        grid-column: 1 / -1;
    }

    .touch-controls {
        display: grid;
    }

    .game-help {
        display: none;
    }

    .ad-section {
        width: min(calc(100% - 28px), 1000px);
        margin-top: 170px;
    }

    .site-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .site-footer nav {
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .brand {
        font-size: 0.84rem;
        letter-spacing: 0.1em;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .hero-actions .button {
        width: 100%;
    }

    .game-toolbar {
        padding: 10px;
    }

    .stat strong {
        font-size: 1.12rem;
    }

    .overlay-card {
        padding: 18px;
    }

    .overlay-card .eyebrow {
        display: none;
    }

    .overlay-card p {
        font-size: 0.88rem;
    }

    .touch-controls button {
        min-height: 48px;
        font-size: 0.82rem;
    }

    .privacy-index {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* Centro editorial: páginas con contenido original sobre el juego. */
.editorial-section {
    border-top: 1px solid var(--line);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.article-card,
.content-card,
.toc-card,
.callout-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(7, 29, 58, 0.9), rgba(2, 12, 31, 0.92));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.article-card {
    padding: 30px;
}

.article-card h3,
.content-card h2,
.content-card h3 {
    margin-top: 0;
}

.article-card p:not(.card-label),
.content-card p,
.content-card li,
.article-intro,
.article-meta {
    color: var(--muted);
}

.article-card > a {
    display: inline-block;
    margin-top: 10px;
    font-weight: 800;
    text-decoration: none;
}

.article-page {
    width: min(calc(100% - 40px), 1040px);
    margin: 0 auto;
    padding: 76px 0 110px;
}

.article-header {
    max-width: 900px;
    margin-bottom: 34px;
}

.article-header h1 {
    margin: 0;
    font-size: clamp(2.7rem, 7vw, 5.6rem);
    line-height: 1.03;
    letter-spacing: -0.045em;
}

.article-intro {
    max-width: 820px;
    font-size: 1.14rem;
}

.article-meta {
    font-size: 0.9rem;
}

.article-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.toc-card {
    position: sticky;
    top: 98px;
    display: grid;
    gap: 8px;
    padding: 20px;
}

.toc-card strong {
    margin-bottom: 4px;
    color: var(--text);
}

.toc-card a {
    color: var(--muted);
    font-size: 0.92rem;
    text-decoration: none;
}

.toc-card a:hover {
    color: var(--cyan-soft);
}

.article-content {
    display: grid;
    gap: 22px;
}

.content-card {
    padding: clamp(24px, 4vw, 42px);
    scroll-margin-top: 100px;
}

.content-card h2 {
    color: var(--text);
    font-size: clamp(1.65rem, 3vw, 2.3rem);
}

.content-card h3 {
    margin-top: 28px;
    color: var(--cyan-soft);
}

.content-card ul,
.content-card ol {
    padding-left: 1.35rem;
}

.content-card li + li {
    margin-top: 8px;
}

.callout-card {
    padding: 24px 28px;
    border-left: 4px solid var(--gold);
}

.callout-card strong {
    color: var(--gold);
}

.table-wrap {
    overflow-x: auto;
}

.content-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.content-table th,
.content-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.content-table th {
    color: var(--cyan-soft);
    background: rgba(0, 220, 255, 0.06);
}

.content-table td {
    color: var(--muted);
}

.legal-note {
    border-left: 4px solid var(--cyan);
    padding: 18px 22px;
    color: var(--muted);
    background: rgba(0, 220, 255, 0.06);
}

@media (max-width: 820px) {
    .article-grid,
    .article-layout {
        grid-template-columns: 1fr;
    }

    .toc-card {
        position: static;
    }
}

@media (max-width: 520px) {
    .article-page {
        width: min(calc(100% - 28px), 1040px);
        padding-top: 52px;
    }

    .article-card,
    .content-card {
        padding: 22px;
    }
}
