/* SpaceX cinematic — continuous motion + sticky scrub */

:root {
    --bg: #000000;
    --bg-panel: #0a0a0a;
    --bg-elevated: #121214;
    --text: #f0f0fa;
    --text-secondary: #a8a8b3;
    --text-muted: #5a5a5f;
    --border: #3a3a3f;
    --border-subtle: #222226;
    --accent: #f0f0fa;
    --success: #7dcea0;
    --danger: #e07a7a;
    --font: 'Oswald', 'Noto Sans SC', Arial Narrow, Arial, sans-serif;
    --nav-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    letter-spacing: 0.06em;
    line-height: 1.45;
    text-transform: uppercase;
    overflow-x: hidden;
}

a { color: var(--text); text-decoration: none; }
a:hover { opacity: 0.7; }

button, input, select {
    font-family: inherit;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: inherit;
}

/* Canvas starfield */
.sx-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Space layers */
.sx-space {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.sx-stars,
.sx-stars-far {
    position: absolute;
    inset: -20%;
    background-image:
        radial-gradient(1.5px 1.5px at 8% 18%, rgba(240, 240, 250, 1), transparent),
        radial-gradient(1px 1px at 22% 62%, rgba(240, 240, 250, 0.8), transparent),
        radial-gradient(2px 2px at 48% 12%, rgba(240, 240, 250, 1), transparent),
        radial-gradient(1px 1px at 66% 44%, rgba(240, 240, 250, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 82% 78%, rgba(240, 240, 250, 0.9), transparent),
        radial-gradient(1px 1px at 14% 88%, rgba(240, 240, 250, 0.55), transparent),
        radial-gradient(2px 2px at 38% 36%, rgba(240, 240, 250, 0.85), transparent),
        radial-gradient(1px 1px at 94% 26%, rgba(240, 240, 250, 0.7), transparent),
        radial-gradient(1px 1px at 58% 70%, rgba(240, 240, 250, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 74% 8%, rgba(240, 240, 250, 0.8), transparent);
    animation: sxTwinkle 3.5s ease-in-out infinite alternate;
    will-change: transform;
}

.sx-stars-far {
    opacity: 0.4;
    transform: scale(1.2);
    animation-duration: 5s;
    animation-direction: alternate-reverse;
}

.sx-nebula {
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(ellipse 40% 30% at 20% 30%, rgba(90, 120, 255, 0.18), transparent 60%),
        radial-gradient(ellipse 35% 28% at 80% 20%, rgba(255, 100, 60, 0.12), transparent 55%),
        radial-gradient(ellipse 50% 35% at 60% 80%, rgba(120, 80, 200, 0.1), transparent 60%);
    animation: sxNebulaDrift 14s ease-in-out infinite alternate;
    filter: blur(40px);
    will-change: transform;
}

.sx-horizon {
    position: absolute;
    left: -20%;
    right: -20%;
    bottom: -18%;
    height: 55%;
    background:
        radial-gradient(ellipse 80% 70% at 50% 100%, rgba(70, 80, 110, 0.28), transparent 72%),
        radial-gradient(ellipse 50% 40% at 30% 95%, rgba(120, 60, 30, 0.14), transparent 70%);
    filter: blur(28px);
    opacity: 0.7;
    will-change: opacity;
}

.sx-glow {
    position: absolute;
    top: -8%;
    left: 50%;
    width: 100%;
    height: 55%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse 55% 45% at 50% 0%, rgba(240, 240, 250, 0.1), transparent 72%);
    animation: sxGlowPulse 4s ease-in-out infinite alternate;
}

.sx-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        180deg,
        transparent 0,
        transparent 3px,
        rgba(240, 240, 250, 0.025) 3px,
        rgba(240, 240, 250, 0.025) 4px
    );
    animation: sxScan 8s linear infinite;
    opacity: 0.35;
    mix-blend-mode: overlay;
}

.sx-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 70% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
}

@keyframes sxTwinkle {
    from { opacity: 0.45; }
    to { opacity: 0.95; }
}

@keyframes sxNebulaDrift {
    from { transform: translate(-2%, -1%) scale(1); }
    to { transform: translate(3%, 2%) scale(1.08); }
}

