﻿@import 'reset.css';

/* ---------- Theme Tokens ---------- */
:root {
    --color-page-bg: #05060d;
    --color-page-gradient: radial-gradient(140% 120% at 50% -10%, rgba(56, 189, 248, 0.22) 0%, rgba(15, 118, 110, 0.08) 28%, rgba(5, 6, 13, 0.96) 100%);
    --color-surface: rgba(15, 23, 42, 0.92);
    --color-surface-alt: rgba(30, 41, 59, 0.85);
    --color-surface-muted: rgba(15, 23, 42, 0.72);
    --color-border: rgba(148, 163, 184, 0.18);
    --color-border-strong: rgba(94, 234, 212, 0.35);
    --color-text: #e2e8f0;
    --color-text-muted: rgba(148, 163, 184, 0.85);
    --color-heading: #f8fafc;
    --color-primary: #38bdf8;
    --color-primary-strong: #0ea5e9;
    --color-primary-soft: rgba(56, 189, 248, 0.14);
    --color-accent: #f97316;
    --color-success: #34d399;
    --color-success-soft: rgba(52, 211, 153, 0.16);
    --color-warning: #facc15;
    --color-warning-soft: rgba(250, 204, 21, 0.16);
    --color-error: #f87171;
    --color-error-soft: rgba(248, 113, 113, 0.18);
    --shadow-xl: 0 24px 90px rgba(3, 7, 18, 0.52);
    --shadow-lg: 0 18px 60px rgba(7, 12, 31, 0.38);
    --shadow-sm: 0 10px 30px rgba(8, 15, 31, 0.28);
    --radius-xl: 32px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --transition-base: 180ms ease;
    font-size: 16px;
}

/* ---------- Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--color-page-bg);
    color: var(--color-text);
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    font-size: clamp(15px, 0.95vw, 16px);
    line-height: 1.6;
    letter-spacing: 0.015em;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -4;
    background: var(--color-page-gradient);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -3;
    background-image: radial-gradient(rgba(148, 163, 184, 0.14) 1px, transparent 0);
    background-size: 90px 90px;
    opacity: 0.35;
    mix-blend-mode: screen;
}

/* ---------- Cosmic Scene ---------- */
.space-scene {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    mix-blend-mode: normal;
    background: radial-gradient(120% 120% at 50% 45%, rgba(13, 17, 34, 0.92) 0%, rgba(4, 6, 15, 0.98) 55%, rgba(2, 4, 9, 1) 100%);
}

.galaxy-layer {
    position: absolute;
    left: 50%;
    top: 48%;
    width: 120vmax;
    height: 120vmax;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: 0.75;
    filter: blur(0.2vmax);
    mix-blend-mode: screen;
}

.galaxy-core {
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.32) 0%, rgba(148, 197, 255, 0.18) 23%, rgba(56, 105, 255, 0.12) 45%, rgba(56, 33, 143, 0.08) 62%, transparent 80%);
    box-shadow: 0 0 120px rgba(56, 189, 248, 0.28), 0 0 240px rgba(37, 99, 235, 0.18);
    animation: galaxyPulse 22s ease-in-out infinite;
}

.galaxy-halo {
    background: radial-gradient(circle at center, rgba(236, 72, 153, 0.16) 0%, rgba(59, 130, 246, 0.12) 32%, rgba(14, 165, 233, 0.08) 48%, transparent 72%);
    animation: galaxyRotate 120s linear infinite;
}

.starfield {
    position: absolute;
    inset: -15%;
    opacity: 0.7;
    background-image:
        radial-gradient(1px 1px at 17% 23%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0)),
        radial-gradient(1.4px 1.4px at 62% 41%, rgba(148, 197, 255, 0.76), rgba(148, 197, 255, 0)),
        radial-gradient(1px 1px at 84% 73%, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0)),
        radial-gradient(0.9px 0.9px at 33% 68%, rgba(186, 230, 253, 0.75), rgba(186, 230, 253, 0)),
        radial-gradient(1.2px 1.2px at 78% 18%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
    background-size: 160px 160px, 240px 220px, 320px 300px, 420px 360px, 560px 520px;
    background-repeat: repeat;
    animation: starDrift 95s linear infinite;
    mix-blend-mode: screen;
}

