* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --space-black: #0d0221;
    --deep-purple: #2b1055;
    --cosmic-blue: #7f5af0;
    --nebula-pink: #ff006e;
    --star-white: #fffffe;
    --muted-gray: #94a1b2;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--star-white);
    background: var(--space-black);
    line-height: 1.6;
    overflow-x: hidden;
}

.cosmic-container {
    position: relative;
    min-height: 100vh;
}

/* Starfield */
.stars, .stars-layer2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="2" height="2"><circle cx="1" cy="1" r="1" fill="white" opacity="0.3"/></svg>') repeat;
    animation: starsMove 200s linear infinite;
}

.stars-layer2 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="3" height="3"><circle cx="1.5" cy="1.5" r="1" fill="white" opacity="0.5"/></svg>') repeat;
    animation: starsMove 300s linear infinite reverse;
}

@keyframes starsMove {
    from { transform: translateY(0); }
    to { transform: translateY(-2000px); }
}

.section-wrap {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 1;
}

/* Age Gate */
.age-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 2, 33, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.age-gate.hidden {
    display: none;
}

.gate-panel {
    position: relative;
    background: linear-gradient(135deg, var(--deep-purple), #1a0741);
    padding: 55px 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 550px;
    box-shadow: 0 0 60px rgba(127, 90, 240, 0.4);
    border: 2px solid var(--cosmic-blue);
    margin: 20px;
}

.gate-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(127, 90, 240, 0.1) 0%, transparent 70%);
    animation: gatePulse 3s ease-in-out infinite;
}

@keyframes gatePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.gate-symbol {
    position: relative;
    font-size: 90px;
    margin-bottom: 25px;
    animation: cosmicSpin 20s linear infinite;
    z-index: 1;
}

@keyframes cosmicSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.gate-panel h2 {
    position: relative;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--cosmic-blue);
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 3px;
    text-shadow: 0 0 20px var(--cosmic-blue);
    z-index: 1;
}

.gate-panel p {
    position: relative;
    color: var(--star-white);
    font-size: 17px;
    margin-bottom: 15px;
    z-index: 1;
}

.gate-requirement {
    font-weight: 600;
    color: var(--nebula-pink);
}

.gate-info {
    font-size: 14px !important;
    font-style: italic;
    color: var(--muted-gray);
}

.gate-actions {
    position: relative;
    display: flex;
    gap: 15px;
    margin-top: 35px;
    flex-wrap: wrap;
    justify-content: center;
    z-index: 1;
}

.gate-allow, .gate-deny {
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 1px;
}

.gate-allow {
    background: linear-gradient(135deg, var(--cosmic-blue), #5b3cb8);
    color: white;
    box-shadow: 0 0 25px rgba(127, 90, 240, 0.5);
}

.gate-allow:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(127, 90, 240, 0.8);
}

.gate-deny {
    background: #374151;
    color: var(--muted-gray);
}

.gate-deny:hover {
    background: #4b5563;
}

/* Navigation */
.cosmos-nav {
    position: sticky;
    top: 0;
    background: rgba(13, 2, 33, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(127, 90, 240, 0.3);
    z-index: 1000;
    border-bottom: 2px solid var(--cosmic-blue);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 75px;
}

.cosmos-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--cosmic-blue);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 15px var(--cosmic-blue);
    transition: transform 0.3s ease;
}

.cosmos-brand:hover {
    transform: scale(1.05);
}

.brand-galaxy {
    font-size: 38px;
    animation: galaxyPulse 4s ease-in-out infinite;
}

@keyframes galaxyPulse {
    0%, 100% { filter: drop-shadow(0 0 8px var(--cosmic-blue)); }
    50% { filter: drop-shadow(0 0 20px var(--nebula-pink)); }
}

.cosmos-menu {
    display: flex;
    list-style: none;
    gap: 35px;
}

.menu-link {
    color: var(--muted-gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    padding: 10px 18px;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
}

.menu-link:hover, .menu-link.active {
    color: var(--cosmic-blue);
    background: rgba(127, 90, 240, 0.15);
    text-shadow: 0 0 10px var(--cosmic-blue);
}

.nav-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.nav-menu-btn span {
    width: 30px;
    height: 3px;
    background: var(--cosmic-blue);
    border-radius: 2px;
    transition: 0.3s;
    box-shadow: 0 0 10px var(--cosmic-blue);
}

/* Hero */
.cosmic-hero {
    position: relative;
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-nebula {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 50%, rgba(127, 90, 240, 0.3) 0%, transparent 70%),
                radial-gradient(ellipse at 20% 80%, rgba(255, 0, 110, 0.2) 0%, transparent 50%);
    animation: nebulaPulse 10s ease-in-out infinite;
}

@keyframes nebulaPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.hero-content {
    position: relative;
    text-align: center;
    z-index: 2;
    padding: 0 30px;
    max-width: 1000px;
}

.cosmic-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 72px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--star-white);
    text-shadow: 0 0 30px var(--cosmic-blue), 0 0 60px var(--nebula-pink);
    letter-spacing: 4px;
}

