/* Reset and Base Styles */
html, body {
    margin: 0;
    padding: 0;
    background: #08080C;
    color: #E8E8EC;
    font-family: 'Barlow Condensed', 'Fira Mono', monospace;
    overflow-x: hidden;
    width: 100%;
    height: 100%;
}

body {
    display: block;
}

/* Star Field */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    box-shadow:
        120px 45px 0 0 rgb(232, 232, 236),
        198px 127px 0 0 rgb(232, 232, 236),
        456px 234px 0 0 rgb(232, 232, 236),
        542px 89px 0 0 rgb(232, 232, 236),
        234px 512px 0 0 rgb(232, 232, 236),
        678px 345px 0 0 rgb(232, 232, 236),
        789px 567px 0 0 rgb(232, 232, 236),
        345px 678px 0 0 rgb(232, 232, 236),
        912px 234px 0 0 rgb(232, 232, 236),
        123px 890px 0 0 rgb(232, 232, 236),
        567px 234px 0 0 rgb(232, 232, 236),
        890px 567px 0 0 rgb(232, 232, 236),
        234px 345px 0 0 rgb(232, 232, 236),
        456px 678px 0 0 rgb(232, 232, 236),
        678px 123px 0 0 rgb(232, 232, 236),
        345px 234px 0 0 rgb(232, 232, 236),
        789px 890px 0 0 rgb(232, 232, 236),
        123px 456px 0 0 rgb(232, 232, 236),
        901px 345px 0 0 rgb(232, 232, 236),
        567px 789px 0 0 rgb(232, 232, 236),
        234px 567px 0 0 rgb(232, 232, 236),
        678px 456px 0 0 rgb(232, 232, 236),
        345px 789px 0 0 rgb(232, 232, 236),
        890px 234px 0 0 rgb(232, 232, 236),
        456px 345px 0 0 rgb(232, 232, 236),
        789px 234px 0 0 rgb(232, 232, 236),
        123px 678px 0 0 rgb(232, 232, 236),
        567px 345px 0 0 rgb(232, 232, 236),
        234px 890px 0 0 rgb(232, 232, 236),
        901px 678px 0 0 rgb(232, 232, 236),
        345px 456px 0 0 rgb(232, 232, 236),
        678px 789px 0 0 rgb(232, 232, 236),
        456px 789px 0 0 rgb(232, 232, 236),
        789px 456px 0 0 rgb(232, 232, 236),
        234px 123px 0 0 rgb(232, 232, 236),
        567px 678px 0 0 rgb(232, 232, 236),
        890px 345px 0 0 rgb(232, 232, 236),
        123px 234px 0 0 rgb(232, 232, 236),
        456px 567px 0 0 rgb(232, 232, 236),
        345px 890px 0 0 rgb(232, 232, 236),
        678px 234px 0 0 rgb(232, 232, 236),
        789px 345px 0 0 rgb(232, 232, 236),
        234px 456px 0 0 rgb(232, 232, 236),
        901px 234px 0 0 rgb(232, 232, 236),
        567px 456px 0 0 rgb(232, 232, 236),
        234px 678px 0 0 rgb(232, 232, 236),
        890px 678px 0 0 rgb(232, 232, 236),
        345px 567px 0 0 rgb(232, 232, 236),
        678px 345px 0 0 rgb(232, 232, 236),
        456px 234px 0 0 rgb(232, 232, 236),
        789px 678px 0 0 rgb(232, 232, 236),
        123px 789px 0 0 rgb(232, 232, 236),
        234px 345px 0 0 rgb(232, 232, 236);
}

/* Panel Base */
.panel {
    width: 100vw;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(45, 168, 255, 0.2);
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    background: #FFFFFF;
    opacity: 0;
    pointer-events: none;
}

.panel:first-child {
    border-top: none;
}

/* Panel Alpha: Identity Beacon */
.panel-alpha {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #08080C;
    overflow: hidden;
}

.constellation-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(45deg, rgba(45, 168, 255, 0.1) 1px, transparent 1px),
        linear-gradient(-45deg, rgba(45, 168, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    opacity: 0.3;
    z-index: -1;
}

.identity-beacon {
    position: relative;
    z-index: 10;
    text-align: center;
}

.domain-identifier {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0;
    color: #2DA8FF;
    text-shadow: 0 0 20px rgba(45, 168, 255, 0.6);
    animation: glow-pulse 3s ease-in-out infinite;
}

.beacon-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border: 2px solid rgba(45, 168, 255, 0.5);
    border-radius: 50%;
    animation: ring-expand 4s ease-out infinite;
    z-index: -1;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-weight: 500;
    letter-spacing: 0.05em;
    color: #3AE68F;
    animation: scroll-bounce 2s ease-in-out infinite;
}

