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

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

body {
    background: #0F2030;
    color: #E0F0F0;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    position: relative;
}

/* ==================== SECTION 1: LIGHTHOUSE DECK ==================== */
.lighthouse-deck {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #0F2030 0%, #1A2A3A 100%);
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.kinetic-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.kinetic-title span {
    display: inline-block;
    animation: letter-wave 0.8s ease-in-out infinite alternate;
    color: #7AC0C8;
    text-shadow: 0 0 10px rgba(122, 192, 200, 0.5);
}

.kinetic-title span:nth-child(2) { animation-delay: 0.15s; }
.kinetic-title span:nth-child(3) { animation-delay: 0.3s; }
.kinetic-title span:nth-child(4) { animation-delay: 0.45s; }
.kinetic-title span:nth-child(5) { animation-delay: 0.6s; }
.kinetic-title span:nth-child(6) { animation-delay: 0.75s; }
.kinetic-title span:nth-child(7) { animation-delay: 0.9s; }
.kinetic-title span:nth-child(8) { animation-delay: 1.05s; }
.kinetic-title span:nth-child(9) { animation-delay: 1.2s; }
.kinetic-title span:nth-child(10) { animation-delay: 1.35s; }
.kinetic-title span:nth-child(11) { animation-delay: 1.5s; }
.kinetic-title span:nth-child(12) { animation-delay: 1.65s; }

@keyframes letter-wave {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-3px);
    }
}

.subtitle {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: #90B0B8;
    max-width: 600px;
    letter-spacing: 0.02em;
}

