@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Exo+2:wght@300;400;500;600;700&display=swap');

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

:root {
    --space-black: #030712;
    --space-deep: #0f172a;
    --cosmic-purple: #7c3aed;
    --nebula-pink: #ec4899;
    --star-white: #f8fafc;
    --space-gray: #64748b;
    --glow-blue: #38bdf8;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--space-black);
    color: var(--star-white);
    min-height: 100vh;
    line-height: 1.7;
    background-image: radial-gradient(ellipse at 20% 30%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
                      radial-gradient(ellipse at 80% 70%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
}

.cosmic-header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(15px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 2rem;
    border-bottom: 1px solid rgba(124, 58, 237, 0.3);
}

.header-wrap {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.space-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.space-brand svg {
    width: 42px;
    height: 42px;
}

.space-brand-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--cosmic-purple), var(--nebula-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.space-toggle {
    display: none;
    background: none;
    border: 1px solid var(--cosmic-purple);
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    z-index: 1001;
}

.space-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--cosmic-purple);
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.space-toggle.active span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

.space-toggle.active span:nth-child(2) {
    opacity: 0;
}

.space-toggle.active span:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
}

.space-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.space-nav a {
    color: var(--space-gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    padding: 0.4rem 0;
    position: relative;
}

.space-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cosmic-purple), var(--nebula-pink));
    transition: width 0.3s;
}

.space-nav a:hover {
    color: var(--star-white);
}

.space-nav a:hover::after {
    width: 100%;
}

.cosmic-hero {
    padding: 10rem 2rem 5rem;
    text-align: center;
    position: relative;
}

.hero-wrap {
    max-width: 900px;
    margin: 0 auto;
}

.cosmic-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.6rem;
    font-weight: 900;
    margin-bottom: 1.3rem;
    background: linear-gradient(135deg, var(--star-white), var(--glow-blue), var(--cosmic-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.cosmic-hero p {
    font-size: 1.1rem;
    color: var(--space-gray);
    margin-bottom: 2rem;
}

.cosmic-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cosmic-badge {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(236, 72, 153, 0.1));
    border: 1px solid var(--cosmic-purple);
    padding: 0.65rem 1.4rem;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--nebula-pink);
}

.game-sector {
    padding: 4rem 2rem;
    background: rgba(15, 23, 42, 0.5);
}

.sector-title {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--glow-blue);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.game-portal {
    max-width: 1100px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--space-deep), rgba(124, 58, 237, 0.2));
    border-radius: 16px;
    padding: 4px;
    border: 1px solid rgba(124, 58, 237, 0.4);
    box-shadow: 0 0 50px rgba(124, 58, 237, 0.2);
}

.game-portal iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 14px;
    display: block;
}

.features-grid {
    padding: 4rem 2rem;
    background: var(--space-black);
}

.grid-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-tile {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 16px;
    padding: 1.8rem;
    text-align: center;
    transition: all 0.3s;
}

.feature-tile:hover {
    transform: translateY(-5px);
    border-color: var(--cosmic-purple);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.2);
}

.feature-tile .ico {
    font-size: 2.4rem;
    margin-bottom: 0.8rem;
}

.feature-tile h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--nebula-pink);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.feature-tile p {
    color: var(--space-gray);
    font-size: 0.9rem;
}

.story-block {
    padding: 4rem 2rem;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.1), var(--space-black));
}

.story-inner {
    max-width: 950px;
    margin: 0 auto;
}

.story-inner h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.7rem;
    color: var(--star-white);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
}

.story-inner p {
    color: var(--space-gray);
    margin-bottom: 1rem;
}

.alert-panel {
    background: rgba(124, 58, 237, 0.1);
    border-left: 4px solid var(--cosmic-purple);
    border-radius: 0 12px 12px 0;
    padding: 1.5rem;
    margin: 2rem 0;
}

.alert-panel h3 {
    color: var(--nebula-pink);
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}

.alert-panel p {
    color: var(--star-white);
    margin: 0;
}

.content-page {
    padding: 7rem 2rem 4rem;
    min-height: 80vh;
}

.content-inner {
    max-width: 880px;
    margin: 0 auto;
}

.content-inner h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--star-white);
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.content-inner h2 {
    font-size: 1.25rem;
    color: var(--glow-blue);
    margin: 1.8rem 0 0.8rem;
    font-weight: 700;
}

.content-inner p {
    color: var(--space-gray);
    margin-bottom: 1rem;
}

.content-inner ul {
    list-style: none;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.content-inner ul li {
    color: var(--space-gray);
    margin-bottom: 0.4rem;
    position: relative;
    padding-left: 1.2rem;
}

.content-inner ul li::before {
    content: '★';
    position: absolute;
    left: -0.3rem;
    color: var(--cosmic-purple);
    font-size: 0.6rem;
}

.cosmic-footer {
    background: var(--space-deep);
    border-top: 1px solid rgba(124, 58, 237, 0.2);
    padding: 2.5rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.help-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.help-links a {
    color: var(--space-gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.help-links a:hover {
    color: var(--cosmic-purple);
}

.footer-line {
    color: var(--space-gray);
    font-size: 0.85rem;
}

.age-gateway {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 1rem;
}

.age-gateway.hidden {
    display: none;
}

.gateway-box {
    background: linear-gradient(135deg, var(--space-deep), rgba(124, 58, 237, 0.2));
    border: 2px solid var(--cosmic-purple);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    max-width: 430px;
    width: 100%;
}

.gateway-box .gate-icon {
    font-size: 3.5rem;
    margin-bottom: 0.8rem;
}

.gateway-box h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--star-white);
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.gateway-box p {
    color: var(--space-gray);
    margin-bottom: 1.8rem;
}

.gate-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.gate-buttons button {
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.3s;
    border: none;
}

.gate-yes {
    background: linear-gradient(135deg, var(--cosmic-purple), var(--nebula-pink));
    color: var(--star-white);
}

.gate-yes:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 25px rgba(124, 58, 237, 0.4);
}

.gate-no {
    background: transparent;
    border: 1px solid var(--space-gray);
    color: var(--space-gray);
}

.gate-no:hover {
    border-color: #ef4444;
    color: #ef4444;
}

@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .space-toggle {
        display: block;
    }

    .space-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: var(--space-deep);
        padding: 5rem 1.5rem 2rem;
        transition: right 0.3s;
        border-left: 1px solid var(--cosmic-purple);
    }

    .space-nav.open {
        right: 0;
    }

    .space-nav ul {
        flex-direction: column;
        gap: 1.3rem;
    }

    .space-nav a {
        font-size: 1rem;
    }

    .cosmic-hero {
        padding: 7rem 1.5rem 4rem;
    }

    .cosmic-hero h1 {
        font-size: 1.8rem;
    }

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

    .game-portal iframe {
        height: 420px;
    }

    .sector-title {
        font-size: 1.3rem;
    }

    .cosmic-badge {
        padding: 0.5rem 1rem;
        font-size: 0.78rem;
    }

    .help-links {
        flex-direction: column;
        gap: 0.8rem;
    }

    .gateway-box {
        padding: 1.8rem 1.2rem;
    }

    .gate-buttons {
        flex-direction: column;
    }

    .gate-buttons button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cosmic-header {
        padding: 0.6rem 1rem;
    }

    .space-brand-name {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

    .cosmic-hero h1 {
        font-size: 1.5rem;
    }

    .content-inner h1 {
        font-size: 1.6rem;
    }
}