/* Panel Beta: Status Readouts */
.panel-beta {
    background: #08080C;
    padding: 2rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(45, 168, 255, 0.3);
    padding-bottom: 1rem;
}

.panel-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2DA8FF;
    text-shadow: 0 0 10px rgba(45, 168, 255, 0.4);
}

.timestamp {
    font-family: 'Fira Mono', monospace;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: #3AE68F;
}

.readout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.readout-block {
    border: 1px solid rgba(45, 168, 255, 0.2);
    padding: 1.5rem;
    background: rgba(8, 8, 12, 0.5);
}

.readout-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #FF2D7B;
    margin: 0 0 1rem 0;
    text-shadow: 0 0 8px rgba(255, 45, 123, 0.3);
}

.readout-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-weight: 500;
    letter-spacing: 0.05em;
}

.data-label {
    color: #5A5A64;
    font-family: 'Fira Mono', monospace;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    text-transform: uppercase;
}

.data-value {
    color: #3AE68F;
    font-family: 'Fira Mono', monospace;
    font-weight: 700;
    font-size: clamp(0.85rem, 1.6vw, 1.05rem);
}

.unit {
    color: #5A5A64;
    font-size: 0.8em;
    margin-left: 0.3em;
}

.signal-bar {
    margin: 1rem 0;
}

.bar-label {
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    color: #5A5A64;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Fira Mono', monospace;
}

.bar-container {
    height: 8px;
    background: rgba(90, 90, 100, 0.2);
    border: 1px solid rgba(90, 90, 100, 0.4);
    margin: 0.4rem 0;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.bar-value {
    text-align: right;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    color: #E8E8EC;
    font-weight: 700;
}

.feed-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: clamp(0.75rem, 1.3vw, 0.95rem);
    margin: 0.5rem 0;
    font-family: 'Fira Mono', monospace;
}

.feed-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: status-pulse 2s ease-in-out infinite;
}

.feed-status.active {
    background: #3AE68F;
    box-shadow: 0 0 8px #3AE68F;
}

.feed-status.inactive {
    background: #5A5A64;
}

.feed-name {
    color: #E8E8EC;
}

/* Panel Gamma: Telemetry Visualization */
.panel-gamma {
    background: #08080C;
    padding: 2rem;
}

.visualization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.visualization-block {
    border: 1px solid rgba(45, 168, 255, 0.2);
    padding: 1.5rem;
    background: rgba(8, 8, 12, 0.5);
}

.viz-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2DA8FF;
    margin: 0 0 1rem 0;
    text-shadow: 0 0 8px rgba(45, 168, 255, 0.3);
}

.sparkline {
    width: 100%;
    height: 100px;
    margin: 1rem 0;
}

.radar-chart {
    width: 100%;
    height: 200px;
    margin: 1rem 0;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 180px;
    gap: 1rem;
    margin: 1rem 0;
}

.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.chart-bar .bar-fill {
    width: 100%;
    background: #2DA8FF;
    transition: all 0.3s ease;
}

.bar-freq {
    font-size: clamp(0.65rem, 1rem, 0.85rem);
    color: #5A5A64;
    text-align: center;
    font-family: 'Fira Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.metric-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.metric {
    text-align: center;
    padding: 1rem;
    border: 1px solid rgba(45, 168, 255, 0.3);
    background: rgba(45, 168, 255, 0.05);
}

.metric-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 700;
    color: #FFB82D;
    text-shadow: 0 0 8px rgba(255, 184, 45, 0.4);
}

.metric-label {
    font-size: clamp(0.65rem, 1.1vw, 0.85rem);
    color: #5A5A64;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

/* Panel Delta: Notes */
.panel-delta {
    background: #08080C;
    padding: 2rem;
}

.notes-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.notes-content p {
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
    line-height: 1.6;
    color: #E8E8EC;
    margin: 1.5rem 0;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.notes-content p:first-child {
    margin-top: 0;
}

/* Animations */
@keyframes glow-pulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(45, 168, 255, 0.6), 0 0 40px rgba(45, 168, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 30px rgba(45, 168, 255, 0.8), 0 0 60px rgba(45, 168, 255, 0.5);
    }
}

@keyframes ring-expand {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        border-color: rgba(45, 168, 255, 0.8);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        border-color: rgba(45, 168, 255, 0);
        opacity: 0;
    }
}

@keyframes scroll-bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes status-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .readout-grid {
        grid-template-columns: 1fr;
    }

    .visualization-grid {
        grid-template-columns: 1fr;
    }

    .metric-display {
        grid-template-columns: 1fr;
    }

    .beacon-ring {
        width: 200px;
        height: 200px;
    }
}
