/* oning.stream - Street-Style Chrome Dashboard */
/* Colors: #121018, #1A1820, #222028, #2A2830, #4A4850, #A098B0, #A0B0A0, #C0B8D0, #E8E0F0 */
/* Fonts: Permanent Marker, Inter, Space Mono, Lora */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background: #121018;
}

body {
    background: #121018;
    color: #A098B0;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.75;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Ripple Canvas Overlay */
#ripple-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(180, 170, 190, 0.15) 0%, rgba(180, 170, 190, 0.06) 40%, transparent 70%);
    transform: scale(0);
    animation: rippleExpand 0.5s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Dashboard Grid */
#dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 12px;
    padding: 20px;
    max-width: 1440px;
    margin: 0 auto;
    padding-bottom: 140px;
    position: relative;
    z-index: 1;
}

/* Panel Base */
.panel {
    background: linear-gradient(145deg, #1A1820, #222028);
    border: 1px solid #4A4850;
    border-radius: 8px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #C0B8D0, transparent);
    opacity: 0.15;
    transition: opacity 0.4s ease;
}

.panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(192, 184, 208, 0.02) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.panel:hover {
    border-color: rgba(160, 152, 176, 0.5);
    box-shadow: 0 0 40px rgba(192, 184, 208, 0.06), inset 0 0 40px rgba(192, 184, 208, 0.02);
}

.panel:hover::before {
    opacity: 0.45;
}

.panel:hover::after {
    opacity: 1;
}

/* Panel Label */
.panel-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    color: #C0B8D0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 16px;
    opacity: 0.7;
}

/* Header Panel */
.panel-header {
    grid-column: 1 / 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 220px;
    background: linear-gradient(145deg, #1A1820 0%, #222028 60%, #2A2830 100%);
}

.header-chrome-line {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #C0B8D0, transparent);
    margin-bottom: 16px;
    opacity: 0.4;
}

.graffiti-title {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 400;
    color: #E8E0F0;
    letter-spacing: 0.05em;
    text-shadow: 0 0 60px rgba(232, 224, 240, 0.12), 0 0 120px rgba(232, 224, 240, 0.04), 0 2px 4px rgba(0, 0, 0, 0.6);
    line-height: 1.1;
    position: relative;
    z-index: 2;
}

.subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: #A098B0;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 12px;
    opacity: 0.5;
}

.header-tag-marks {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    opacity: 0.3;
}

.tag-mark {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.1rem;
    color: #A0B0A0;
}

.tag-mark-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    color: #4A4850;
    letter-spacing: 0.2em;
}

/* Status Panel */
.panel-status {
    grid-column: 3;
    grid-row: 1;
}

.status-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4A4850;
    flex-shrink: 0;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.status-dot.active {
    background: #A0B0A0;
    box-shadow: 0 0 10px rgba(160, 176, 160, 0.5), 0 0 20px rgba(160, 176, 160, 0.15);
}

.status-dot.pulse {
    background: #C0B8D0;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.4; box-shadow: 0 0 5px rgba(192, 184, 208, 0.2); }
    50% { opacity: 1; box-shadow: 0 0 15px rgba(192, 184, 208, 0.6); }
}

.status-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: #A098B0;
    letter-spacing: 0.08em;
}

/* Feed Panel */
.panel-feed {
    grid-column: 4;
    grid-row: 1 / 3;
}

.feed-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 340px;
    overflow: hidden;
}

.feed-line {
    display: flex;
    gap: 12px;
    align-items: baseline;
    opacity: 0;
    animation: feedFadeIn 0.5s ease forwards;
}

.feed-line:nth-child(1) { animation-delay: 0.2s; }
.feed-line:nth-child(2) { animation-delay: 0.5s; }
.feed-line:nth-child(3) { animation-delay: 0.8s; }
.feed-line:nth-child(4) { animation-delay: 1.1s; }
.feed-line:nth-child(5) { animation-delay: 1.4s; }
.feed-line:nth-child(6) { animation-delay: 1.7s; }

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

