* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cosmic-purple: #a78bfa;
    --cosmic-blue: #6366f1;
    --deep-space: #0f0721;
    --nebula-dark: #1a0f2e;
    --star-white: #ffffff;
    --cosmic-gray: #b8b4d0;
    --glow-color: rgba(167, 139, 250, 0.6);
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--deep-space);
    color: var(--star-white);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Starfield Animation */
@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.stars, .header-stars, .hero-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.stars::before, .stars::after,
.header-stars::before, .header-stars::after,
.hero-stars::before, .hero-stars::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 
        100px 100px white, 200px 150px white, 300px 80px white, 400px 200px white,
        500px 120px white, 600px 180px white, 700px 90px white, 800px 160px white,
        150px 250px white, 250px 300px white, 350px 220px white, 450px 280px white,
        550px 240px white, 650px 320px white, 750px 260px white, 850px 340px white;
    animation: twinkle 3s infinite;
}

.stars::after, .header-stars::after, .hero-stars::after {
    animation-delay: 1.5s;
    box-shadow: 
        120px 80px white, 220px 130px white, 320px 60px white, 420px 180px white,
        520px 100px white, 620px 160px white, 720px 70px white, 820px 140px white,
        170px 230px white, 270px 280px white, 370px 200px white, 470px 260px white,
        570px 220px white, 670px 300px white, 770px 240px white, 870px 320px white;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Age Overlay */
.age-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--deep-space);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.age-overlay.hidden {
    display: none;
}

.age-card {
    background: var(--nebula-dark);
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    max-width: 550px;
    border: 2px solid var(--cosmic-purple);
    box-shadow: 0 0 40px var(--glow-color);
    position: relative;
    z-index: 10;
}

.cosmic-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.age-card h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    letter-spacing: 3px;
    color: var(--cosmic-purple);
    text-shadow: 0 0 15px var(--glow-color);
}

.age-message {
    color: var(--cosmic-gray);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.age-sub {
    color: var(--cosmic-gray);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.age-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cosmic-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.cosmic-btn.primary {
    background: linear-gradient(135deg, var(--cosmic-purple), var(--cosmic-blue));
    color: white;
    box-shadow: 0 0 20px var(--glow-color);
}

.cosmic-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 30px var(--glow-color);
}

.cosmic-btn.secondary {
    background: transparent;
    color: var(--cosmic-gray);
    border: 2px solid var(--cosmic-gray);
}

.cosmic-btn.secondary:hover {
    border-color: var(--cosmic-purple);
    color: var(--cosmic-purple);
}

/* Header */
.header {
    background: rgba(15, 7, 33, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(167, 139, 250, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    position: relative;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--cosmic-purple), var(--cosmic-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--cosmic-purple);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.main-nav {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    color: var(--cosmic-gray);
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--cosmic-purple);
}

.nav-link.active {
    color: var(--cosmic-purple);
    text-shadow: 0 0 10px var(--glow-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cosmic-purple), transparent);
}

/* Cosmic Hero */
.cosmic-hero {
    padding: 8rem 0;
    text-align: center;
    position: relative;
    background: linear-gradient(to bottom, var(--deep-space), var(--nebula-dark));
}

.cosmic-hero.small {
    padding: 4rem 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.cosmic-title {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 8px;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--cosmic-purple), var(--cosmic-blue), white);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px var(--glow-color);
}

.cosmic-title.small {
    font-size: 2.5rem;
    letter-spacing: 5px;
}

.cosmic-subtitle {
    font-size: 1.3rem;
    color: var(--cosmic-gray);
    letter-spacing: 3px;
}

/* Sections */
.cosmic-section, .info-section, .game-universe, .features-galaxy, .responsibility-nebula {
    padding: 5rem 0;
    position: relative;
}

.info-section {
    background: var(--nebula-dark);
}

.game-universe {
    background: var(--deep-space);
}

.features-galaxy {
    background: var(--nebula-dark);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: 4px;
    color: var(--cosmic-purple);
    text-shadow: 0 0 20px var(--glow-color);
}

.section-title.glow {
    text-shadow: 0 0 30px var(--glow-color);
}

