/* ==========================================
   GGOGGL.com - Glitch Art Signal Interface
   ========================================== */

/* CSS Custom Properties */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0d1117;
    --text-primary: #e8e6e3;
    --text-secondary: #6b7280;
    --accent-cyan: #00ffd5;
    --accent-magenta: #ff2d6f;
    --accent-amber: #ffb800;
    --highlight-green: #39ff14;
    --noise-purple: #2d1b69;
    --grid-color: #1a1a2e;

    --font-headline: 'Space Grotesk', sans-serif;
    --font-body: 'IBM Plex Mono', monospace;
    --font-accent: 'Silkscreen', cursive;
    --font-display: 'Unbounded', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    overflow-x: hidden;
    cursor: crosshair;
}

/* SVG Filters - Hidden */
#svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ==========================================
   DEEP BACKGROUND LAYER
   ========================================== */

#deep-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
}

.noise-layer {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: transparent;
    filter: url(#noise-filter);
    opacity: 0.04;
    animation: noiseShift 0.1s steps(5) infinite;
}

@keyframes noiseShift {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-2%, -1%); }
    40% { transform: translate(1%, 2%); }
    60% { transform: translate(-1%, -2%); }
    80% { transform: translate(2%, 1%); }
    100% { transform: translate(0, 0); }
}

.corruption-blocks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.corruption-block {
    position: absolute;
    background: linear-gradient(
        45deg,
        var(--noise-purple) 25%,
        transparent 25%,
        transparent 50%,
        var(--noise-purple) 50%,
        var(--noise-purple) 75%,
        transparent 75%
    );
    background-size: 4px 4px;
    opacity: 0.08;
    animation: corruptionDrift 8s ease-in-out infinite alternate;
}

.corruption-block:nth-child(1) {
    top: 10%;
    left: 5%;
    width: 120px;
    height: 80px;
    animation-delay: 0s;
}

.corruption-block:nth-child(2) {
    top: 30%;
    right: 10%;
    width: 200px;
    height: 40px;
    animation-delay: -1.5s;
}

.corruption-block:nth-child(3) {
    top: 55%;
    left: 15%;
    width: 90px;
    height: 120px;
    animation-delay: -3s;
}

.corruption-block:nth-child(4) {
    top: 70%;
    right: 20%;
    width: 150px;
    height: 60px;
    animation-delay: -4.5s;
}

.corruption-block:nth-child(5) {
    top: 85%;
    left: 40%;
    width: 180px;
    height: 30px;
    animation-delay: -2s;
}

.corruption-block:nth-child(6) {
    top: 45%;
    left: 60%;
    width: 100px;
    height: 100px;
    animation-delay: -5s;
}

@keyframes corruptionDrift {
    0% { transform: translate(0, 0) skewX(0deg); opacity: 0.04; }
    50% { transform: translate(20px, -10px) skewX(2deg); opacity: 0.1; }
    100% { transform: translate(-10px, 15px) skewX(-1deg); opacity: 0.06; }
}

/* ==========================================
   SCANLINE OVERLAY
   ========================================== */

#scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 900;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 2px,
        rgba(255, 255, 255, 0.03) 3px
    );
}

/* ==========================================
   GLITCH FLASH
   ========================================== */

#glitch-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 950;
    pointer-events: none;
    background: var(--text-primary);
    mix-blend-mode: difference;
    opacity: 0;
    transition: opacity 0.05s;
}

#glitch-flash.active {
    opacity: 1;
}

/* ==========================================
   CURSOR TRAIL CANVAS
   ========================================== */

#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 800;
    pointer-events: none;
}

/* ==========================================
   NAVIGATION
   ========================================== */

#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 20px;
}

#nav-toggle {
    background: none;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
    position: relative;
    z-index: 1001;
}

#nav-toggle:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 213, 0.3);
}

.nav-glyph {
    line-height: 1;
}

#nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
    z-index: 999;
}

#nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 3vw;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s, transform 0.3s;
    transform: translateX(-40px);
    opacity: 0;
    letter-spacing: 0.05em;
}

#nav-overlay.active .nav-link {
    transform: translateX(0);
    opacity: 1;
}

#nav-overlay.active .nav-link:nth-child(1) { transition-delay: 0.1s; }
#nav-overlay.active .nav-link:nth-child(2) { transition-delay: 0.2s; }
#nav-overlay.active .nav-link:nth-child(3) { transition-delay: 0.3s; }
#nav-overlay.active .nav-link:nth-child(4) { transition-delay: 0.4s; }

.nav-link:hover {
    color: var(--accent-cyan);
    text-shadow:
        2px 0 var(--accent-magenta),
        -2px 0 var(--accent-cyan);
}

/* ==========================================
   SECTION: ACQUIRING SIGNAL
   ========================================== */

.full-screen-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

#acquiring-signal {
    background: var(--bg-primary);
}

.signal-noise-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: opacity 0.3s;
}

.signal-noise-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.static-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(45, 27, 105, 0.1) 1px,
        rgba(45, 27, 105, 0.1) 2px
    );
    animation: staticFlicker 0.08s steps(3) infinite;
}

@keyframes staticFlicker {
    0% { opacity: 0.8; background-position: 0 0; }
    33% { opacity: 0.6; background-position: 1px 1px; }
    66% { opacity: 0.9; background-position: -1px 0; }
    100% { opacity: 0.7; background-position: 0 -1px; }
}

.signal-fragments {
    position: relative;
    z-index: 1;
}

.fragment {
    display: block;
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 6vw;
    color: var(--accent-cyan);
    opacity: 0;
    animation: fragmentFlicker 2s ease-in-out infinite;
    position: absolute;
    white-space: nowrap;
}

.fragment-1 {
    top: -60px;
    left: -100px;
    animation-delay: 0s;
    color: var(--accent-cyan);
}

.fragment-2 {
    top: 20px;
    left: 80px;
    animation-delay: 0.3s;
    color: var(--accent-magenta);
    font-size: 4vw;
}

.fragment-3 {
    top: -20px;
    left: -200px;
    animation-delay: 0.7s;
    color: var(--accent-amber);
    font-size: 3vw;
}

.fragment-4 {
    top: 60px;
    left: -50px;
    animation-delay: 1.1s;
    color: var(--text-secondary);
    font-size: 2vw;
}

@keyframes fragmentFlicker {
    0%, 100% { opacity: 0; transform: translateX(0) skewX(0); }
    10% { opacity: 0.8; transform: translateX(5px) skewX(-2deg); }
    15% { opacity: 0; transform: translateX(-3px) skewX(1deg); }
    25% { opacity: 0.6; transform: translateX(0) skewX(0); }
    30% { opacity: 0; }
    50% { opacity: 0; }
    60% { opacity: 0.9; transform: translateX(-5px) skewX(3deg); }
    65% { opacity: 0; }
}

.signal-status {
    position: relative;
    z-index: 1;
    margin-top: 120px;
    font-family: var(--font-accent);
    font-size: 14px;
    color: var(--accent-amber);
    letter-spacing: 0.2em;
}

.status-label {
    color: var(--text-secondary);
    margin-right: 10px;
}