@keyframes sxGlowPulse {
    from { opacity: 0.45; }
    to { opacity: 1; }
}

@keyframes sxScan {
    from { transform: translateY(0); }
    to { transform: translateY(40px); }
}

/* Progress */
.sx-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 60;
    background: rgba(240, 240, 250, 0.08);
}

.sx-progress i {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #fff, #9ab);
    box-shadow: 0 0 12px rgba(240, 240, 250, 0.6);
}

/* Nav */
.sx-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: var(--nav-h);
    border-bottom: 1px solid transparent;
    background: transparent;
    transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
}

.sx-nav.is-solid {
    border-bottom-color: var(--border);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
}

.sx-nav-inner {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sx-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.14em;
    white-space: nowrap;
}

.sx-brand:hover { opacity: 1; }
.sx-brand-mark {
    font-size: 0.7rem;
    animation: sxSpin 8s linear infinite;
    display: inline-block;
}

@keyframes sxSpin {
    to { transform: rotate(360deg); }
}

.sx-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}

.sx-pill,
.sx-icon,
.sx-select,
.sx-input {
    height: 36px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    border-radius: 999px;
    outline: none;
}

.sx-pill {
    display: inline-flex;
    align-items: center;
    padding: 0 1rem;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
}

.sx-pill:hover { border-color: var(--text); opacity: 1; }

.sx-style {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sx-style-label {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    color: var(--text-muted);
}

.sx-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0 2rem 0 0.85rem;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    max-width: 118px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a8b3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
}

.sx-select-wide { max-width: 140px; }

.sx-select:focus,
.sx-input:focus { border-color: var(--text); }

.sx-select option {
    background: #0a0a0a;
    color: #f0f0fa;
}

.sx-icon {
    width: 36px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    font-size: 0.7rem;
}

.sx-icon svg { width: 15px; height: 15px; }

/* Screens */
.sx-scroll { position: relative; z-index: 1; }

.sx-screen {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-h) + 1.5rem) 1.5rem 3rem;
    overflow: hidden;
    background: transparent;
}

.sx-screen-inner {
    width: min(1100px, 100%);
    text-align: center;
}

.sx-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.32em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.sx-pulse-text {
    animation: sxPulseText 2s ease-in-out infinite;
}

@keyframes sxPulseText {
    0%, 100% { opacity: 0.45; letter-spacing: 0.32em; }
    50% { opacity: 1; letter-spacing: 0.4em; }
}