.starfield::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.2px 1.2px at 12% 68%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)),
        radial-gradient(1px 1px at 78% 44%, rgba(148, 197, 255, 0.6), rgba(148, 197, 255, 0)),
        radial-gradient(0.8px 0.8px at 54% 12%, rgba(236, 72, 153, 0.35), rgba(236, 72, 153, 0)),
        radial-gradient(1px 1px at 36% 84%, rgba(148, 233, 255, 0.6), rgba(148, 233, 255, 0));
    background-size: 180px 170px, 260px 260px, 340px 300px, 520px 480px;
    background-repeat: repeat;
    opacity: 0.55;
    animation: starDrift 120s linear infinite reverse;
}

.spaceship {
    position: absolute;
    width: 140px;
    height: 56px;
    pointer-events: none;
    opacity: 0;
    transform-origin: 30% 50%;
    filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.45));
}

.spaceship:not(.ship-frigate-blue):not(.ship-frigate-red)::before {
    content: '';
    position: absolute;
    inset: 12px 24px;
    border-radius: 48% 52% 46% 50% / 60% 58% 42% 40%;
    background: linear-gradient(90deg, rgba(12, 22, 64, 0.85) 0%, rgba(37, 99, 235, 0.88) 48%, rgba(148, 197, 255, 0.92) 70%, rgba(255, 255, 255, 0.9) 100%);
    box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.4), 0 0 18px rgba(56, 189, 248, 0.28);
}

.spaceship:not(.ship-frigate-blue):not(.ship-frigate-red)::after {
    content: '';
    position: absolute;
    right: -24px;
    top: 50%;
    width: 30px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 12% 50%, rgba(255, 199, 94, 0.85) 0%, rgba(249, 115, 22, 0.2) 70%, rgba(249, 115, 22, 0) 100%);
    transform: translateY(-50%);
    filter: blur(1px);
    animation: thrusterPulse 1.3s ease-in-out infinite;
}

.spaceship .laser-beam,
.spaceship .laser-impact {
    position: absolute;
    pointer-events: none;
}

.laser-beam {
    top: 48%;
    left: 60%;
    width: 320px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(56, 189, 248, 0.75) 25%, rgba(14, 165, 233, 0.95) 60%, rgba(236, 72, 153, 0.7) 100%);
    box-shadow: 0 0 18px rgba(14, 165, 233, 0.5);
    transform-origin: 0% 50%;
    transform: scaleX(0.1);
    opacity: 0;
    animation: laserFire 2.8s ease-in-out infinite, laserGlow 2.8s linear infinite;
}

.laser-beam::after {
    content: '';
    position: absolute;
    left: -24px;
    top: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(186, 230, 253, 0.9) 0%, rgba(186, 230, 253, 0) 70%);
    transform: translateY(-50%);
    opacity: 0.75;
}

.laser-beam.laser-offset {
    top: 56%;
    animation-delay: 1.4s, 1.4s;
}

.ship-bravo .laser-beam {
    left: auto;
    right: 58%;
    width: 280px;
    transform-origin: 100% 50%;
    background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(251, 191, 36, 0.8) 35%, rgba(248, 113, 113, 0.9) 100%);
    animation-delay: 0.8s, 0.8s;
}

.ship-bravo .laser-beam::after {
    left: auto;
    right: -24px;
}

.laser-impact {
    top: 42%;
    left: 32%;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(251, 191, 36, 0.75) 38%, rgba(248, 113, 113, 0.45) 70%, rgba(248, 113, 113, 0) 85%);
    transform: scale(0.5);
    animation: impactFlash 1.6s ease-in-out infinite;
    filter: blur(0.3px);
}

