/* ============================================
   eyes.team - Surreal Observation Dashboard
   ============================================ */

:root {
    --void-indigo: #0D0D1A;
    --panel-slate: #161627;
    --hover-slate: #1C1C2E;
    --electric-iris: #7B7BFF;
    --plasma-magenta: #FF3CAC;
    --aqua-pulse: #00F5D4;
    --tangerine-signal: #FF6B35;
    --bleed-rose: #FF8FAB;
    --bleed-cerulean: #48BFE3;
    --pale-phantom: #C8C8E0;
    --ghost-lavender: #666688;
    --whisper-gray: #444466;
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background: var(--void-indigo);
    color: var(--pale-phantom);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    line-height: 1.65;
}

/* --- Dashboard Container --- */
.dashboard {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* --- Top Bar --- */
.top-bar {
    height: 40px;
    background: var(--hover-slate);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid rgba(123, 123, 255, 0.1);
    flex-shrink: 0;
}

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

.top-bar-center {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: var(--ghost-lavender);
}

.site-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pale-phantom);
}

.status-label {
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    color: var(--ghost-lavender);
}

.connection-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--plasma-magenta);
    animation: dotBlink 2s ease-in-out infinite;
}

.connection-dot.green {
    background: var(--aqua-pulse);
}

@keyframes dotBlink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* --- Main Grid --- */
.grid-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2px;
    padding: 2px;
    min-height: 0;
    overflow: hidden;
}

.column-left, .column-right {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 0;
    overflow: hidden;
}

.column-center {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 0;
    overflow: hidden;
}

/* --- Panel Base --- */
.panel {
    background: var(--void-indigo);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.panel-header {
    height: 28px;
    min-height: 28px;
    background: var(--panel-slate);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
}

.panel-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--electric-iris);
}

.panel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: dotBlink 2s ease-in-out infinite;
}

.panel-dot.magenta { background: var(--plasma-magenta); }
.panel-dot.aqua { background: var(--aqua-pulse); }
.panel-dot.iris { background: var(--electric-iris); }
.panel-dot.dim { background: var(--whisper-gray); animation: none; }

.panel-content {
    flex: 1;
    padding: 16px;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.panel-footer {
    height: 20px;
    min-height: 20px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: rgba(22, 22, 39, 0.5);
}

.timestamp {
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    color: var(--whisper-gray);
}

/* --- Watercolor Washes --- */
.wash-rose {
    background:
        radial-gradient(ellipse 200% 150% at 10% 80%, rgba(255, 143, 171, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 180% 200% at 90% 20%, rgba(72, 191, 227, 0.04) 0%, transparent 60%);
}

.wash-teal {
    background:
        radial-gradient(ellipse 180% 200% at 80% 70%, rgba(72, 191, 227, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 150% 150% at 20% 30%, rgba(123, 123, 255, 0.03) 0%, transparent 80%);
}

.wash-mixed {
    background:
        radial-gradient(ellipse 200% 150% at 10% 80%, rgba(255, 143, 171, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 180% 200% at 90% 20%, rgba(72, 191, 227, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 120% 120% at 50% 50%, rgba(123, 123, 255, 0.03) 0%, transparent 80%);
}

/* --- Gauge --- */
.gauge-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 12px;
}

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

.gauge-fill {
    animation: gaugeRotate 4s ease-in-out infinite alternate;
    transform-origin: center;
}

@keyframes gaugeRotate {
    0% { stroke-dasharray: 220 314; }
    100% { stroke-dasharray: 250 314; }
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--aqua-pulse);
}

.gauge-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: var(--ghost-lavender);
    text-align: center;
    line-height: 1.4;
}

/* --- Bar Chart --- */
.bar-chart {
    margin-bottom: 12px;
}

.bar-group {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    height: 80px;
}

.bar {
    width: 20px;
    height: var(--bar-height, 50%);
    background: var(--bar-color, var(--electric-iris));
    border-radius: 2px 2px 0 0;
    position: relative;
    animation: barPulse 3s ease-in-out infinite;
    opacity: 0.8;
}

.bar-label {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Fira Code', monospace;
    font-size: 9px;
    color: var(--ghost-lavender);
}

@keyframes barPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* --- Skeleton Loading --- */
.skeleton-block {
    height: 12px;
    border-radius: 4px;
    background: var(--hover-slate);
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

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

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* --- Eye Panel --- */
.panel-eye {
    flex: 0 0 auto;
    max-height: 160px;
}

.eye-panel-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.eye-svg {
    width: 200px;
    height: 100px;
}

.eye-outline {
    stroke: var(--electric-iris);
}

.eyelid {
    transform-origin: center 30%;
    transition: d 0.3s ease;
}

.eye-svg.blinking .eyelid {
    animation: eyeBlink 0.3s ease-in-out;
}

@keyframes eyeBlink {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(3.5); }
    100% { transform: scaleY(1); }
}

.iris-circle, .pupil-circle {
    transition: transform 0.15s ease-out;
}

/* --- Main Narrative Panel --- */
.panel-main {
    flex: 1;
    min-height: 0;
}

.main-scroll {
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--electric-iris) var(--void-indigo);
}

.main-scroll::-webkit-scrollbar {
    width: 4px;
}

.main-scroll::-webkit-scrollbar-track {
    background: var(--void-indigo);
}

.main-scroll::-webkit-scrollbar-thumb {
    background: var(--electric-iris);
    border-radius: 2px;
}

.narrative-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    color: var(--pale-phantom);
    margin-bottom: 1.5rem;
    letter-spacing: 0.06em;
}