.sx-title {
    font-size: clamp(2.6rem, 10vw, 6.5rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 0.92;
    margin-bottom: 1.25rem;
    text-shadow: 0 0 40px rgba(240, 240, 250, 0.25);
}

.sx-title-split .sx-char {
    display: inline-block;
    animation: sxCharIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sxCharIn {
    from {
        opacity: 0;
        transform: translateY(1.2em) rotateX(-50deg);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

.sx-lede {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation: sxFadeUp 1s 0.4s both;
}

@keyframes sxFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}

.sx-scroll-hint {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    letter-spacing: 0.28em;
    cursor: pointer;
    padding: 0.5rem;
    animation: sxFadeUp 1s 0.7s both;
}

.sx-scroll-hint::after {
    content: '';
    width: 1px;
    height: 56px;
    background: linear-gradient(180deg, #fff, transparent);
    animation: sxHintPulse 1.4s ease-in-out infinite;
}

@keyframes sxHintPulse {
    0%, 100% { opacity: 0.2; transform: scaleY(0.55); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* Rocket */
.sx-rocket {
    position: absolute;
    left: 50%;
    bottom: 12%;
    transform: translateX(-50%);
    width: 18px;
    height: 90px;
    animation: sxRocketBob 2.4s ease-in-out infinite;
}

.sx-rocket-body {
    width: 100%;
    height: 55px;
    background: linear-gradient(180deg, #fff 0%, #bbb 100%);
    clip-path: polygon(50% 0%, 100% 28%, 100% 100%, 0 100%, 0 28%);
    box-shadow: 0 0 20px rgba(240, 240, 250, 0.35);
}

.sx-rocket-flame {
    margin: 0 auto;
    width: 10px;
    height: 28px;
    background: linear-gradient(180deg, #fff 0%, #ff9a3c 40%, #ff3c00 100%);
    clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
    animation: sxFlame 0.18s ease-in-out infinite alternate;
    filter: blur(0.5px);
    box-shadow: 0 0 18px rgba(255, 120, 40, 0.8);
}

@keyframes sxRocketBob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-14px); }
}

@keyframes sxFlame {
    from { height: 22px; opacity: 0.75; }
    to { height: 34px; opacity: 1; }
}

.sx-hero-trail {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 2px;
    height: 12vh;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(240, 240, 250, 0.7), transparent);
    animation: sxTrail 2s ease-in-out infinite;
}

@keyframes sxTrail {
    0%, 100% { height: 10vh; opacity: 0.4; }
    50% { height: 18vh; opacity: 1; }
}

/* Sticky pin sections */
.sx-pin {
    position: relative;
    height: 220vh;
}

.sx-pin-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
    padding: 1.5rem;
    gap: 1rem;
}

.sx-countdown-kicker {
    margin-bottom: 0;
}

.sx-countdown-stage {
    position: relative;
    display: grid;
    place-items: center;
    width: min(720px, 100%);
    min-height: 42vh;
}

.sx-fx-countdown-num {
    font-size: clamp(4rem, 18vw, 12rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 0.9;
    text-shadow: 0 0 60px rgba(240, 240, 250, 0.35);
    transition: transform 0.15s ease, filter 0.15s ease, opacity 0.25s ease;
    will-change: transform, filter;
    position: absolute;
    opacity: 0.22;
    pointer-events: none;
    z-index: 0;
}

.sx-launch-vehicle {
    position: relative;
    z-index: 1;
    width: min(440px, 92vw);
    padding: 1.5rem 1.35rem 1.25rem;
    background: rgba(10, 10, 10, 0.82);
    border: 1px solid var(--border);
    cursor: pointer;
    text-align: left;
    backdrop-filter: blur(8px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.35s;
}

.sx-launch-vehicle.is-swap {
    animation: sxVehicleIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.sx-launch-vehicle.is-liftoff {
    border-color: #fff;
    box-shadow: 0 0 40px rgba(240, 240, 250, 0.25);
}

.sx-launch-vehicle:hover {
    border-color: #fff;
    transform: translateY(-4px);
}

@keyframes sxVehicleIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.96);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

.sx-launch-rank {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.sx-launch-name {
    font-size: clamp(1.2rem, 3.5vw, 1.7rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.2;
    margin-bottom: 0.35rem;
    text-transform: none;
}

.sx-launch-provider {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 1.15rem;
}

.sx-launch-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.95rem;
}

.sx-launch-metrics b {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.sx-launch-metrics span {
    font-size: 0.55rem;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.sx-launch-queue {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    max-width: min(720px, 94vw);
}

.sx-queue-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 140px;
    height: 30px;
    padding: 0 0.65rem;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.25s, border-color 0.25s, color 0.25s, background 0.25s;
}

.sx-queue-chip.is-done {
    opacity: 0.3;
    text-decoration: line-through;
}

.sx-queue-chip.is-active {
    opacity: 1;
    color: var(--text);
    border-color: #fff;
    background: rgba(240, 240, 250, 0.08);
    box-shadow: 0 0 16px rgba(240, 240, 250, 0.15);
}

.sx-queue-rank {
    font-weight: 600;
}

.sx-queue-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0.02em;
}

.sx-launch-bar {
    width: min(420px, 70vw);
    height: 4px;
    background: rgba(240, 240, 250, 0.15);
    border-radius: 999px;
    overflow: hidden;
}

.sx-launch-bar i {
    display: block;
    height: 100%;
    width: 0%;
    background: #fff;
    box-shadow: 0 0 16px #fff;
}

.sx-fx-caption {
    margin-top: 1.5rem;
    font-size: 0.78rem;
    letter-spacing: 0.3em;
    color: var(--text-muted);
}

.sx-fx-caption-overlay {
    position: absolute;
    bottom: 16%;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 2;
}

/* Telemetry */
.sx-telemetry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.sx-tel {
    padding: 1.75rem 1rem;
    text-align: center;
    border-right: 1px solid var(--border-subtle);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.sx-tel:last-child { border-right: none; }

.sx-screen.is-inview .sx-tel {
    opacity: 1;
    transform: none;
}

.sx-screen.is-inview .sx-tel[data-stagger="1"] { transition-delay: 0.12s; }
.sx-screen.is-inview .sx-tel[data-stagger="2"] { transition-delay: 0.24s; }
.sx-screen.is-inview .sx-tel[data-stagger="3"] { transition-delay: 0.36s; }

.sx-tel-label {
    display: block;
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
}

.sx-tel-value {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 600;
    letter-spacing: 0.06em;
}

/* Glitch — always on when in view, stronger */
.sx-glitch-wrap { max-width: 960px; }

.sx-glitch-text {
    position: relative;
    font-size: clamp(1.15rem, 4vw, 2.35rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.25;
    animation: sxShake 3.5s ease-in-out infinite;
}

.sx-glitch-text::before,
.sx-glitch-text::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.sx-fx-glitch.is-inview .sx-glitch-text::before,
.sx-fx-glitch.is-inview .sx-glitch-text::after {
    opacity: 0.85;
}

.sx-fx-glitch.is-inview .sx-glitch-text::before {
    color: #6cf;
    clip-path: inset(0 0 52% 0);
    animation: sxGlitchA 1.2s steps(2, end) infinite;
}

.sx-fx-glitch.is-inview .sx-glitch-text::after {
    color: #f55;
    clip-path: inset(48% 0 0 0);
    animation: sxGlitchB 0.9s steps(2, end) infinite;
}

@keyframes sxShake {
    0%, 92%, 100% { transform: none; }
    93% { transform: translate(-3px, 1px); }
    94% { transform: translate(4px, -2px); }
    95% { transform: translate(-2px, 2px); }
    96% { transform: none; }
}

@keyframes sxGlitchA {
    0%, 100% { transform: translate(-4px, -1px); }
    50% { transform: translate(5px, 2px); }
}

@keyframes sxGlitchB {
    0%, 100% { transform: translate(4px, 1px); }
    50% { transform: translate(-6px, -2px); }
}

/* Marquee — continuous CSS animation */
.sx-fx-marquee {
    flex-direction: column;
    gap: 1.5rem;
    padding-left: 0;
    padding-right: 0;
}

.sx-marquee {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.sx-marquee-track {
    display: flex;
    gap: 2.5rem;
    width: max-content;
    font-size: clamp(2rem, 6vw, 4.2rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    white-space: nowrap;
    opacity: 0.4;
    animation: sxMarquee 70s linear infinite;
}

.sx-marquee-reverse .sx-marquee-track {
    animation-direction: reverse;
    animation-duration: 90s;
    opacity: 0.25;
    font-size: clamp(1.4rem, 4vw, 2.8rem);
}

.sx-marquee-track span {
    display: inline-block;
    padding: 0 0.35rem;
}

@keyframes sxMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Crew */
.sx-screen-crew .sx-screen-inner { text-align: left; }

.sx-podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin-top: 0.5rem;
}

.sx-crew {
    background: rgba(10, 10, 10, 0.88);
    padding: 2rem 1.35rem 1.6rem;
    cursor: pointer;
    transition: background 0.25s, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    opacity: 0;
    transform: translateY(40px);
}

.sx-screen.is-inview .sx-crew {
    opacity: 1;
    transform: none;
}

.sx-screen.is-inview .sx-crew:nth-child(1) { transition-delay: 0.05s; }
.sx-screen.is-inview .sx-crew:nth-child(2) { transition-delay: 0.18s; }
.sx-screen.is-inview .sx-crew:nth-child(3) { transition-delay: 0.3s; }

.sx-crew:hover {
    background: var(--bg-elevated);
    transform: translateY(-6px);
}

.sx-crew.place-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--text);
    box-shadow: 0 0 12px #fff;
}

.sx-crew-rank {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.sx-crew-name {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.2;
    margin-bottom: 0.35rem;
    text-transform: none;
}

.sx-crew-provider {
    font-size: 0.65rem;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 1.35rem;
}

.sx-crew-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
}

.sx-crew-metric b {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.sx-crew-metric span {
    font-size: 0.55rem;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

/* Efficiency leaders screen */
.sx-screen-duel {
    position: relative;
}

.sx-screen-duel .sx-warp-lines {
    position: absolute;
    inset: -10% 0;
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 36px,
            rgba(240, 240, 250, 0.05) 36px,
            rgba(240, 240, 250, 0.05) 37px
        );
    transform: perspective(600px) rotateX(62deg) scale(1.35);
    transform-origin: center 70%;
    opacity: 0.35;
    pointer-events: none;
}

.sx-warp-panel {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    text-align: center;
}

.sx-warp-sub {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.sx-duel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    text-align: left;
}

.sx-duel-card {
    padding: 1.2rem 1.1rem;
    background: rgba(10, 10, 10, 0.88);
    border: 1px solid var(--border);
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.35s;
    opacity: 0;
    transform: translateY(24px);
}

.sx-screen.is-inview .sx-duel-card {
    opacity: 1;
    transform: none;
}

.sx-screen.is-inview .sx-duel-card:nth-child(1) { transition-delay: 0.05s; }
.sx-screen.is-inview .sx-duel-card:nth-child(2) { transition-delay: 0.15s; }
.sx-screen.is-inview .sx-duel-card:nth-child(3) { transition-delay: 0.25s; }

.sx-duel-card:hover {
    border-color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 0 28px rgba(240, 240, 250, 0.12);
}

.sx-duel-card-winner {
    border-color: rgba(240, 240, 250, 0.55);
    box-shadow: 0 0 24px rgba(240, 240, 250, 0.1);
}

.sx-duel-tag {
    display: inline-block;
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
}

.sx-duel-name {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.25;
    margin-bottom: 0.25rem;
    text-transform: none;
}

.sx-duel-meta {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.sx-duel-stat {
    margin-bottom: 0.75rem;
}

.sx-duel-stat b {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

.sx-duel-stat span {
    font-size: 0.55rem;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.sx-duel-stat.accent b {
    text-shadow: 0 0 18px rgba(240, 240, 250, 0.45);
}

.sx-duel-winner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.75rem;
}

.sx-duel-winner-grid b {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.sx-duel-winner-grid span {
    font-size: 0.52rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* Manifest */
.sx-screen-manifest {
    align-items: flex-start;
    min-height: auto;
    padding-top: calc(var(--nav-h) + 2rem);
    padding-bottom: 0;
}

.sx-manifest-wrap {
    width: min(1120px, 100%);
    border: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.82);
}

.sx-manifest-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.sx-section-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 160px;
}

.sx-section-head h2 {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    white-space: nowrap;
}

.sx-count {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.sx-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.sx-input {
    min-width: 200px;
    padding: 0 1rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    border-radius: 999px;
    background: transparent;
}

.sx-cols {
    display: grid;
    grid-template-columns: 64px 1fr 80px 100px 90px 80px;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.sx-list { min-height: 180px; }

.sx-empty {
    padding: 3.5rem 1.5rem;
    text-align: center;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.sx-row {
    display: grid;
    grid-template-columns: 64px 1fr 80px 100px 90px 80px;
    gap: 0.5rem;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background 0.2s;
}

.sx-row:hover { background: rgba(240, 240, 250, 0.05); }

.sx-row-rank { font-size: 1.05rem; font-weight: 600; }

.sx-change {
    display: block;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    margin-top: 0.2rem;
}

.sx-change.up { color: var(--success); }
.sx-change.down { color: var(--danger); }
.sx-change.same { color: var(--text-muted); }
.sx-change.new { color: var(--text); }

.sx-row-name {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: none;
}

.sx-row-meta {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.sx-row-num {
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}

.sx-row-num.value {
    color: var(--text);
    font-weight: 600;
}

.sx-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    padding: 1.15rem 1.25rem 1.35rem;
}

.sx-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 0.55rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    cursor: pointer;
}

.sx-page-btn:hover:not(:disabled) {
    border-color: var(--text);
    color: var(--text);
}

.sx-page-btn.active {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

.sx-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Modal */
.sx-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.sx-modal.hidden { display: none; }

.sx-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.sx-modal-panel {
    position: relative;
    z-index: 1;
    width: min(480px, 100%);
    max-height: min(88vh, 740px);
    overflow-y: auto;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 1.75rem 1.5rem;
}

.sx-modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
}

.sx-detail-rank {
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.sx-detail-title {
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.15;
    margin-bottom: 0.4rem;
    padding-right: 2.5rem;
    text-transform: none;
}

.sx-detail-id {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
    word-break: break-all;
    text-transform: none;
}

.sx-detail-provider {
    display: inline-block;
    margin-bottom: 1.35rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
}

.sx-detail-value {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    margin-bottom: 1.35rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.sx-detail-value span {
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.sx-detail-value strong {
    font-size: 2rem;
    font-weight: 600;
}

.sx-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin-bottom: 1.35rem;
}

.sx-detail-cell {
    background: var(--bg-panel);
    padding: 0.85rem 0.9rem;
}

.sx-detail-cell span {
    display: block;
    font-size: 0.55rem;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.sx-detail-cell b {
    font-size: 0.95rem;
    font-weight: 500;
}

.sx-detail-desc {
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 1.35rem;
    text-transform: none;
}

.sx-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--bg);
    background: var(--text);
    border-radius: 999px;
}

.sx-cta:hover { opacity: 0.85; color: var(--bg); }

.sx-footer {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

@media (max-width: 860px) {
    .sx-telemetry { grid-template-columns: 1fr 1fr; }
    .sx-tel:nth-child(2) { border-right: none; }
    .sx-tel:nth-child(1),
    .sx-tel:nth-child(2) { border-bottom: 1px solid var(--border-subtle); }
    .sx-podium { grid-template-columns: 1fr; }
    .sx-cols { display: none; }
    .sx-fx-countdown-num { font-size: clamp(3.2rem, 22vw, 8rem); opacity: 0.18; }
    .sx-countdown-stage { min-height: 36vh; }
    .sx-queue-chip { max-width: 110px; }
    .sx-duel-grid {
        grid-template-columns: 1fr;
    }
    .sx-row {
        grid-template-columns: 48px 1fr auto;
        grid-template-areas:
            "rank unit value"
            "rank metrics metrics";
        gap: 0.35rem 0.75rem;
    }
    .sx-row > :nth-child(1) { grid-area: rank; }
    .sx-row > :nth-child(2) { grid-area: unit; }
    .sx-row > :nth-child(3),
    .sx-row > :nth-child(4),
    .sx-row > :nth-child(5) { display: none; }
    .sx-row > :nth-child(6) { grid-area: value; text-align: right; }
    .sx-row::after {
        content: attr(data-metrics);
        grid-area: metrics;
        font-size: 0.6rem;
        letter-spacing: 0.1em;
        color: var(--text-muted);
    }
    .sx-pin { height: 180vh; }
}

@media (max-width: 560px) {
    .sx-style-label { display: none; }
    .sx-brand-text { font-size: 0.72rem; letter-spacing: 0.08em; }
    .sx-select { max-width: 96px; }
    .sx-input { min-width: 0; width: 100%; }
    .sx-controls { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .sx-stars,
    .sx-stars-far,
    .sx-nebula,
    .sx-glow,
    .sx-scanlines,
    .sx-brand-mark,
    .sx-pulse-text,
    .sx-scroll-hint::after,
    .sx-rocket,
    .sx-rocket-flame,
    .sx-hero-trail,
    .sx-marquee-track,
    .sx-glitch-text,
    .sx-glitch-text::before,
    .sx-glitch-text::after,
    .sx-title-split .sx-char,
    .sx-lede,
    .sx-scroll-hint {
        animation: none !important;
    }

    .sx-tel,
    .sx-crew {
        opacity: 1 !important;
        transform: none !important;
    }
}
