/* senggack.net — Coastal Radar Station Console */

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

:root {
    --deep-hull: #1e2d35;
    --slate-console: #2b3a42;
    --slate-light: #334852;
    --oxidized-silver: #9aabb4;
    --tarnished-brass: #b8a472;
    --seafoam: #7ec8a4;
    --amber: #e8a84c;
    --pale-signal: #d4dde2;
    --fog-white: #eef2f4;
    --screw-light: #c0c8cc;
    --screw-mid: #6b7f8a;
    --skeleton-bg: #3a4f59;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--deep-hull);
    font-family: 'IBM Plex Mono', monospace;
    color: var(--pale-signal);
}

/* Scanlines */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 1px,
        rgba(0,0,0,0.05) 1px,
        rgba(0,0,0,0.05) 2px
    );
}

/* Console Rail - Horizontal Scroll */
.console-rail {
    display: flex;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.console-rail::-webkit-scrollbar {
    display: none;
}

/* Stations */
.station {
    flex: 0 0 100vw;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.station-bezel {
    position: relative;
    width: 90%;
    height: 85%;
    background: linear-gradient(180deg, var(--slate-console) 0%, var(--slate-light) 100%);
    border: 1px solid var(--oxidized-silver);
    border-radius: 4px;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

/* HUD Brackets */
.hud-bracket {
    position: absolute;
    width: 20px;
    height: 20px;
}
.hud-bracket::before,
.hud-bracket::after {
    content: '';
    position: absolute;
    background: var(--seafoam);
}
.hud-bracket.tl { top: 8px; left: 8px; }
.hud-bracket.tl::before { width: 20px; height: 2px; top: 0; left: 0; }
.hud-bracket.tl::after { width: 2px; height: 20px; top: 0; left: 0; }

.hud-bracket.tr { top: 8px; right: 8px; }
.hud-bracket.tr::before { width: 20px; height: 2px; top: 0; right: 0; }
.hud-bracket.tr::after { width: 2px; height: 20px; top: 0; right: 0; }

.hud-bracket.bl { bottom: 8px; left: 8px; }
.hud-bracket.bl::before { width: 20px; height: 2px; bottom: 0; left: 0; }
.hud-bracket.bl::after { width: 2px; height: 20px; bottom: 0; left: 0; }

.hud-bracket.br { bottom: 8px; right: 8px; }
.hud-bracket.br::before { width: 20px; height: 2px; bottom: 0; right: 0; }
.hud-bracket.br::after { width: 2px; height: 20px; bottom: 0; right: 0; }

/* Screws */
.screw {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--screw-light) 0%, var(--screw-mid) 60%, #4a5c64 100%);
}
.screw-tl { top: 14px; left: 14px; }
.screw-tr { top: 14px; right: 14px; }
.screw-bl { bottom: 14px; left: 14px; }
.screw-br { bottom: 14px; right: 14px; }

/* Station Number */
.station-number {
    position: absolute;
    bottom: 24px;
    left: 40px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--oxidized-silver);
}

/* Station Titles */
.station-title {
    font-family: 'Arvo', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tarnished-brass);
    margin-bottom: 24px;
}

/* Data Streams */
.data-stream {
    flex: 0 0 60px;
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.data-stream::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        var(--amber) 0px,
        var(--amber) 3px,
        transparent 3px,
        transparent 15px
    );
    opacity: 0.4;
    animation: streamFlow 2s linear infinite;
}

@keyframes streamFlow {
    from { transform: translateX(-15px); }
    to { transform: translateX(0px); }
}

/* === STATION 01 === */
.sta01-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.radar-row {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

#radarCanvas {
    width: min(45vh, 400px);
    height: min(45vh, 400px);
    border-radius: 50%;
    border: 2px solid var(--oxidized-silver);
}

.meter {
    width: 80px;
    height: 80px;
}

.meter-svg {
    width: 100%;
    height: 100%;
}

.meter-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 8px;
    fill: var(--oxidized-silver);
    letter-spacing: 0.15em;
}

.meter-needle {
    transform-origin: 50px 50px;
    transition: transform 1s ease-out;
}

.site-title {
    font-family: 'Arvo', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tarnished-brass);
    margin-bottom: 8px;
}

.site-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    color: var(--pale-signal);
    letter-spacing: 0.02em;
}

/* === STATION 02 === */
.sta02-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.readout-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
    overflow-y: auto;
}

.skeleton-block {
    background: var(--skeleton-bg);
    border-radius: 2px;
    min-height: 60px;
    padding: 16px;
    position: relative;
    overflow: hidden;
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    line-height: 1.7;
    color: transparent;
}

.skeleton-block.skeleton-active::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(154,171,180,0.15) 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
}

.skeleton-block.revealed {
    background: transparent;
    color: var(--pale-signal);
    animation: revealContent 0.5s ease-out forwards;
}

@keyframes shimmer {
    from { transform: translateX(0); }
    to { transform: translateX(200%); }
}

@keyframes revealContent {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.indicator-lights {
    display: flex;
    gap: 12px;
    padding-top: 12px;
}

.indicator-light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--skeleton-bg);
    animation: pulse-light 3s ease-in-out infinite;
}

.indicator-light:nth-child(2) { animation-delay: 0.6s; }
.indicator-light:nth-child(3) { animation-delay: 1.2s; }
.indicator-light:nth-child(4) { animation-delay: 1.8s; }
.indicator-light:nth-child(5) { animation-delay: 2.4s; }

@keyframes pulse-light {
    0%, 100% { background: var(--skeleton-bg); }
    50% { background: var(--seafoam); }
}

/* === STATION 03 === */
.sta03-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.frequency-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.freq-bar {
    background: var(--slate-console);
    border: 1px solid var(--oxidized-silver);
    border-left: 3px solid var(--oxidized-silver);
    padding: 12px 20px;
    height: 48px;
    overflow: hidden;
    transition: height 0.4s ease-out, border-left-color 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.freq-bar:hover {
    height: 200px;
    border-left-color: var(--amber);
}

.freq-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--oxidized-silver);
    white-space: nowrap;
    flex-shrink: 0;
}

.freq-bar:hover .freq-label {
    color: var(--amber);
}

.freq-bar::after {
    content: attr(data-content);
    display: block;
    margin-top: 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--pale-signal);
    opacity: 0;
    transition: opacity 0.3s ease-out 0.1s;
}

.freq-bar:hover::after {
    opacity: 1;
}

/* === STATION 04 === */
.sta04-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contour-map-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contour-map {
    width: 100%;
    max-height: 70vh;
}

.map-annotations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.annotation {
    position: absolute;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amber);
    white-space: nowrap;
}

.annotation::before {
    content: '◆ ';
    font-size: 0.5rem;
    color: var(--seafoam);
}

/* === STATION 05 === */
.sta05-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.log-entries {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.log-entry {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    line-height: 1.6;
    color: var(--pale-signal);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    padding-left: 12px;
    border-left: 2px solid var(--skeleton-bg);
}

.log-entry.visible {
    opacity: 1;
    transform: translateY(0);
    border-left-color: var(--seafoam);
}

.log-entry:last-child {
    color: var(--amber);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--skeleton-bg);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--seafoam);
    transition: width 0.5s ease-out;
    border-radius: 2px;
}

.progress-fill.complete {
    width: 100%;
    animation: pulseFill 1s ease-in-out 1;
}

@keyframes pulseFill {
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