.feed-time {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: #4A4850;
    white-space: nowrap;
    flex-shrink: 0;
}

.feed-data {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: #A098B0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Metrics Panel */
.panel-metrics {
    grid-column: 1;
    grid-row: 2;
}

.metric-blocks {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.metric-block {
    text-align: left;
}

.metric-value {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    font-weight: 400;
    color: #E8E0F0;
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: 0 0 20px rgba(232, 224, 240, 0.08);
}

.metric-name {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: #4A4850;
    letter-spacing: 0.15em;
    margin-top: 4px;
}

/* Waveform Panel */
.panel-waveform {
    grid-column: 2 / 4;
    grid-row: 2;
}

#waveformCanvas {
    width: 100%;
    height: 120px;
    display: block;
}

/* Quote Panel */
.panel-quote {
    grid-column: 1 / 3;
    grid-row: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 160px;
}

.chrome-quote {
    max-width: 500px;
}

.quote-text {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    color: #C0B8D0;
    line-height: 1.8;
    opacity: 0.8;
}

.quote-accent {
    margin-top: 20px;
    width: 200px;
}

.chrome-line-svg {
    width: 100%;
    height: 30px;
}

/* Network Panel */
.panel-network {
    grid-column: 3 / 5;
    grid-row: 3;
    min-height: 200px;
}

#networkCanvas {
    width: 100%;
    height: 160px;
    display: block;
}

/* Tag Panel */
.panel-tag {
    grid-column: 1;
    grid-row: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 140px;
}

.graffiti-tag {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 400;
    color: #E8E0F0;
    line-height: 1;
    text-shadow: 0 0 30px rgba(232, 224, 240, 0.08);
}

.graffiti-tag.secondary {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: #A098B0;
    margin-top: 4px;
    opacity: 0.5;
}

.tag-underline {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #A0B0A0, transparent);
    margin-top: 12px;
    opacity: 0.4;
}

/* Nature Breach Panel */
.panel-nature {
    grid-column: 2 / 4;
    grid-row: 4;
    min-height: 200px;
}

.nature-scene {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nature-svg {
    width: 100%;
    max-height: 180px;
}

.vine {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: vineGrow 3s ease forwards;
}

.vine-main { animation-delay: 0.5s; }
.vine-branch1 { animation-delay: 1.5s; }
.vine-branch2 { animation-delay: 2s; }
.vine-branch3 { animation-delay: 2.5s; }
.vine-secondary { animation-delay: 1s; }
.vine-sec-branch1 { animation-delay: 2.2s; }
.vine-sec-branch2 { animation-delay: 2.7s; }

@keyframes vineGrow {
    to { stroke-dashoffset: 0; }
}

.leaf {
    opacity: 0;
    animation: leafAppear 1s ease forwards;
}

.leaf:nth-of-type(1) { animation-delay: 2.5s; }
.leaf:nth-of-type(2) { animation-delay: 3s; }
.leaf:nth-of-type(3) { animation-delay: 3.5s; }
.leaf:nth-of-type(4) { animation-delay: 4s; }
.leaf:nth-of-type(5) { animation-delay: 3.2s; }
.leaf:nth-of-type(6) { animation-delay: 3.7s; }
.leaf:nth-of-type(7) { animation-delay: 4.2s; }

@keyframes leafAppear {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 0.08; transform: scale(1); }
}

.crack {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: crackSpread 1.5s ease forwards 1s;
}

@keyframes crackSpread {
    to { stroke-dashoffset: 0; }
}

/* Frequency Panel */
.panel-frequency {
    grid-column: 4;
    grid-row: 4;
}

.freq-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 120px;
}