.ship-alpha {
    top: 18%;
    left: -20%;
    animation: shipAlpha 34s linear infinite;
}

.ship-bravo {
    bottom: 18%;
    right: -18%;
    animation: shipBravo 38s linear infinite;
}

.ship-bravo::after {
    left: -24px;
    right: auto;
    background: radial-gradient(circle at 88% 50%, rgba(255, 199, 94, 0.85) 0%, rgba(249, 115, 22, 0.2) 70%, rgba(249, 115, 22, 0) 100%);
}

.ship-charlie {
    top: 38%;
    right: 12%;
    transform-origin: 50% 50%;
    animation: shipCharlie 16s ease-in-out infinite;
}

.ship-charlie::before {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(59, 130, 246, 0.78) 45%, rgba(129, 140, 248, 0.82) 70%, rgba(248, 250, 252, 0.88) 100%);
}

.ship-charlie::after {
    width: 38px;
    height: 16px;
    right: -18px;
    background: radial-gradient(circle at 12% 50%, rgba(249, 168, 212, 0.85) 0%, rgba(236, 72, 153, 0.25) 70%, rgba(236, 72, 153, 0) 100%);
    animation-duration: 1.05s;
}

.ship-charlie .laser-impact {
    left: -18%;
    top: 46%;
}


.spaceship img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 28px rgba(15, 23, 42, 0.65));
}

.ship-frigate-blue,
.ship-frigate-red {
    width: clamp(280px, 28vw, 520px);
    aspect-ratio: 3.2 / 1;
    height: auto;
    opacity: 0;
    transform-origin: 28% 52%;
    filter: drop-shadow(0 0 32px rgba(15, 23, 42, 0.55));
}

.ship-frigate-blue img {
    filter: drop-shadow(0 0 28px rgba(37, 99, 235, 0.35));
}

.ship-frigate-red img {
    filter: drop-shadow(0 0 32px rgba(249, 115, 22, 0.35));
}

.ship-frigate-blue {
    top: 28%;
    left: -38%;
    animation: shipFrigateBlue 48s linear infinite;
}

.ship-frigate-red {
    bottom: 24%;
    right: -36%;
    animation: shipFrigateRed 52s linear infinite;
}

.thruster-glow {
    position: absolute;
    width: clamp(68px, 9vw, 160px);
    height: clamp(42px, 6vw, 110px);
    transform: translateY(-50%);
    pointer-events: none;
    filter: blur(10px);
    opacity: 0.75;
}

.thruster-glow::before,
.thruster-glow::after {
    content: '';
    position: absolute;
    right: 0;
    width: clamp(28px, 3.4vw, 62px);
    height: clamp(28px, 3.4vw, 62px);
    border-radius: 50%;
    opacity: 0.85;
    filter: blur(6px);
}

.thruster-glow::before {
    top: 18%;
}

.thruster-glow::after {
    bottom: 12%;
}

.ship-frigate-blue .thruster-glow{
	top: 40%;
}
.ship-frigate-red .thruster-glow{
	top: 44%;
    right: clamp(36px, 10vw, 48px);
}
.thruster-blue::before,
.thruster-blue::after {
    background: radial-gradient(circle, rgba(125, 211, 252, 0.95) 0%, rgba(14, 165, 233, 0.4) 55%, rgba(14, 165, 233, 0) 100%);
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.5), 0 0 42px rgba(56, 189, 248, 0.35);
    animation: thrusterBlue 1.4s ease-in-out infinite alternate;
}

.thruster-red::before,
.thruster-red::after {
    background: radial-gradient(circle, rgba(252, 211, 77, 0.95) 0%, rgba(239, 68, 68, 0.4) 55%, rgba(239, 68, 68, 0) 100%);
    box-shadow: 0 0 24px rgba(248, 113, 113, 0.5), 0 0 44px rgba(248, 113, 113, 0.35);
    animation: thrusterRed 1.6s ease-in-out infinite alternate;
}