.signal-bars {
    display: flex;
    gap: 4px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.bar {
    width: 6px;
    height: 20px;
    background: var(--accent-cyan);
    opacity: 0.3;
    animation: barPulse 1.5s ease-in-out infinite;
}

.bar-1 { animation-delay: 0s; height: 10px; }
.bar-2 { animation-delay: 0.15s; height: 15px; }
.bar-3 { animation-delay: 0.3s; height: 20px; }
.bar-4 { animation-delay: 0.45s; height: 15px; }
.bar-5 { animation-delay: 0.6s; height: 10px; }

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

/* Signal locked content */
.signal-locked-content {
    position: relative;
    z-index: 3;
    text-align: center;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.signal-locked-content.visible {
    opacity: 1;
    transform: scale(1);
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 12vw;
    line-height: 0.9;
    mix-blend-mode: difference;
    letter-spacing: -0.02em;
    position: relative;
}

/* Glitch Text Effect */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    color: var(--accent-cyan);
    left: 2px;
    text-shadow: -2px 0 var(--accent-magenta);
    clip-path: inset(0 0 65% 0);
    animation: glitchTop 3s steps(20) infinite;
}

.glitch-text::after {
    color: var(--accent-magenta);
    left: -2px;
    text-shadow: 2px 0 var(--accent-cyan);
    clip-path: inset(65% 0 0 0);
    animation: glitchBottom 2.5s steps(20) infinite;
}

@keyframes glitchTop {
    0% { clip-path: inset(0 0 85% 0); transform: translate(0); }
    5% { clip-path: inset(15% 0 60% 0); transform: translate(-3px, 1px); }
    10% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -1px); }
    15% { clip-path: inset(0 0 85% 0); transform: translate(0); }
    100% { clip-path: inset(0 0 85% 0); transform: translate(0); }
}

@keyframes glitchBottom {
    0% { clip-path: inset(85% 0 0 0); transform: translate(0); }
    5% { clip-path: inset(60% 0 15% 0); transform: translate(3px, -1px); }
    10% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, 1px); }
    15% { clip-path: inset(85% 0 0 0); transform: translate(0); }
    100% { clip-path: inset(85% 0 0 0); transform: translate(0); }
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 30px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero-coordinates {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    font-family: var(--font-accent);
    font-size: 12px;
    color: var(--accent-amber);
    letter-spacing: 0.1em;
}

/* ==========================================
   CONTENT SECTIONS SHARED
   ========================================== */

.content-section {
    position: relative;
    z-index: 1;
    padding: 120px 60px;
    min-height: 100vh;
}

.diagonal-cut {
    clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%);
    padding-top: 160px;
    padding-bottom: 160px;
    background: var(--bg-secondary);
}

.section-marker {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 60px;
    font-family: var(--font-accent);
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
}

.marker-label {
    color: var(--accent-cyan);
    font-size: 14px;
}

.marker-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--text-secondary), transparent);
    max-width: 200px;
}

.marker-text {
    text-transform: uppercase;
}

/* ==========================================
   SECTION: SIGNAL DECODED
   ========================================== */

#signal-decoded {
    background: linear-gradient(170deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.section-display-word {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 10vw;
    color: var(--text-primary);
    opacity: 0.06;
    position: absolute;
    top: 80px;
    right: -20px;
    z-index: 0;
    pointer-events: none;
    line-height: 1;
}

.section-display-word[data-blend="true"] {
    mix-blend-mode: difference;
    opacity: 0.1;
}

.decoded-content {
    position: relative;
}

.decoded-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.decoded-block {
    padding: 40px;
    border: 1px solid rgba(107, 114, 128, 0.2);
    position: relative;
    transition: border-color 0.4s, box-shadow 0.4s;
}

.decoded-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 213, 0.02), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.decoded-block:hover {
    border-color: var(--accent-cyan);
    box-shadow:
        0 0 30px rgba(0, 255, 213, 0.05),
        inset 0 0 30px rgba(0, 255, 213, 0.02);
}

.decoded-block:hover::before {
    opacity: 1;
}

.decoded-block-1 {
    grid-column: 1 / 2;
    transform: translateY(20px) rotate(-0.5deg);
}

.decoded-block-2 {
    grid-column: 2 / 3;
    transform: translateY(-10px) rotate(0.3deg);
}

.decoded-block-3 {
    grid-column: 1 / 3;
    max-width: 70%;
    transform: translateX(30px) rotate(-0.2deg);
}