.cosmic-subtitle {
    font-size: 22px;
    margin-bottom: 40px;
    color: var(--muted-gray);
    line-height: 1.7;
}

.cosmic-cta {
    display: inline-block;
    padding: 20px 55px;
    background: linear-gradient(135deg, var(--nebula-pink), var(--cosmic-blue));
    color: white;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 18px;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 0 40px rgba(255, 0, 110, 0.5);
    letter-spacing: 2px;
}

.cosmic-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 60px rgba(255, 0, 110, 0.8);
}

/* Sections */
section {
    padding: 90px 0;
    position: relative;
}

.cosmic-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 44px;
    font-weight: 700;
    color: var(--cosmic-blue);
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 3px;
    text-shadow: 0 0 20px var(--cosmic-blue);
}

.dimension-text, .dimension-intro {
    font-size: 18px;
    line-height: 1.9;
    color: var(--muted-gray);
    margin-bottom: 25px;
}

.cosmic-alerts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.alert-module {
    padding: 40px 30px;
    border-radius: 18px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.alert-module:hover {
    transform: translateY(-8px);
}

.module-blue {
    background: linear-gradient(135deg, rgba(127, 90, 240, 0.15), rgba(91, 60, 184, 0.15));
    border-color: var(--cosmic-blue);
    box-shadow: 0 0 40px rgba(127, 90, 240, 0.2);
}

.module-purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(124, 58, 237, 0.15));
    border-color: #8b5cf6;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.2);
}

.module-pink {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.15), rgba(236, 72, 153, 0.15));
    border-color: var(--nebula-pink);
    box-shadow: 0 0 40px rgba(255, 0, 110, 0.2);
}

.module-icon {
    font-size: 65px;
    margin-bottom: 20px;
}

.alert-module h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    color: var(--cosmic-blue);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.alert-module p {
    font-size: 16px;
    color: var(--muted-gray);
    line-height: 1.7;
}

/* Game */
.game-dimension {
    background: linear-gradient(135deg, rgba(43, 16, 85, 0.3), rgba(13, 2, 33, 0.5));
}

.game-intro {
    text-align: center;
    font-size: 18px;
    color: var(--muted-gray);
    margin-bottom: 40px;
}

.game-portal {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.5);
    padding: 25px;
    border-radius: 20px;
    border: 2px solid var(--cosmic-blue);
    box-shadow: 0 0 50px rgba(127, 90, 240, 0.3);
}

.portal-frame {
    width: 100%;
    height: 700px;
    border: none;
    border-radius: 15px;
    background: white;
}

.game-advisory {
    text-align: center;
    margin-top: 35px;
    font-size: 16px;
    color: var(--muted-gray);
}

.game-advisory p {
    margin: 12px 0;
}

/* Capabilities */
.capabilities-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 35px;
    margin-top: 60px;
}

.capability-cell {
    padding: 35px 30px;
    background: linear-gradient(135deg, rgba(43, 16, 85, 0.5), rgba(26, 7, 65, 0.5));
    border-radius: 15px;
    border-left: 4px solid var(--cosmic-blue);
    transition: all 0.3s ease;
}

.capability-cell:hover {
    transform: translateX(8px);
    box-shadow: 0 0 40px rgba(127, 90, 240, 0.3);
}

.cell-glyph {
    font-size: 50px;
    display: block;
    margin-bottom: 20px;
}

.capability-cell h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    color: var(--cosmic-blue);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.capability-cell p {
    font-size: 16px;
    color: var(--muted-gray);
    line-height: 1.7;
}

/* Lore */
.cosmic-lore {
    background: linear-gradient(135deg, rgba(43, 16, 85, 0.4), rgba(13, 2, 33, 0.6));
}

.lore-text p {
    font-size: 18px;
    line-height: 1.9;
    color: var(--muted-gray);
    margin-bottom: 25px;
}