.thruster-blue::after {
    animation-delay: 0.18s;
}

.thruster-red::after {
    animation-delay: 0.22s;
}

@keyframes starDrift {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(-4%, -2%, 0) scale(1.02);
    }
    100% {
        transform: translate3d(-8%, -4%, 0) scale(1.04);
    }
}

@keyframes galaxyPulse {
    0% {
        opacity: 0.55;
        filter: saturate(110%) brightness(0.9);
    }
    45% {
        opacity: 0.85;
        filter: saturate(135%) brightness(1.05);
    }
    100% {
        opacity: 0.6;
        filter: saturate(120%) brightness(0.92);
    }
}

@keyframes galaxyRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) rotate(120deg) scale(1.04);
    }
    100% {
        transform: translate(-50%, -50%) rotate(240deg) scale(1);
    }
}

@keyframes shipAlpha {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) rotate(-10deg) scale(0.82);
    }
    8% {
        opacity: 1;
    }
    55% {
        transform: translate3d(150vw, 6vh, 0) rotate(-4deg) scale(0.92);
    }
    82% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(210vw, -4vh, 0) rotate(-12deg) scale(0.78);
    }
}

@keyframes shipBravo {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) rotate(12deg) scale(0.8);
    }
    12% {
        opacity: 1;
    }
    58% {
        transform: translate3d(-160vw, -5vh, 0) rotate(6deg) scale(0.9);
    }
    88% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(-220vw, 3vh, 0) rotate(6deg) scale(0.76);
    }
}

@keyframes shipCharlie {
    0% {
        transform: translate3d(0, 0, 0) rotate(-2deg) scale(0.95);
    }
    50% {
        transform: translate3d(-1.6vw, -1.2vh, 0) rotate(1deg) scale(1);
    }
    100% {
        transform: translate3d(0.6vw, 1vh, 0) rotate(-3deg) scale(0.93);
    }
}


@keyframes shipFrigateBlue {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) rotate(-6deg) scale(0.88);
    }
    8% {
        opacity: 1;
    }
    55% {
        transform: translate3d(165vw, -10vh, 0) rotate(-2deg) scale(0.98);
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(230vw, -16vh, 0) rotate(-4deg) scale(0.85);
    }
}

@keyframes shipFrigateRed {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) rotate(8deg) scale(0.9);
    }
    10% {
        opacity: 1;
    }
    60% {
        transform: translate3d(-165vw, 8vh, 0) rotate(3deg) scale(1.02);
    }
    92% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(-230vw, 14vh, 0) rotate(5deg) scale(0.86);
    }
}

@keyframes thrusterBlue {
    0%,
    100% {
        opacity: 0.65;
        transform: scale(0.88);
    }
    40% {
        opacity: 1;
        transform: scale(1.16);
    }
    70% {
        opacity: 0.82;
        transform: scale(0.96);
    }
}

@keyframes thrusterRed {
    0%,
    100% {
        opacity: 0.72;
        transform: scale(0.9);
    }
    45% {
        opacity: 1;
        transform: scale(1.2);
    }
    78% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

@keyframes laserFire {
    0% {
        transform: scaleX(0);
        opacity: 0;
    }
    12% {
        transform: scaleX(1);
        opacity: 1;
    }
    55% {
        transform: scaleX(0.94);
        opacity: 1;
    }
    100% {
        transform: scaleX(0);
        opacity: 0;
    }
}

@keyframes laserGlow {
    0%,
    100% {
        box-shadow: 0 0 12px rgba(14, 165, 233, 0.35);
    }
    45% {
        box-shadow: 0 0 22px rgba(236, 72, 153, 0.62);
    }
}

@keyframes impactFlash {
    0%,
    100% {
        opacity: 0;
        transform: scale(0.4);
    }
    30% {
        opacity: 0.95;
        transform: scale(1);
    }
    60% {
        opacity: 0.6;
        transform: scale(0.75);
    }
}

@keyframes thrusterPulse {
    0%,
    100% {
        opacity: 0.35;
        transform: translateY(-50%) scaleX(1);
    }
    50% {
        opacity: 0.85;
        transform: translateY(-50%) scaleX(1.4);
    }
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-base), text-shadow var(--transition-base);
}