/* ==================== FLOATING SPHERES ==================== */
.floating-spheres {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.sphere {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #7AC0C8, #1A2A3A);
    filter: blur(0.5px);
    animation: float-up linear infinite;
}

.sphere:nth-child(1) { width: 12px; height: 12px; animation-duration: 8s; opacity: 0.4; }
.sphere:nth-child(2) { width: 18px; height: 18px; animation-duration: 10s; opacity: 0.3; }
.sphere:nth-child(3) { width: 10px; height: 10px; animation-duration: 12s; opacity: 0.35; }
.sphere:nth-child(4) { width: 16px; height: 16px; animation-duration: 9s; opacity: 0.4; }
.sphere:nth-child(5) { width: 14px; height: 14px; animation-duration: 11s; opacity: 0.3; }
.sphere:nth-child(6) { width: 8px; height: 8px; animation-duration: 13s; opacity: 0.25; }
.sphere:nth-child(7) { width: 20px; height: 20px; animation-duration: 7s; opacity: 0.35; }
.sphere:nth-child(8) { width: 12px; height: 12px; animation-duration: 10s; opacity: 0.3; }
.sphere:nth-child(9) { width: 15px; height: 15px; animation-duration: 12s; opacity: 0.4; }
.sphere:nth-child(10) { width: 10px; height: 10px; animation-duration: 9s; opacity: 0.35; }
.sphere:nth-child(11) { width: 18px; height: 18px; animation-duration: 11s; opacity: 0.3; }
.sphere:nth-child(12) { width: 14px; height: 14px; animation-duration: 8s; opacity: 0.4; }
.sphere:nth-child(13) { width: 12px; height: 12px; animation-duration: 10s; opacity: 0.25; }
.sphere:nth-child(14) { width: 16px; height: 16px; animation-duration: 12s; opacity: 0.35; }
.sphere:nth-child(15) { width: 8px; height: 8px; animation-duration: 9s; opacity: 0.3; }
.sphere:nth-child(16) { width: 20px; height: 20px; animation-duration: 13s; opacity: 0.4; }
.sphere:nth-child(17) { width: 11px; height: 11px; animation-duration: 10s; opacity: 0.35; }
.sphere:nth-child(18) { width: 17px; height: 17px; animation-duration: 11s; opacity: 0.3; }
.sphere:nth-child(19) { width: 13px; height: 13px; animation-duration: 8s; opacity: 0.4; }
.sphere:nth-child(20) { width: 19px; height: 19px; animation-duration: 12s; opacity: 0.25; }

@keyframes float-up {
    from {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    to {
        transform: translateY(-100px) translateX(sinewaveX);
        opacity: 0;
    }
}

/* Override oscillation with JavaScript */
.sphere {
    animation: float-up-infinite linear infinite;
}

@keyframes float-up-infinite {
    0% {
        transform: translateY(0) translateX(0);
    }
    100% {
        transform: translateY(-120vh) translateX(0);
    }
}

/* ==================== SECTION 2: DASHBOARD ==================== */
.dashboard {
    padding: 4rem 2rem;
    max-width: 68rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.panel {
    background: #1A2A3A;
    border: 1px solid rgba(74, 138, 154, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #E0F0F0;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(122, 192, 200, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.panel.large {
    grid-column: span 2;
}

.panel h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    color: #E8C870;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.readout {
    position: relative;
    z-index: 1;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: #90B0B8;
}

.readout p {
    margin: 0.5rem 0;
}

.signal-bar {
    height: 4px;
    background: linear-gradient(90deg, #7AC0C8, #E8C870);
    border-radius: 2px;
    margin-bottom: 0.5rem;
    box-shadow: 0 0 8px rgba(122, 192, 200, 0.4);
}

.data-line {
    height: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><polyline points="0,15 10,10 20,12 30,5 40,8 50,3 60,7 70,4 80,9 90,6 100,10" stroke="%237AC0C8" stroke-width="1.5" fill="none" opacity="0.6"/></svg>');
    background-size: 20px 20px;
    background-repeat: repeat-x;
    margin-bottom: 0.5rem;
    animation: drift 2s linear infinite;
}

@keyframes drift {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

.time-display {
    font-size: 1.5rem;
    color: #7AC0C8;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.glitch-meter {
    height: 4px;
    background: linear-gradient(90deg, #E8C870, #E87070);
    border-radius: 2px;
    margin-bottom: 0.5rem;
    box-shadow: 0 0 8px rgba(232, 112, 112, 0.3);
}

/* ==================== SECTION 3: DATA VISUALIZATION ==================== */
.visualization {
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.visualization h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: #E8C870;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.wave-container {
    max-width: 600px;
    margin: 0 auto;
    height: 200px;
}

.wave-graphic {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(122, 192, 200, 0.3));
    animation: wave-pulse 3s ease-in-out infinite;
}

@keyframes wave-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(122, 192, 200, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(122, 192, 200, 0.6));
    }
}

/* ==================== SECTION 4: RIPPLE ==================== */
.ripple-section {
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.ripple-section h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: #E8C870;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ripple-container {
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
    position: relative;
}

.ripple-point {
    width: 20px;
    height: 20px;
    background: #7AC0C8;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(122, 192, 200, 0.8);
}

.ripple-point::before,
.ripple-point::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 2px solid #7AC0C8;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple-expand 2s ease-out infinite;
}

.ripple-point::after {
    animation-delay: 0.7s;
}

@keyframes ripple-expand {
    0% {
        width: 40px;
        height: 40px;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

.ripple-text {
    font-family: 'Space Mono', monospace;
    color: #90B0B8;
    font-size: 0.9rem;
}

/* ==================== GLITCH EFFECT ==================== */
@keyframes glitch-color {
    0%, 100% {
        text-shadow: 2px 0 #E87070, -2px 0 #7AC0C8;
    }
    50% {
        text-shadow: -2px 0 #E87070, 2px 0 #7AC0C8;
    }
}

/* Occasional glitch on panels */
.panel:nth-child(odd) {
    animation: panel-glitch 0.3s infinite alternate;
}

@keyframes panel-glitch {
    0% {
        transform: translate(0);
    }
    100% {
        transform: translate(1px, 1px);
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
    }

    .panel.large {
        grid-column: span 1;
    }

    .kinetic-title {
        font-size: clamp(2rem, 6vw, 4rem);
    }

    .wave-container {
        height: 150px;
    }

    .ripple-container {
        width: 200px;
        height: 200px;
    }
}
