/* eyes.cash - Subaqueous Surveillance Command Center */
/* Colors: #c0c8d4, #0a0d12, #8a9bb0, #a8b8cc, #5f7a8f, #d4dde8, #e8edf4, #12171f, #7eb8d4 */

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

:root {
    --chrome-light: #d4dde8;
    --chrome-mid: #a8b8cc;
    --chrome-dark: #8a9bb0;
    --chrome-darker: #5f7a8f;
    --aqua: #7eb8d4;
    --aqua-dark: #2a6f9e;
    --bg-deep: #0a0d12;
    --bg-panel: #12171f;
    --text-primary: #e8edf4;
    --text-secondary: #c0c8d4;
    --text-dim: #5f7a8f;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

/* ===== EYE OVERLAY ===== */
#eye-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--bg-deep);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1.5s ease;
}

#eye-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

#eye-svg {
    width: min(80vw, 80vh);
    height: min(80vw, 80vh);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1.2s ease, transform 1.5s ease;
}

#eye-overlay.revealed #eye-svg {
    opacity: 1;
    transform: scale(1);
}

#eye-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 14vw, 12rem);
    letter-spacing: 0.2em;
    background: linear-gradient(180deg, #a8b8cc 0%, #d4dde8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease 0.5s, transform 1s ease 0.5s;
    text-transform: uppercase;
}

#eye-overlay.revealed #eye-label {
    opacity: 1;
    transform: translateY(0);
}

/* Eye SVG Animations */
#outer-rings {
    animation: rotateClockwise 60s linear infinite;
    transform-origin: 300px 300px;
}

#mid-rings {
    animation: rotateCounter 45s linear infinite;
    transform-origin: 300px 300px;
}

@keyframes rotateClockwise {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateCounter {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

#scan-line {
    animation: scanPulse 4s ease-in-out infinite;
}

@keyframes scanPulse {
    0%, 100% { opacity: 0; transform: rotate(0deg); transform-origin: 300px 300px; }
    25% { opacity: 0.4; }
    50% { opacity: 0; transform: rotate(180deg); transform-origin: 300px 300px; }
    75% { opacity: 0.3; }
}

/* ===== BUBBLE CANVAS ===== */
#bubble-canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

/* ===== COMMAND CENTER ===== */
#command-center {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 1.5s ease;
    padding: 0;
}

#command-center.visible {
    opacity: 1;
}

/* ===== TOP BAR ===== */
#top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(126, 184, 212, 0.1);
    background: rgba(18, 23, 31, 0.8);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    z-index: 20;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.system-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    background: linear-gradient(180deg, #a8b8cc, #d4dde8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-indicator {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--aqua);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.08em;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--aqua);
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--aqua); }
    50% { opacity: 0.4; box-shadow: 0 0 1px var(--aqua); }
}

.data-readout {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 300;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

/* ===== PANEL GRID ===== */
#panel-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
    overflow: hidden;
}

/* ===== PANELS ===== */
.panel {
    background: rgba(18, 23, 31, 0.6);
    border: 1px solid rgba(126, 184, 212, 0.08);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    transition: opacity 0.8s ease, transform 0.8s ease, border-color 0.3s ease;
}

.panel.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(126, 184, 212, 0.03) 0%, transparent 40%);
    pointer-events: none;
}

.panel:hover {
    border-color: rgba(126, 184, 212, 0.2);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(126, 184, 212, 0.06);
    flex-shrink: 0;
}

.panel-id {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    font-weight: 300;
    color: var(--text-dim);
    letter-spacing: 0.08em;
}

.panel-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    color: var(--chrome-mid);
}

.panel-status {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.55rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    padding: 2px 8px;
    border: 1px solid rgba(95, 122, 143, 0.3);
    border-radius: 2px;
}

.panel-status.active {
    color: var(--aqua);
    border-color: rgba(126, 184, 212, 0.3);
}

