/* Galaxyn - Space Cosmic Theme */
/* Font: Exo 2 */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cosmic-purple: #8b5cf6;
    --cosmic-blue: #6366f1;
    --deep-space: #0f0a1a;
    --nebula: #1a0a2e;
    --star-white: #f8fafc;
    --star-dim: #94a3b8;
    --warning: #fbbf24;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--deep-space);
    color: var(--star-white);
    line-height: 1.7;
    min-height: 100vh;
}

/* Age Portal */
.portal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 10, 26, 0.98);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.portal-overlay.hidden {
    display: none;
}

.portal-card {
    background: linear-gradient(135deg, var(--nebula) 0%, var(--deep-space) 100%);
    border: 2px solid var(--cosmic-purple);
    border-radius: 16px;
    padding: 48px 40px;
    max-width: 460px;
    text-align: center;
}

.galaxy-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 28px;
    position: relative;
}

.galaxy-spinner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: var(--cosmic-purple);
    border-radius: 50%;
}

.galaxy-spinner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid transparent;
    border-top-color: var(--cosmic-purple);
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.portal-card h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--cosmic-purple);
}

.portal-card p {
    color: var(--star-dim);
    margin-bottom: 32px;
    line-height: 1.8;
}

.portal-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-warp, .btn-reject {
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-warp {
    background: linear-gradient(135deg, var(--cosmic-purple) 0%, var(--cosmic-blue) 100%);
    color: white;
}

.btn-warp:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.btn-reject {
    background: transparent;
    color: var(--star-dim);
    border: 1px solid var(--star-dim);
}

.btn-reject:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Header */
.galactic-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 10, 26, 0.95);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.header-zone {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.galaxy-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand-symbol {
    width: 44px;
    height: 44px;
    position: relative;
}

.brand-symbol .ring {
    position: absolute;
    inset: 0;
    border: 2px solid var(--cosmic-purple);
    border-radius: 50%;
    transform: rotateX(60deg);
}

.brand-symbol .core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--cosmic-purple);
    border-radius: 50%;
}

.brand-name {
    font-size: 26px;
    font-weight: 700;
    color: var(--star-white);
    letter-spacing: 1px;
}

.mobile-trigger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-trigger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--star-white);
    border-radius: 2px;
    transition: all 0.3s;
}

.galaxy-nav {
    display: flex;
    gap: 4px;
}

.galaxy-nav a {
    color: var(--star-dim);
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.galaxy-nav a:hover, .galaxy-nav a.current {
    color: var(--star-white);
    background: rgba(139, 92, 246, 0.2);
}

/* Hero Nebula */
.hero-nebula {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
}

.stars-layer {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 80% 20%, white, transparent),
        radial-gradient(1px 1px at 40% 70%, white, transparent),
        radial-gradient(2px 2px at 60% 50%, white, transparent),
        radial-gradient(1px 1px at 90% 80%, white, transparent),
        radial-gradient(1px 1px at 10% 60%, white, transparent);
    opacity: 0.5;
}

.hero-text {
    max-width: 700px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: clamp(40px, 8vw, 64px);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.15;
    background: linear-gradient(135deg, var(--star-white) 0%, var(--cosmic-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 18px;
    color: var(--star-dim);
    margin-bottom: 40px;
    line-height: 1.9;
}

.warp-btn {
    display: inline-block;
    padding: 18px 48px;
    background: linear-gradient(135deg, var(--cosmic-purple) 0%, var(--cosmic-blue) 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-radius: 50px;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.warp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5);
}

/* Transmission Section */
.transmission {
    padding: 100px 24px;
    background: var(--nebula);
}

.transmission-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.signal-box {
    background: var(--deep-space);
    padding: 40px 32px;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: border-color 0.3s;
}

.signal-box:hover {
    border-color: var(--cosmic-purple);
}

.signal-icon {
    font-size: 42px;
    margin-bottom: 20px;
}

.signal-box h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 14px;
}

.signal-box p {
    color: var(--star-dim);
    line-height: 1.8;
}

/* Command Center */
.command-center {
    padding: 100px 24px;
}

.center-inner {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.center-inner h2 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 12px;
}

.center-desc {
    color: var(--star-dim);
    font-size: 18px;
    margin-bottom: 48px;
}

.game-viewport {
    aspect-ratio: 16/10;
    border: 3px solid var(--cosmic-purple);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.25);
}