a:hover {
    color: var(--color-primary-strong);
    text-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
    border-radius: 6px;
}

h1, h2, h3 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    color: var(--color-heading);
    line-height: 1.25;
    margin: 0 0 0.75rem;
}

h1 {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
}

h2 {
    font-size: clamp(1.45rem, 2.6vw, 2.1rem);
}

h3 {
    font-size: clamp(1.2rem, 2.1vw, 1.6rem);
}

p {
    margin: 0.75rem 0;
}

p.center {
    text-align: center;
}

p.submit {
    margin-top: 1.5rem;
    text-align: center;
}

ul, ol {
    margin: 0.85rem 0 0.85rem 1.4rem;
    padding: 0;
}

li {
    margin: 0.4rem 0;
}

hr {
    border: none;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    margin: 2rem 0;
}

.clearer {
    display: block;
    clear: both;
    height: 0;
}

.button,
input.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.9rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-strong) 100%);
    color: #0b1120;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 14px 35px rgba(14, 165, 233, 0.35);
    transition: transform var(--transition-base), box-shadow var(--transition-base), filter var(--transition-base);
}

.button:hover,
input.button:hover,
button.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(14, 165, 233, 0.45);
    filter: brightness(1.05);
}

.button:focus-visible,
input.button:focus-visible,
button.button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

.button.is-ghost {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary-soft);
    box-shadow: none;
}


.button.is-compact {
    padding: 0.5rem 1rem;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
}

/* ---------- Layout ---------- */
#page {
    position: relative;
    max-width: min(1120px, 92vw);
    margin: clamp(32px, 5vw, 72px) auto;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.94) 0%, rgba(10, 13, 25, 0.95) 55%, rgba(7, 10, 23, 0.97) 100%);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    backdrop-filter: blur(18px);
}

#header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(130deg, rgba(15, 23, 42, 0.92) 0%, rgba(8, 47, 73, 0.8) 45%, rgba(15, 23, 42, 0.9) 100%), url("/assets/header.jpg") center/cover no-repeat;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

#header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(14, 165, 233, 0.22) 0%, rgba(129, 140, 248, 0.16) 36%, rgba(2, 6, 23, 0.75) 100%);
    mix-blend-mode: screen;
    opacity: 0.55;
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
    grid-template-areas:
        "brand auth"
        "nav nav";
    gap: clamp(20px, 4vw, 40px);
    padding: clamp(32px, 6vw, 64px);
    align-items: start;
}

.brand-block {
    grid-area: brand;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 440px;
}

.brand-logo {
    display: inline-flex;
    flex-direction: column;
    gap: 0.35rem;
    text-decoration: none;
    color: var(--color-heading);
}

.brand-logo .brand-mark {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(2.1rem, 5vw, 3rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-logo .brand-highlight {
    font-size: 0.85rem;
    letter-spacing: 0.52em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.7);
}

.brand-subtitle {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.98rem;
    max-width: 40ch;
}

.primary-nav {
    grid-area: nav;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(8, 15, 31, 0.55);
    padding: 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(14px);
}

.primary-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text);
    border: 1px solid transparent;
    transition: all var(--transition-base);
}

.primary-nav a:hover {
    color: var(--color-heading);
    background: var(--color-primary-soft);
    border-color: rgba(56, 189, 248, 0.3);
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.primary-nav a.cta {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18) 0%, rgba(56, 189, 248, 0.18) 100%);
    border-color: rgba(249, 115, 22, 0.38);
    color: var(--color-heading);
}