.panel-body {
    flex: 1;
    padding: 12px 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ===== PANEL: THE WATCHER ===== */
.watcher-eye-mini {
    width: 120px;
    height: 120px;
    margin: 0 auto 12px;
}

.watcher-eye-mini svg {
    width: 100%;
    height: 100%;
}

.mini-ring-outer {
    animation: rotateClockwise 30s linear infinite;
    transform-origin: 100px 100px;
}

.mini-ring-inner {
    animation: rotateCounter 20s linear infinite;
    transform-origin: 100px 100px;
}

.panel-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* ===== PANEL: DATA STREAM ===== */
.data-stream {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    flex: 1;
}

.stream-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 3px 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 300;
    border-bottom: 1px solid rgba(126, 184, 212, 0.04);
    animation: streamFadeIn 0.5s ease forwards;
}

.stream-ts {
    color: var(--text-dim);
    letter-spacing: 0.05em;
    flex-shrink: 0;
    width: 60px;
}

.stream-val {
    color: var(--aqua);
    font-weight: 500;
    flex-shrink: 0;
    width: 55px;
}

.stream-route {
    color: var(--chrome-dark);
    letter-spacing: 0.05em;
}

@keyframes streamFadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== PANEL: METRICS ===== */
.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px solid rgba(126, 184, 212, 0.04);
}

.metric-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    font-weight: 300;
    color: var(--text-dim);
    letter-spacing: 0.08em;
}

.metric-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.03em;
}

.metric-value.anomaly {
    color: var(--aqua);
}

.metric-bar-container {
    margin-top: 8px;
}

.metric-bar-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.55rem;
    font-weight: 300;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.metric-bar {
    height: 3px;
    background: rgba(95, 122, 143, 0.15);
    border-radius: 1.5px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2a6f9e, var(--aqua));
    border-radius: 1.5px;
    transition: width 2s ease;
}

.metric-bar-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.55rem;
    font-weight: 400;
    color: var(--chrome-dark);
    letter-spacing: 0.05em;
}

/* ===== PANEL: NETWORK ===== */
.network-graph {
    width: 100%;
    flex: 1;
}

.pulse-ring {
    animation: pulseExpand 3s ease-in-out infinite;
    transform-origin: 200px 125px;
}

@keyframes pulseExpand {
    0% { r: 6; opacity: 0.6; }
    100% { r: 30; opacity: 0; }
}

/* ===== PANEL: SIGNAL INTELLIGENCE ===== */
.sigint-wave {
    flex: 1;
    min-height: 0;
}

.sigint-wave canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.sigint-readouts {
    display: flex;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid rgba(126, 184, 212, 0.06);
    margin-top: 8px;
}

.sigint-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sigint-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5rem;
    font-weight: 300;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.sigint-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--chrome-mid);
    letter-spacing: 0.03em;
}

/* ===== PANEL: SYSTEM LOG ===== */
.log-entries {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
    flex: 1;
}

.log-entry {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    padding: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-level {
    font-weight: 500;
    margin-right: 6px;
}

.log-level.info { color: var(--chrome-dark); }
.log-level.warn { color: #c4a35a; }
.log-level.error { color: #2a6f9e; }
.log-level.ok { color: var(--aqua); }

/* ===== BOTTOM BAR ===== */
#bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    border-top: 1px solid rgba(126, 184, 212, 0.1);
    background: rgba(18, 23, 31, 0.8);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    z-index: 20;
}

.bottom-bar-left, .bottom-bar-center, .bottom-bar-right {
    display: flex;
    align-items: center;
}

.footer-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    font-weight: 300;
    color: var(--text-dim);
    letter-spacing: 0.06em;
}

.footer-data {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.25em;
    color: var(--chrome-dark);
}

/* ===== GLOW EFFECTS ===== */
.panel-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(126, 184, 212, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    #panel-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    #panel-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        overflow-y: auto;
    }
    .panel {
        min-height: 200px;
    }
    #top-bar, #bottom-bar {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    .top-bar-left, .top-bar-right {
        justify-content: center;
    }
}
