@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color System */
    --space-black: #05070D;
    --deep-nebula: #0B1323;
    --glass-panel: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Accent Colors */
    --cosmic-blue: #3B82F6;
    --nebula-purple: #7C3AED;
    --stellar-gold: #F5C542;
    --white-star-glow: #EAF4FF;
    
    /* Text Colors */
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;

    /* Layout */
    --max-width: 1280px;
    --radius-glass: 24px;
    --radius-btn: 16px;
    
    /* Spacing */
    --spacing-desktop: 120px;
    --spacing-tablet: 80px;
    --spacing-mobile: 60px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--space-black);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 50% 0%, var(--deep-nebula) 0%, var(--space-black) 100%);
    background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 400;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.subtitle {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.875rem;
    color: var(--cosmic-blue);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--cosmic-blue);
}

/* Layout Utilities */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

section {
    padding: var(--spacing-desktop) 0;
}

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

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cosmic-blue), var(--stellar-gold));
    color: var(--space-black);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 197, 66, 0.3);
    color: var(--space-black);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-outline:hover {
    background: var(--glass-panel);
    border-color: var(--cosmic-blue);
    color: var(--white-star-glow);
    transform: translateY(-2px);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: all 0.4s ease;
}

header.scrolled {
    background: rgba(5, 7, 13, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 16px 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--white-star-glow);
}

.logo img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background-image: url('images/deep-space-nebula-hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5,7,13,0.3) 0%, rgba(5,7,13,0.8) 70%, var(--space-black) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    grid-column: 2 / 12;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

/* Glass Card / Game Section */
.glass-panel {
    background: var(--glass-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-glass);
    padding: 48px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

.glass-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.1);
}

.game-section {
    position: relative;
    z-index: 5;
    margin-top: -80px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.game-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: var(--deep-nebula);
    border: 1px solid var(--glass-border);
    position: relative;
}

.game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.feature-card {
    padding: 32px 24px;
    text-align: center;
    height: 100%;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--cosmic-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.feature-card p {
    font-size: 0.9375rem;
    margin-bottom: 0;
}

/* About Section */
.about-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-image {
    border-radius: var(--radius-glass);
    overflow: hidden;
    position: relative;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 10s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-glass);
    pointer-events: none;
}

/* Inner Page Header */
.page-hero {
    padding: 160px 0 80px;
    background-image: url('images/spiral-galaxy-page-header-bg.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5,7,13,0.7) 0%, var(--space-black) 100%);
    z-index: 1;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

/* Content Sections (Legal & Standard pages) */
.content-section {
    padding: 80px 0;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.content-wrapper h2 {
    margin-top: 40px;
    margin-bottom: 24px;
    font-size: 1.75rem;
}

.content-wrapper ul {
    margin-bottom: 24px;
    padding-left: 24px;
    color: var(--text-secondary);
}

.content-wrapper li {
    margin-bottom: 12px;
}

/* Form Styles */
.contact-form {
    display: grid;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--cosmic-blue);
    background: rgba(255, 255, 255, 0.06);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: var(--deep-nebula);
    border-top: 1px solid var(--glass-border);
    padding: 80px 0 40px;
    position: relative;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 64px;
    margin-bottom: 64px;
}

.footer-brand p {
    margin-top: 24px;
    max-width: 400px;
}

.footer-title {
    color: var(--white-star-glow);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 16px;
}

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

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

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.disclaimer-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    display: inline-block;
    max-width: 800px;
}

.disclaimer-box p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 7, 13, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--deep-nebula);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-glass);
    padding: 48px;
    max-width: 600px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--white-star-glow);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

/* Responsive */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-desktop: var(--spacing-tablet);
    }
    
    .nav-links, .header-cta {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .about-split {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .game-controls .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-desktop: var(--spacing-mobile);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .glass-panel {
        padding: 24px;
    }
}