.primary-nav a.cta:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.26) 0%, rgba(56, 189, 248, 0.26) 100%);
    border-color: var(--color-accent);
}

.auth-stack {
    grid-area: auth;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    justify-self: end;
    width: min(320px, 100%);
}

.auth-card {
    background: var(--color-surface-alt);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: var(--shadow-sm);
    padding: clamp(20px, 3vw, 28px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
}

.form-meta .lostpassword {
    font-size: 0.78rem;
    color: var(--color-primary);
}

.form-alert {
    font-size: 0.82rem;
    color: var(--color-error);
    background: var(--color-error-soft);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.form-alert:empty {
    display: none;
    padding: 0;
    border: 0;
}

.form-alert span {
    display: block;
}

.form-logged .status {
    margin: 0;
    font-size: 0.95rem;
}

.form-logged .status.muted {
    color: var(--color-text-muted);
}

.form-logged .username {
    color: var(--color-heading);
    font-weight: 600;
}

.logged-links {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.logged-links a {
    color: var(--color-primary);
    font-weight: 500;
}


.server-switcher {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.server-switcher label {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.server-switcher-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.server-switcher select {
    flex: 1;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.55);
    color: var(--color-heading);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.server-switcher select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.logged-links-empty {
    margin: 0;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}


.header-ad {
    position: relative;
    z-index: 1;
    padding: 0 clamp(24px, 6vw, 48px) clamp(28px, 6vw, 48px);
    display: flex;
    justify-content: center;
}

.hz-ad {
    width: 100%;
    background: rgba(8, 15, 31, 0.55);
    border-radius: var(--radius-md);
    border: 1px dashed rgba(148, 163, 184, 0.24);
    padding: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.06);
}

#content {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: clamp(20px, 4vw, 40px);
    padding: clamp(32px, 5vw, 56px);
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.08) 0%, rgba(15, 23, 42, 0.68) 100%);
}

#content .main {
    flex: 1 1 520px;
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 3vw, 32px);
}

#content .rightad {
    flex: 0 0 220px;
    align-self: stretch;
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.16);
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: center;
    align-items: center;
}

#content .rightad script {
    display: block;
}

div.header {
    margin-top: clamp(18px, 3.5vw, 32px);
    font-size: 0.9rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

div.header.first {
    margin-top: 0;
}

/* ---------- Cards & Modules ---------- */
.news,
.panel,
.module,
.box,
fieldset,
#awards,
#banners {
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.16);
    padding: clamp(20px, 3vw, 28px);
    box-shadow: var(--shadow-sm);
}

.news ul {
    margin: 0.75rem 0 0.75rem 1.2rem;
}

.news li::marker {
    color: var(--color-primary);
}

#register,
#account-options {
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 3vw, 32px);
}

fieldset {
    margin: 0;
}

fieldset > div {
    margin-top: 0.75rem;
}

legend {
    margin: 0 0 0 12px;
    padding: 0 14px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    background: rgba(5, 10, 26, 0.85);
    border-radius: 999px;
}

legend.error {
    color: var(--color-error);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
    overflow: hidden;
}