/* Play Page */
.page-header {
    background: linear-gradient(135deg, var(--cosmic-blue), var(--nebula-pink));
    padding: 70px 0;
    text-align: center;
}

.page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 54px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    letter-spacing: 3px;
}

.page-description {
    font-size: 20px;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
}

.play-guide {
    margin: 60px 0;
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.guide-step {
    display: flex;
    gap: 20px;
    padding: 35px;
    background: rgba(43, 16, 85, 0.4);
    border-radius: 15px;
    border: 2px solid var(--cosmic-blue);
}

.step-marker {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--cosmic-blue), #5b3cb8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 0 20px var(--cosmic-blue);
}

.step-detail h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    color: var(--cosmic-blue);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.step-detail p {
    font-size: 15px;
    color: var(--muted-gray);
    line-height: 1.7;
}

.safety-alert {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.15), rgba(139, 92, 246, 0.15));
    padding: 40px;
    border-radius: 15px;
    border-left: 5px solid var(--nebula-pink);
    margin-top: 50px;
}

.safety-alert h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    color: var(--nebula-pink);
    margin-bottom: 20px;
}

.safety-alert ul {
    list-style-position: inside;
    font-size: 16px;
    color: var(--muted-gray);
    line-height: 2;
}

/* Document Pages */
.document-header {
    background: linear-gradient(135deg, var(--cosmic-blue), var(--nebula-pink));
    padding: 70px 0;
    text-align: center;
}

.document-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 54px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    letter-spacing: 3px;
}

.document-date {
    font-size: 17px;
    opacity: 0.9;
}

.document-body {
    padding: 80px 0;
}

.doc-article {
    margin-bottom: 50px;
}

.doc-article h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 30px;
    color: var(--cosmic-blue);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.doc-article p {
    font-size: 16px;
    color: var(--muted-gray);
    line-height: 1.8;
    margin-bottom: 18px;
}

.critical-notice {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.15), rgba(139, 92, 246, 0.15));
    padding: 35px;
    border-radius: 15px;
    border-left: 6px solid var(--nebula-pink);
    box-shadow: 0 0 40px rgba(255, 0, 110, 0.2);
}

.final-statement {
    background: linear-gradient(135deg, var(--cosmic-blue), var(--nebula-pink));
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    margin-top: 60px;
    box-shadow: 0 0 50px rgba(127, 90, 240, 0.5);
}

.final-statement p {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Footer */
.cosmic-footer {
    background: linear-gradient(135deg, rgba(13, 2, 33, 0.98), rgba(26, 7, 65, 0.98));
    padding: 70px 0 30px;
    border-top: 2px solid var(--cosmic-blue);
}

.footer-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-module h4 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--cosmic-blue);
    font-size: 22px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.footer-module p {
    font-size: 15px;
    color: var(--muted-gray);
    line-height: 1.7;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--muted-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--cosmic-blue);
    text-shadow: 0 0 10px var(--cosmic-blue);
}

.footer-end {
    text-align: center;
    padding-top: 35px;
    border-top: 1px solid rgba(127, 90, 240, 0.2);
}

.footer-end p {
    font-size: 14px;
    color: var(--muted-gray);
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .nav-menu-btn {
        display: flex;
    }

    .cosmos-menu {
        position: fixed;
        left: -100%;
        top: 75px;
        flex-direction: column;
        background: rgba(13, 2, 33, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
        padding: 40px 0;
        gap: 0;
        border-top: 2px solid var(--cosmic-blue);
    }

    .cosmos-menu.active {
        left: 0;
    }

    .cosmos-menu li {
        margin: 15px 0;
        width: 100%;
    }

    .menu-link {
        display: block;
        padding: 18px 30px;
    }

    .nav-menu-btn.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-8px, 6px);
    }

    .nav-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-menu-btn.active span:nth-child(3) {
        transform: rotate(45deg) translate(-8px, -6px);
    }

    .cosmic-title {
        font-size: 48px;
    }

    .cosmic-subtitle {
        font-size: 18px;
    }

    .cosmic-heading {
        font-size: 32px;
    }

    .portal-frame {
        height: 500px;
    }

    .capabilities-matrix, .cosmic-alerts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .cosmic-title {
        font-size: 36px;
    }

    .portal-frame {
        height: 400px;
    }

    .gate-panel {
        padding: 40px 30px;
    }

    .gate-symbol {
        font-size: 70px;
    }

    .gate-panel h2 {
        font-size: 28px;
    }

    .document-title, .page-title {
        font-size: 36px;
    }
}
