/* mysterious.quest - Cyberpunk Data-Viz Dashboard */
/* Colors: #FFFFFF, #06060E, #1A1A2E, #A0B4C8, #0A0A12, #4A5568, #FF3366, #0F1019, #00F0FF, #FFB800 */
/* Fonts: Share Tech Mono, Rajdhani, IBM Plex Sans, IBM Plex Mono */

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

body {
    background-color: #0F1019;
    color: #A0B4C8;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scan lines overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 240, 255, 0.015) 2px,
        rgba(0, 240, 255, 0.015) 4px
    );
}

/* HUD border */
.hud-border {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    border: 1px solid rgba(0, 240, 255, 0.15);
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hud-border.visible {
    opacity: 1;
}

.hud-corner {
    position: absolute;
    width: 20px;
    height: 20px;
}

.hud-corner-tl { top: 4px; left: 4px; }
.hud-corner-tr { top: 4px; right: 4px; }
.hud-corner-bl { bottom: 4px; left: 4px; }
.hud-corner-br { bottom: 4px; right: 4px; }

/* Status bar */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background: rgba(10, 10, 18, 0.9);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 200;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.status-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #00F0FF;
}

/* Dashboard grid */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 16px;
    padding: 48px 16px 16px;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* Panels */
.panel {
    background: rgba(10, 10, 18, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 2px;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.panel-left {
    transform: translateX(-30px);
}

.panel-center {
    transform: translateY(30px);
}

.panel-right {
    transform: translateX(30px);
}

.panel.visible {
    opacity: 1;
    transform: translate(0, 0);
}

.panel-header {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #00F0FF;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
    margin-bottom: 12px;
}

/* Data stream (left panel) */
.data-stream-wrapper {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.data-stream {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    line-height: 1.6;
    color: #4A5568;
    animation: streamScroll 20s linear infinite;
}

.data-stream .stream-line {
    white-space: nowrap;
    overflow: hidden;
}

.data-stream .stream-highlight {
    color: #00F0FF;
}

@keyframes streamScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Threat bars */
.threat-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.threat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
}

.threat-label {
    color: #4A5568;
    width: 72px;
    flex-shrink: 0;
}

.threat-bar {
    flex: 1;
    height: 4px;
    background: rgba(0, 240, 255, 0.08);
    border-radius: 1px;
    overflow: hidden;
}

.threat-fill {
    height: 100%;
    background: #00F0FF;
    border-radius: 1px;
    transition: width 1.5s ease;
}

.threat-fill.threat-warn {
    background: #FF3366;
}

.threat-val {
    color: #A0B4C8;
    width: 32px;
    text-align: right;
    flex-shrink: 0;
}

/* Radar */
.radar-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 32px;
}

.radar-svg {
    width: 100%;
    height: 100%;
    animation: radarRotateRing 8s linear infinite;
}

@keyframes radarRotateRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.radar-sweep {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 340deg,
        rgba(0, 240, 255, 0.1) 360deg
    );
    animation: radarSweep 4s linear infinite;
}

@keyframes radarSweep {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Anomaly dots pulse */
.anomaly-dot {
    animation: anomalyPulse 2s ease-in-out infinite;
}

.anomaly-dot:nth-child(5) { animation-delay: 0.3s; }
.anomaly-dot:nth-child(6) { animation-delay: 0.7s; }
.anomaly-dot:nth-child(7) { animation-delay: 1.1s; }
.anomaly-dot:nth-child(8) { animation-delay: 1.5s; }

@keyframes anomalyPulse {
    0%, 100% { r: 4; opacity: 1; }
    50% { r: 5.6; opacity: 0.6; }
}

/* Main title */
.main-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 42px;
    letter-spacing: 0.04em;
    color: #FFFFFF;
    text-align: center;
    margin-bottom: 8px;
}

.main-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #4A5568;
    text-align: center;
    margin-bottom: 32px;
}

/* Intel sections */
.intel-section {
    margin-top: 24px;
    padding: 16px;
    background: rgba(6, 6, 14, 0.4);
    border: 1px solid rgba(0, 240, 255, 0.06);
    border-radius: 2px;
}

.intel-body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 15px;
    line-height: 1.7;
    color: #A0B4C8;
    margin-top: 12px;
}

/* Code block */
.code-block {
    background: rgba(6, 6, 14, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.08);
    padding: 12px;
    margin-top: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    line-height: 1.8;
    border-radius: 2px;
}

.code-line {
    display: block;
    color: #00F0FF;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.code-line.visible {
    opacity: 1;
}

/* Right panel: coordinates */
.coord-display {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.coord-row {
    display: flex;
    justify-content: space-between;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
}

.coord-label {
    color: #4A5568;
    letter-spacing: 0.1em;
}

.coord-value {
    color: #A0B4C8;
    letter-spacing: 0.05em;
}

/* Event log */
.event-log {
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, 0.2) transparent;
}

.event-log::-webkit-scrollbar {
    width: 4px;
}

.event-log::-webkit-scrollbar-track {
    background: transparent;
}

.event-log::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.2);
    border-radius: 2px;
}

.log-entry {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    line-height: 1.8;
    color: #4A5568;
    border-bottom: 1px solid rgba(0, 240, 255, 0.04);
    padding: 4px 0;
}

.log-time {
    color: #00F0FF;
    margin-right: 8px;
    opacity: 0.6;
}

.log-entry.log-alert {
    color: #FF3366;
}

.log-entry.log-alert .log-time {
    color: #FF3366;
    opacity: 0.8;
}

/* Signal meter */
.signal-meter {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.signal-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 240, 255, 0.08);
    border-radius: 1px;
}

.signal-bar.active {
    background: #00F0FF;
    animation: signalPulse 3s ease-in-out infinite;
}

.signal-bar.active:nth-child(2) { animation-delay: 0.3s; }
.signal-bar.active:nth-child(3) { animation-delay: 0.6s; }
.signal-bar.active:nth-child(4) { animation-delay: 0.9s; }

@keyframes signalPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.signal-label {
    display: block;
    margin-top: 6px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: #4A5568;
}

/* Warning accent */
.log-entry.log-alert .log-time {
    color: #FFB800;
    text-shadow: 0 0 6px rgba(255, 184, 0, 0.3);
}

/* CRT flicker effect */
@keyframes crtFlicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.8; }
    94% { opacity: 1; }
    96% { opacity: 0.9; }
    97% { opacity: 1; }
}

body {
    animation: crtFlicker 6s step-end infinite;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .panel-left {
        order: 2;
    }

    .panel-center {
        order: 1;
    }

    .panel-right {
        order: 3;
    }

    .radar-container {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 600px) {
    .main-title {
        font-size: 28px;
    }

    .radar-container {
        width: 180px;
        height: 180px;
    }
}
