@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --indigo: #6366f1;
    --blue: #3b82f6;
    --violet: #8b5cf6;
    --space-dark: #030712;
    --space-mid: #0f172a;
    --nebula: #1e1b4b;
    --star-white: #f8fafc;
    --text-muted: #cbd5e1;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    background: var(--space-dark);
    color: var(--star-white);
    line-height: 1.7;
}

.space-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.space-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-orb {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--indigo), var(--violet));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.logo-word {
    font-size: 1.7rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--indigo), var(--violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.space-nav {
    display: flex;
    gap: 2.5rem;
}

.space-nav a {
    color: var(--star-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.space-nav a:hover {
    color: var(--indigo);
}

.orbit-menu {
    display: none;
    cursor: pointer;
    padding: 8px;
}

.orbit-menu span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--indigo);
    margin: 5px 0;
    border-radius: 2px;
}

.mobile-orbit {
    display: none;
    position: fixed;
    top: 78px;
    left: 0;
    right: 0;
    background: var(--space-mid);
    padding: 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
}

.mobile-orbit.open {
    display: block;
}

.mobile-orbit a {
    display: block;
    color: var(--star-white);
    text-decoration: none;
    padding: 1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.cosmos-body {
    padding-top: 85px;
}

.galaxy-hero {
    background: linear-gradient(135deg, var(--nebula) 0%, var(--indigo) 50%, var(--blue) 100%);
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.galaxy-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(white 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
}

.galaxy-hero h1 {
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

.hero-blurb {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.signal-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.signal-badge {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.sector {
    padding: 4rem 2rem;
}

.sector-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--indigo);
    margin-bottom: 1.5rem;
}

.viewport {
    background: var(--space-mid);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.1);
}

.game-viewport {
    width: 100%;
    height: 580px;
    border: none;
    border-radius: 12px;
}

.station-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.station-card {
    background: var(--space-mid);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: transform 0.3s, border-color 0.3s;
}

.station-card:hover {
    transform: translateY(-5px);
    border-color: var(--indigo);
}

.station-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.station-card h3 {
    color: var(--violet);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.station-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.transmission {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.transmission h2 {
    color: var(--indigo);
    margin-bottom: 1rem;
}

.transmission p {
    color: var(--text-muted);
}

.systems-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.system-item {
    background: var(--space-mid);
    padding: 1.25rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.system-icon {
    color: var(--indigo);
    font-size: 1.3rem;
}

.dock-footer {
    background: var(--space-mid);
    padding: 3rem 2rem;
    border-top: 2px solid rgba(99, 102, 241, 0.3);
}

.dock-center {
    text-align: center;
}

.beacon-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.beacon-links a {
    color: var(--indigo);
    text-decoration: none;
    font-weight: 600;
}

.beacon-links a:hover {
    text-decoration: underline;
}

.dock-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.airlock {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.airlock-panel {
    background: var(--space-mid);
    border: 2px solid var(--indigo);
    border-radius: 20px;
    padding: 3rem;
    max-width: 480px;
    margin: 1rem;
    text-align: center;
    box-shadow: 0 0 50px rgba(99, 102, 241, 0.3);
}

.airlock-symbol {
    font-size: 4.5rem;
    margin-bottom: 1rem;
}

.airlock-panel h2 {
    color: var(--indigo);
    margin-bottom: 1rem;
    font-weight: 800;
}

.airlock-panel p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.airlock-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.airlock-btn {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 50px;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.airlock-btn:hover {
    transform: scale(1.05);
}

.airlock-btn.enter {
    background: linear-gradient(135deg, var(--indigo), var(--violet));
    color: white;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.airlock-btn.exit {
    background: transparent;
    border: 2px solid var(--indigo);
    color: var(--indigo);
}

.sector-header {
    background: linear-gradient(135deg, var(--nebula), var(--indigo));
    padding: 4rem 2rem;
    text-align: center;
}

.sector-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
}

.log-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.log-entry {
    background: var(--space-mid);
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--indigo);
}

.log-entry h2 {
    color: var(--violet);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.log-entry p {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.log-entry ul {
    color: var(--text-muted);
    margin: 1rem 0 1rem 1.5rem;
}

.log-entry li {
    margin-bottom: 0.4rem;
}

@media (max-width: 1024px) {
    .station-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .systems-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .space-nav {
        display: none;
    }

    .orbit-menu {
        display: block;
    }

    .galaxy-hero h1 {
        font-size: 2rem;
    }

    .station-grid {
        grid-template-columns: 1fr;
    }

    .systems-list {
        grid-template-columns: 1fr;
    }

    .game-viewport {
        height: 400px;
    }

    .airlock-controls {
        flex-direction: column;
    }
}