.main-scroll p {
    margin-bottom: 1.2rem;
    color: var(--pale-phantom);
}

.highlight-block {
    padding: 12px 16px;
    background: rgba(123, 123, 255, 0.05);
    border-left: 2px solid var(--electric-iris);
    margin: 1.5rem 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

.neon-value {
    color: var(--aqua-pulse);
    font-weight: 700;
}

/* --- Blobs --- */
.blob {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 0;
}

.blob-1 {
    width: 300px;
    height: 300px;
    top: -50px;
    right: -80px;
    background: radial-gradient(circle, rgba(123, 123, 255, 0.06) 0%, transparent 70%);
    animation: blobDrift1 20s ease-in-out infinite;
}

.blob-2 {
    width: 250px;
    height: 250px;
    bottom: -30px;
    left: -60px;
    background: radial-gradient(circle, rgba(255, 60, 172, 0.05) 0%, transparent 70%);
    animation: blobDrift2 25s ease-in-out infinite;
}

@keyframes blobDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    50% { transform: translate(-20px, 15px) scale(1.1); opacity: 0.8; }
}

@keyframes blobDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    50% { transform: translate(15px, -20px) scale(1.05); opacity: 0.7; }
}

/* --- Color Swatches --- */
.color-swatches {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.swatch {
    height: 24px;
    border-radius: 3px;
    opacity: 0.85;
    animation: swatchPulse 4s ease-in-out infinite;
}

.swatch:nth-child(2) { animation-delay: 0.5s; }
.swatch:nth-child(3) { animation-delay: 1s; }
.swatch:nth-child(4) { animation-delay: 1.5s; }
.swatch:nth-child(5) { animation-delay: 2s; }
.swatch:nth-child(6) { animation-delay: 2.5s; }

@keyframes swatchPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* --- Sine Wave --- */
.sine-svg {
    width: 100%;
    height: 60px;
    margin-bottom: 8px;
}

.sine-wave {
    animation: sineScroll 4s linear infinite;
}

@keyframes sineScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-40px); }
}

/* --- Dot Matrix --- */
.dot-matrix {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    max-width: 160px;
    margin: 0 auto;
}

.matrix-dot {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--void-indigo);
    transition: background 0.5s ease;
}

/* --- Bottom Bar --- */
.bottom-bar {
    height: 48px;
    background: var(--panel-slate);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-top: 1px solid rgba(123, 123, 255, 0.1);
    flex-shrink: 0;
    gap: 16px;
}

.bottom-status {
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    color: var(--ghost-lavender);
    white-space: nowrap;
}

.breathing-loader {
    display: flex;
    gap: 3px;
    align-items: center;
}

.loader-bar {
    width: 3px;
    height: 12px;
    background: var(--electric-iris);
    border-radius: 1px;
    animation: breatheLoader 1.5s ease-in-out infinite;
}

.loader-bar:nth-child(2) { animation-delay: 0.2s; }
.loader-bar:nth-child(3) { animation-delay: 0.4s; }

@keyframes breatheLoader {
    0%, 100% { height: 6px; opacity: 0.4; }
    50% { height: 16px; opacity: 1; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .grid-main {
        grid-template-columns: 1fr 1fr;
    }

    .column-right {
        display: none;
    }
}

@media (max-width: 640px) {
    .grid-main {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .column-left, .column-center, .column-right {
        overflow: visible;
    }

    .panel {
        flex: none;
        min-height: 200px;
    }

    .panel-eye {
        min-height: 140px;
    }

    .panel-main {
        min-height: 400px;
    }

    .bottom-bar {
        flex-wrap: wrap;
        height: auto;
        padding: 8px 16px;
        gap: 8px;
    }
}