.decoded-heading {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 20px;
    color: var(--accent-cyan);
    margin-bottom: 15px;
    letter-spacing: 0.05em;
}

.decoded-body {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Waveform Divider */
.waveform-divider {
    margin-top: 80px;
    width: 100%;
    height: 80px;
    position: relative;
    z-index: 1;
}

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

/* ==========================================
   SECTION: DATA STREAM
   ========================================== */

#data-stream {
    background: var(--bg-primary);
    overflow: hidden;
}

.data-ticker-container {
    overflow: hidden;
    width: 100%;
    margin-bottom: 60px;
    border-top: 1px solid rgba(107, 114, 128, 0.2);
    border-bottom: 1px solid rgba(107, 114, 128, 0.2);
    padding: 15px 0;
}

.data-ticker {
    display: flex;
    white-space: nowrap;
    animation: tickerScroll 30s linear infinite;
    gap: 0;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    font-family: var(--font-accent);
    font-size: 13px;
    color: var(--accent-cyan);
    letter-spacing: 0.15em;
    padding: 0 10px;
    flex-shrink: 0;
}

.ticker-separator {
    font-family: var(--font-body);
    color: var(--text-secondary);
    opacity: 0.3;
    padding: 0 5px;
    flex-shrink: 0;
}

.stream-visualization {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
}

.data-readout {
    padding: 25px 0;
    border-bottom: 1px solid rgba(107, 114, 128, 0.15);
}

.readout-label {
    font-family: var(--font-accent);
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 10px;
}

.readout-value {
    font-family: var(--font-headline);
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-amber);
    display: block;
}

.integrity-bar {
    width: 100%;
    height: 8px;
    background: rgba(107, 114, 128, 0.15);
    position: relative;
    overflow: hidden;
}

.integrity-fill {
    height: 100%;
    width: 94.7%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--highlight-green));
    box-shadow: 0 0 10px rgba(0, 255, 213, 0.3);
    transition: width 1s ease;
}

.stream-monitor {
    background: rgba(13, 17, 23, 0.5);
    border: 1px solid rgba(107, 114, 128, 0.2);
    padding: 20px;
    position: relative;
}

.stream-monitor::before {
    content: 'SIGNAL MONITOR';
    position: absolute;
    top: 8px;
    left: 20px;
    font-family: var(--font-accent);
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
}

#waveform-canvas {
    width: 100%;
    height: 200px;
    display: block;
}

/* ==========================================
   SECTION: TRANSMISSION LOG
   ========================================== */

#transmission-log {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.log-entries {
    display: flex;
    flex-direction: column;
    gap: 60px;
    max-width: 900px;
    margin: 0 auto;
}

.log-entry {
    display: flex;
    gap: 30px;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.log-entry.visible {
    opacity: 1;
    transform: translateX(0) !important;
}

.log-entry-left {
    transform: translateX(-60px);
}

.log-entry-right {
    transform: translateX(60px);
    flex-direction: row-reverse;
    text-align: right;
}

.log-timestamp {
    font-family: var(--font-accent);
    font-size: 12px;
    color: var(--accent-amber);
    letter-spacing: 0.1em;
    white-space: nowrap;
    padding-top: 5px;
    min-width: 120px;
}

.log-content {
    border: 1px solid rgba(107, 114, 128, 0.2);
    padding: 30px;
    position: relative;
    flex: 1;
}

.log-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-cyan);
    opacity: 0.5;
}

.log-entry-right .log-content::before {
    left: auto;
    right: 0;
}