.intro-box {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(26, 15, 46, 0.6);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.intro-box p {
    color: var(--cosmic-gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* Info Cosmos */
.info-cosmos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.cosmic-card {
    background: var(--deep-space);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(167, 139, 250, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

.cosmic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px var(--glow-color);
    border-color: var(--cosmic-purple);
}

.card-constellation {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
}

.card-constellation .star {
    width: 6px;
    height: 6px;
    background: var(--cosmic-purple);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--glow-color);
}

.card-badge {
    position: absolute;
    top: -15px;
    left: 25px;
    font-size: 3rem;
    font-weight: 700;
    color: var(--cosmic-purple);
    opacity: 0.15;
}

.cosmic-card h3 {
    color: var(--star-white);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.cosmic-card p {
    color: var(--cosmic-gray);
    line-height: 1.7;
}

/* Game Portal */
.game-tagline {
    text-align: center;
    color: var(--cosmic-gray);
    margin-bottom: 3rem;
    letter-spacing: 2px;
}

.game-portal {
    max-width: 950px;
    margin: 0 auto;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid var(--cosmic-purple);
    box-shadow: 0 0 50px var(--glow-color);
}

.game-window {
    width: 100%;
    height: 650px;
    border: none;
    display: block;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-orb {
    background: var(--deep-space);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(167, 139, 250, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

.feature-orb:hover {
    transform: translateY(-5px);
    border-color: var(--cosmic-purple);
    box-shadow: 0 10px 35px var(--glow-color);
}

.orb-glow {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--cosmic-purple), transparent);
    border-radius: 50%;
    opacity: 0.3;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-orb h3 {
    color: var(--star-white);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.feature-orb p {
    color: var(--cosmic-gray);
    line-height: 1.7;
}

/* Play Page Specific */
.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.system-panel {
    background: rgba(26, 15, 46, 0.6);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.system-panel h3 {
    color: var(--cosmic-purple);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.system-panel p {
    color: var(--cosmic-gray);
    line-height: 1.7;
}

.game-fullscreen {
    background: #000;
    padding: 0;
}

.game-portal-full {
    width: 100%;
}

.game-window-full {
    width: 100%;
    height: 750px;
    border: none;
    display: block;
}

.guidelines-space {
    background: var(--nebula-dark);
    padding: 5rem 0;
}

.guideline-constellation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.guideline-star {
    background: var(--deep-space);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(167, 139, 250, 0.3);
    text-align: center;
}

.star-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.guideline-star h3 {
    color: var(--star-white);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.guideline-star p {
    color: var(--cosmic-gray);
    line-height: 1.7;
}

/* Legal Pages */
.legal-cosmos {
    padding: 4rem 0;
    background: var(--deep-space);
}

.legal-document {
    max-width: 1000px;
    margin: 0 auto;
}

.legal-article {
    background: rgba(26, 15, 46, 0.6);
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.legal-article.critical {
    border: 2px solid var(--cosmic-purple);
    box-shadow: 0 0 30px var(--glow-color);
}

.legal-article h2 {
    color: var(--cosmic-purple);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    font-size: 1.5rem;
}

.legal-article p {
    color: var(--cosmic-gray);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.legal-article ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-article li {
    color: var(--cosmic-gray);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Footer */
.cosmic-footer {
    background: var(--nebula-dark);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid rgba(167, 139, 250, 0.3);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-sector h3 {
    color: var(--cosmic-purple);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.footer-sector p {
    color: var(--cosmic-gray);
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--cosmic-gray);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--cosmic-purple);
}

.footer-base {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(167, 139, 250, 0.2);
    color: var(--cosmic-gray);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .menu-btn {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 70px;
        right: -100%;
        background: rgba(15, 7, 33, 0.98);
        flex-direction: column;
        width: 250px;
        padding: 2rem;
        border-left: 1px solid rgba(167, 139, 250, 0.3);
        transition: right 0.3s ease;
        gap: 1.5rem;
        box-shadow: -5px 5px 25px rgba(167, 139, 250, 0.2);
    }

    .main-nav.active {
        right: 0;
    }

    .cosmic-title {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }

    .cosmic-title.small {
        font-size: 2rem;
        letter-spacing: 3px;
    }

    .cosmic-subtitle {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .section-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .age-card {
        padding: 2rem;
        margin: 1rem;
    }

    .age-buttons {
        flex-direction: column;
    }

    .info-cosmos,
    .feature-grid,
    .system-grid,
    .guideline-constellation {
        grid-template-columns: 1fr;
    }

    .game-window {
        height: 450px;
    }

    .game-window-full {
        height: 550px;
    }
}