.freq-bar {
    flex: 1;
    background: linear-gradient(to top, #4A4850, #C0B8D0);
    border-radius: 2px 2px 0 0;
    min-height: 4px;
    transition: height 0.3s ease;
    opacity: 0.7;
}

/* Clock Panel */
.panel-clock {
    grid-column: 1 / 3;
    grid-row: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.clock-display {
    font-family: 'Space Mono', monospace;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #E8E0F0;
    letter-spacing: 0.1em;
    text-shadow: 0 0 30px rgba(232, 224, 240, 0.08);
}

.clock-date {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: #4A4850;
    letter-spacing: 0.2em;
    margin-top: 8px;
}

.clock-separator {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4A4850, transparent);
    margin-top: 8px;
}

.clock-zone {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: #4A4850;
    letter-spacing: 0.15em;
    margin-top: 6px;
    opacity: 0.6;
}

/* Coordinates Panel */
.panel-coords {
    grid-column: 3 / 5;
    grid-row: 5;
}

.coord-data {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coord-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.coord-key {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: #4A4850;
    letter-spacing: 0.15em;
    width: 40px;
    flex-shrink: 0;
}

.coord-val {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    color: #A098B0;
    letter-spacing: 0.05em;
}

/* Nature Intrusions */
.nature-intrusion {
    position: absolute;
    pointer-events: none;
    z-index: 3;
}

.nature-top-right {
    top: -10px;
    right: -10px;
    width: 120px;
    height: 120px;
}

.nature-bottom-left {
    bottom: -10px;
    left: -10px;
    width: 100px;
    height: 100px;
}

.nature-tag-corner {
    bottom: -5px;
    right: -5px;
    width: 60px;
    height: 60px;
}

.nature-coord-corner {
    bottom: -8px;
    right: -8px;
    width: 80px;
    height: 80px;
}

/* City Skyline */
#skyline {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

#skyline svg {
    width: 100%;
    height: 100%;
}

/* Opening Animation */
.panel {
    opacity: 0;
    transform: translateY(15px);
    animation: panelMaterialize 0.7s ease forwards;
}

.panel:nth-child(1) { animation-delay: 0.1s; }
.panel:nth-child(2) { animation-delay: 0.2s; }
.panel:nth-child(3) { animation-delay: 0.3s; }
.panel:nth-child(4) { animation-delay: 0.15s; }
.panel:nth-child(5) { animation-delay: 0.25s; }
.panel:nth-child(6) { animation-delay: 0.35s; }
.panel:nth-child(7) { animation-delay: 0.4s; }
.panel:nth-child(8) { animation-delay: 0.2s; }
.panel:nth-child(9) { animation-delay: 0.3s; }
.panel:nth-child(10) { animation-delay: 0.45s; }
.panel:nth-child(11) { animation-delay: 0.35s; }
.panel:nth-child(12) { animation-delay: 0.5s; }

@keyframes panelMaterialize {
    0% {
        opacity: 0;
        transform: translateY(15px);
        filter: brightness(0.4);
    }
    60% {
        filter: brightness(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: brightness(1);
    }
}

/* Skyline parallax entrance */
#skyline {
    opacity: 0;
    animation: skylineFadeIn 1.5s ease forwards 0.6s;
}

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

/* Chrome shimmer on header */
.panel-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(192, 184, 208, 0.03), transparent);
    animation: chromeShimmer 6s ease-in-out infinite 1s;
    pointer-events: none;
}

@keyframes chromeShimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* Responsive */
@media (max-width: 1024px) {
    #dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    .panel-header {
        grid-column: 1 / 3;
    }

    .panel-status {
        grid-column: auto;
        grid-row: auto;
    }

    .panel-feed {
        grid-column: auto;
        grid-row: auto;
    }

    .panel-waveform {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .panel-quote {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .panel-network {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .panel-nature {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .panel-clock {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .panel-coords {
        grid-column: 1 / 3;
        grid-row: auto;
    }
}

@media (max-width: 640px) {
    #dashboard {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 8px;
    }

    .panel-header,
    .panel-waveform,
    .panel-quote,
    .panel-network,
    .panel-nature,
    .panel-clock,
    .panel-coords {
        grid-column: 1;
    }

    .graffiti-title {
        font-size: clamp(1.8rem, 8vw, 2.8rem);
    }

    .clock-display {
        font-size: clamp(1.6rem, 6vw, 2.5rem);
    }
}