th {
    text-align: left;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding: 0.85rem 1rem;
    background: rgba(148, 163, 184, 0.08);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

td {
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

tr:nth-child(even) td {
    background: rgba(148, 163, 184, 0.05);
}

fieldset table {
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

fieldset table td {
    border-top: none;
    padding: 0.5rem 0;
}

fieldset table tr:nth-child(even) td {
    background: transparent;
}

fieldset table td:first-child {
    width: 40%;
    text-align: right;
    padding-right: 1.2rem;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

fieldset table td:last-child {
    width: 60%;
}

input,
select,
textarea {
    font: inherit;
    color: var(--color-text);
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    transition: border var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
    outline: none;
    background: rgba(15, 23, 42, 0.85);
}

textarea {
    min-height: 140px;
    resize: vertical;
}

.logininput,
.registerinput {
    width: 100%;
}

.checkbox,
.radio,
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    height: auto;
    margin-right: 0.5rem;
    accent-color: var(--color-primary);
    cursor: pointer;
    background: transparent;
    border: none;
}

.warning {
    color: var(--color-warning);
}

p.warning,
div.warning {
    background: var(--color-warning-soft);
    border: 1px solid rgba(250, 204, 21, 0.35);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
}

.success {
    color: var(--color-success);
}

p.success,
div.success {
    background: var(--color-success-soft);
    border: 1px solid rgba(52, 211, 153, 0.4);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
}

.error {
    color: var(--color-error);
}

p.error,
div.error {
    background: var(--color-error-soft);
    border: 1px solid rgba(248, 113, 113, 0.45);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
}

/* ---------- Countdown ---------- */
.countdown-container {
    background: rgba(8, 15, 31, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: var(--radius-lg);
    padding: clamp(22px, 4vw, 32px);
    text-align: center;
    max-width: 540px;
    margin: clamp(20px, 4vw, 36px) auto;
    box-shadow: 0 14px 45px rgba(14, 165, 233, 0.25);
}

.countdown-container h1 {
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    color: var(--color-heading);
    margin-bottom: 1.5rem;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.countdown div {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.85rem 0.75rem;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.08);
}

.countdown .number {
    display: block;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-primary);
}

.countdown .label {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* ---------- Footer ---------- */
#footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: clamp(24px, 3.5vw, 36px);
    background: rgba(8, 12, 24, 0.82);
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

#footer .button {
    margin-right: 0.5rem;
}

#footer .copyright,
#footer .links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    color: var(--color-text-muted);
    font-size: 0.82rem;
}

#footer .links a {
    color: var(--color-text-muted);
    transition: color var(--transition-base), text-shadow var(--transition-base);
}

#footer .links a:hover {
    color: var(--color-primary);
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.45);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    #page {
        margin: clamp(24px, 5vw, 48px) auto;
    }

    .header-content {
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "auth"
            "nav";
    }

    .auth-stack {
        width: 100%;
        justify-self: stretch;
    }

    .primary-nav {
        justify-content: center;
        border-radius: var(--radius-lg);
    }

    #content {
        flex-direction: column;
    }

    #content .rightad {
        width: 100%;
        order: 2;
    }
}

@media (max-width: 720px) {
    body {
        font-size: clamp(14px, 3.8vw, 15px);
    }

    .header-content {
        padding: clamp(24px, 8vw, 40px);
    }

    .primary-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .server-switcher-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .server-switcher button {
        width: 100%;
    }

    .form-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    fieldset table td:first-child {
        width: 100%;
        text-align: left;
        padding-right: 0;
        margin-bottom: 0.25rem;
    }

    fieldset table td,
    fieldset table td:last-child {
        width: 100%;
        display: block;
    }

    #footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .countdown {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .countdown {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .button,
    input.button,
    button.button {
        width: 100%;
    }
}



@media (max-width: 1024px) {
  .space-scene {
    position: absolute;        /* évite le repaint coûteux du fixed */
    inset: auto 0 0 0;
    width: 100vw;
    height: 100vh;
    background: #03070c;       /* simple fond uni ou gradient léger */
    filter: none;
    mix-blend-mode: normal;
  }

  .space-scene .galaxy-layer,
  .space-scene .starfield,
  .space-scene .ship-alpha,
  .space-scene .ship-bravo,
  .space-scene .spaceship{
    display: none;             /* coupe les blur, animations et mix-blend */
  }
  
}

@media (prefers-reduced-motion: reduce) {
  .space-scene [class*="ship"] {
    animation: none;
  }
}