.log-heading {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.log-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.log-meta {
    display: flex;
    gap: 15px;
}

.log-entry-right .log-meta {
    justify-content: flex-end;
}

.meta-tag {
    font-family: var(--font-accent);
    font-size: 10px;
    color: var(--accent-cyan);
    letter-spacing: 0.15em;
    padding: 4px 10px;
    border: 1px solid rgba(0, 255, 213, 0.2);
}

/* ==========================================
   SECTION: SIGNAL LOST
   ========================================== */

#signal-lost {
    background: var(--bg-primary);
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.signal-degradation {
    text-align: center;
    position: relative;
    z-index: 1;
}

.degraded-heading {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 8vw;
    color: var(--accent-magenta);
    mix-blend-mode: difference;
}

.degraded-body {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 30px auto;
    line-height: 1.8;
    transition: opacity 0.5s;
}

.noise-intensify {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(45, 27, 105, 0.15) 2px,
            rgba(45, 27, 105, 0.15) 3px
        );
    opacity: 0;
    transition: opacity 1s;
    pointer-events: none;
    z-index: 0;
    animation: noiseIntensify 4s ease-in-out infinite alternate;
}

@keyframes noiseIntensify {
    0% { opacity: 0.1; }
    100% { opacity: 0.5; }
}

.reconnect-loop {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.reconnect-animation {
    font-family: var(--font-accent);
    font-size: 12px;
    color: var(--accent-amber);
    letter-spacing: 0.3em;
}

.reconnect-spinner {
    width: 50px;
    height: 50px;
}

.spinner-svg {
    width: 100%;
    height: 100%;
    animation: spinnerRotate 2s linear infinite;
}

@keyframes spinnerRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-circle {
    stroke: var(--accent-cyan);
    opacity: 0.5;
}

/* ==========================================
   GLITCH BARS
   ========================================== */

#glitch-bars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 850;
    pointer-events: none;
}

.glitch-bar {
    position: absolute;
    left: 0;
    width: 100%;
    background: var(--accent-cyan);
    opacity: 0;
    mix-blend-mode: overlay;
}

.glitch-bar:nth-child(1) {
    height: 4px;
    top: 20%;
}

.glitch-bar:nth-child(2) {
    height: 12px;
    top: 50%;
    background: var(--accent-magenta);
}

.glitch-bar:nth-child(3) {
    height: 6px;
    top: 75%;
    background: var(--accent-amber);
}

/* ==========================================
   GLITCH BAR ANIMATION
   ========================================== */

@keyframes glitchBarSlide {
    0% { transform: translateX(-100%); opacity: 0; }
    5% { opacity: 0.7; }
    50% { opacity: 0.5; }
    95% { opacity: 0.7; }
    100% { transform: translateX(100%); opacity: 0; }
}

.glitch-bar.active {
    animation: glitchBarSlide 0.15s linear;
}

/* ==========================================
   DECODE TEXT ANIMATION
   ========================================== */

.decode-text {
    opacity: 0;
    transition: opacity 0.3s;
}

.decode-text.decoded {
    opacity: 1;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 900px) {
    .decoded-grid {
        grid-template-columns: 1fr;
    }

    .decoded-block-1,
    .decoded-block-2,
    .decoded-block-3 {
        grid-column: 1;
        max-width: 100%;
        transform: none;
    }

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

    .content-section {
        padding: 80px 30px;
    }

    .hero-title {
        font-size: 16vw;
    }

    .hero-coordinates {
        flex-direction: column;
        gap: 8px;
    }

    .nav-link {
        font-size: 6vw;
    }

    .log-entry {
        flex-direction: column;
        gap: 10px;
    }

    .log-entry-right {
        flex-direction: column;
        text-align: left;
    }

    .log-entry-right .log-content::before {
        left: 0;
        right: auto;
    }

    .log-entry-right .log-meta {
        justify-content: flex-start;
    }

    .degraded-heading {
        font-size: 12vw;
    }
}

@media (max-width: 600px) {
    .content-section {
        padding: 60px 20px;
    }

    .hero-title {
        font-size: 20vw;
    }

    .section-display-word {
        font-size: 15vw;
    }

    .decoded-block {
        padding: 25px;
    }
}