.game-viewport iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* About Station */
.about-station {
    padding: 100px 24px;
    background: var(--nebula);
}

.station-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.station-info h2 {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 24px;
}

.station-info p {
    color: var(--star-dim);
    margin-bottom: 18px;
    line-height: 1.9;
}

.station-specs {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.spec {
    background: var(--deep-space);
    padding: 24px;
    border-radius: 12px;
    border-left: 3px solid var(--cosmic-purple);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cosmic-purple);
    font-weight: 600;
}

.spec-value {
    font-size: 18px;
    font-weight: 500;
}

/* Data Logs */
.data-logs {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.log-entry {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.log-entry h3 {
    font-size: 20px;
    margin-bottom: 14px;
}

.log-entry p {
    color: var(--star-dim);
    font-size: 15px;
    line-height: 1.8;
}

/* Play Area */
.play-area {
    padding-top: 80px;
}

.play-header {
    padding: 60px 24px 40px;
    text-align: center;
}

.play-header h1 {
    font-size: 44px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--star-white) 0%, var(--cosmic-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.play-header p {
    color: var(--star-dim);
    font-size: 18px;
}

.game-deck {
    padding: 24px;
}

.deck-frame {
    max-width: 1100px;
    margin: 0 auto;
    aspect-ratio: 16/10;
    border: 3px solid var(--cosmic-purple);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(139, 92, 246, 0.3);
}

.deck-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.control-info {
    padding: 60px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.info-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.info-panel {
    background: var(--nebula);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.info-panel h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.info-panel p {
    color: var(--star-dim);
    font-size: 15px;
    line-height: 1.7;
}

.station-alert {
    padding: 24px 24px 80px;
    max-width: 700px;
    margin: 0 auto;
}

.alert-content {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid var(--warning);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
}

.alert-content h3 {
    color: var(--warning);
    margin-bottom: 12px;
}

.alert-content p {
    color: var(--star-dim);
    line-height: 1.8;
}

/* Document Zone */
.document-zone {
    padding: 120px 24px 80px;
}

.document-content {
    max-width: 780px;
    margin: 0 auto;
}

.document-content h1 {
    font-size: 44px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--star-white) 0%, var(--cosmic-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.document-date {
    color: var(--star-dim);
    margin-bottom: 48px;
}

.document-section {
    margin-bottom: 40px;
}

.document-section.priority {
    background: var(--nebula);
    padding: 32px;
    border-radius: 12px;
    border-left: 4px solid var(--cosmic-purple);
}

.document-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
}

.document-section p {
    color: var(--star-dim);
    line-height: 1.9;
    margin-bottom: 14px;
}

.document-section ul {
    color: var(--star-dim);
    margin-left: 24px;
    line-height: 2;
}

/* Footer */
.station-footer {
    background: var(--nebula);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 48px;
}

.footer-name {
    font-size: 26px;
    font-weight: 700;
    display: block;
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--star-dim);
    font-size: 15px;
    line-height: 1.7;
}

.footer-navigation h4, .footer-support h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: var(--cosmic-purple);
}

.footer-navigation a, .footer-support a {
    display: block;
    color: var(--star-dim);
    text-decoration: none;
    padding: 8px 0;
    font-size: 15px;
    transition: color 0.3s;
}

.footer-navigation a:hover, .footer-support a:hover {
    color: var(--cosmic-purple);
}

.footer-signal {
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    padding: 24px;
    text-align: center;
}

.footer-signal p {
    color: var(--star-dim);
    font-size: 14px;
}

/* Mobile */
@media (max-width: 768px) {
    .mobile-trigger {
        display: flex;
    }

    .galaxy-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--nebula);
        flex-direction: column;
        padding: 20px;
        gap: 4px;
        display: none;
        border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    }

    .galaxy-nav.open {
        display: flex;
    }

    .galaxy-nav a {
        padding: 14px 16px;
    }

    .station-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .game-viewport, .deck-frame {
        aspect-ratio: 4/3;
    }

    .portal-card {
        padding: 36px 28px;
    }
}
