/* RRIDDL.com - Noir-Luxe Cyberpunk Design */
/* Colors:
   #0a0a0f Void Black     | #1a1a24 Concrete Charcoal
   #2a2a36 Brutalist Gray | #ff0080 Neon Magenta
   #00ffd5 Electric Cyan  | #ffb800 Phosphor Amber
   #6b7b8d Slate Fog      | #d0d0d0 Text Muted
   #e8e8ec Ash White
   Fonts: Caveat (display/riddles), Space Grotesk (body), Share Tech Mono (HUD) */

:root {
    --bg-void: #0a0a0f;
    --bg-concrete: #1a1a24;
    --border-brutal: #2a2a36;
    --neon-magenta: #ff0080;
    --neon-cyan: #00ffd5;
    --neon-amber: #ffb800;
    --slate-fog: #6b7b8d;
    --text-muted: #d0d0d0;
    --text-ash: #e8e8ec;
}

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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    background: #0a0a0f;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: #0a0a0f;
    color: #d0d0d0;
    overflow-x: hidden;
    line-height: 1.7;
    font-size: 17px;
    font-weight: 400;
    position: relative;
}

/* ===============================
   CRT SCAN-LINE OVERLAY (full viewport)
   =============================== */
.scan-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.04) 2px,
        rgba(0, 0, 0, 0.04) 4px
    );
    mix-blend-mode: multiply;
}

.scan-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
}

/* ===============================
   CIPHER WHEEL NAVIGATION
   =============================== */
#cipher-wheel {
    position: fixed;
    right: 26px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.wheel-marker {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.25em;
    color: #6b7b8d;
    text-transform: uppercase;
    border-bottom: 1px solid #2a2a36;
    padding-bottom: 6px;
    margin-bottom: 4px;
}

.wheel-ring {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wheel-glyph {
    width: 38px;
    height: 38px;
    border: 1px solid #2a2a36;
    background: rgba(10, 10, 15, 0.85);
    color: #6b7b8d;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
}

.wheel-glyph:hover {
    border-color: #00ffd5;
    color: #00ffd5;
    box-shadow: 0 0 15px rgba(0, 255, 213, 0.25);
}

.wheel-glyph.active {
    border-color: #ff0080;
    color: #ff0080;
    box-shadow: 0 0 18px rgba(255, 0, 128, 0.35);
}

.wheel-indicator {
    width: 2px;
    height: 24px;
    background: linear-gradient(180deg, #ff0080, transparent);
    margin-top: 4px;
}

/* ===============================
   TRACE LINES OVERLAY
   =============================== */
.trace-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* ===============================
   SCENE / SECTION BASE
   =============================== */
.scene {
    min-height: 100vh;
    scroll-snap-align: start;
    padding: 96px 48px 80px;
    position: relative;
    overflow: hidden;
}

.scene + .scene {
    margin-top: -24px;
}

.scene::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 0, 128, 0.04) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 30%, rgba(0, 255, 213, 0.035) 0%, transparent 55%),
        linear-gradient(180deg, transparent 0%, rgba(10, 10, 15, 0.2) 100%);
    pointer-events: none;
    z-index: 0;
}

.scene::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50% - 0.5px);
    width: 1px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(42, 42, 54, 0.6) 15%,
        rgba(42, 42, 54, 0.6) 85%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

.scene[data-dominant="magenta"] .riddle-text { text-shadow: 0 0 14px rgba(255, 0, 128, 0.45); }
.scene[data-dominant="cyan"] .riddle-text { text-shadow: 0 0 14px rgba(0, 255, 213, 0.35); }
.scene[data-dominant="amber"] .riddle-text { text-shadow: 0 0 14px rgba(255, 184, 0, 0.35); }

/* ===============================
   COORDINATE LABELS
   =============================== */
.coord-label {
    position: absolute;
    top: 28px;
    right: 100px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #6b7b8d;
    text-transform: uppercase;
    padding: 6px 12px;
    border-left: 2px solid #00ffd5;
    background: rgba(26, 26, 36, 0.7);
    z-index: 50;
}

/* ===============================
   SCENE GRID - 16 COLUMN
   =============================== */
.scene-grid {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    grid-auto-rows: minmax(90px, auto);
    gap: 22px;
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
    z-index: 4;
}

/* Void channel (columns 7-8) - intentionally empty */

/* ===============================
   PANELS & CORNER BRACKETS
   =============================== */
.panel {
    position: relative;
    background: rgba(26, 26, 36, 0.72);
    border: 1px solid #2a2a36;
    padding: 28px;
    z-index: 10;
    transition: border-color 0.3s ease;
    backdrop-filter: blur(2px);
}

.panel::before,
.panel::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: #00ffd5;
    border-style: solid;
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.3s ease;
    pointer-events: none;
}

.panel::before {
    top: -4px;
    left: -4px;
    border-width: 4px 0 0 4px;
}

.panel::after {
    bottom: -4px;
    right: -4px;
    border-width: 0 4px 4px 0;
}

.panel:hover::before,
.panel:hover::after {
    width: 36px;
    height: 36px;
    border-color: #ff0080;
}

.panel-tag {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.25em;
    color: #6b7b8d;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
    padding: 2px 8px;
    border: 1px solid #2a2a36;
}

/* ===============================
   SKELETON SHIMMER SYSTEM
   =============================== */
.skeleton-block {
    background: linear-gradient(90deg, #1a1a24 25%, #2a2a36 50%, #1a1a24 75%);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
    border-radius: 2px;
    position: relative;
}

.skeleton-wide { width: 100%; height: 12px; margin: 18px 0; }
.skeleton-narrow { width: 60%; height: 8px; margin-top: 18px; }
.skeleton-header { width: 42%; height: 8px; margin-top: 10px; }
.skeleton-sq { width: 92px; height: 92px; margin-bottom: 10px; }
.skeleton-rect { width: 160px; height: 52px; }
.skeleton-panel { width: 100%; height: 22px; margin-top: 22px; }

.skeleton-cluster {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0.6;
    z-index: 8;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===============================
   TYPOGRAPHY
   =============================== */
.riddle-title {
    font-family: 'Caveat', cursive;
    font-size: clamp(84px, 13vw, 168px);
    font-weight: 700;
    color: #e8e8ec;
    letter-spacing: 0.02em;
    text-shadow:
        0 0 20px rgba(255, 0, 128, 0.4),
        0 0 60px rgba(255, 0, 128, 0.15);
    line-height: 0.9;
    margin: 6px 0 12px -4px;
}

.subtitle-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: #6b7b8d;
    font-weight: 400;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: #00ffd5;
    border-bottom: 1px solid #2a2a36;
    padding-bottom: 10px;
    display: inline-block;
    margin-bottom: 8px;
}

.section-note {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: #6b7b8d;
    margin-top: 6px;
}

.section-header {
    z-index: 10;
    position: relative;
}

/* ===============================
   RIDDLE CARDS (panels)
   =============================== */
.riddle-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.28em;
    color: #ff0080;
    text-transform: uppercase;
    display: block;
    margin-bottom: 14px;
}

.riddle-text {
    font-family: 'Caveat', cursive;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 700;
    color: #e8e8ec;
    letter-spacing: 0.02em;
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.3);
    line-height: 1.25;
    transition: text-shadow 0.4s ease;
    cursor: default;
}

.riddle-text:hover {
    text-shadow:
        0 0 20px rgba(255, 0, 128, 0.6),
        0 0 40px rgba(255, 0, 128, 0.3),
        0 0 80px rgba(255, 0, 128, 0.1);
}

/* ===============================
   THRESHOLD META
   =============================== */
.threshold-meta {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: #6b7b8d;
    text-transform: uppercase;
}

.meta-dot {
    width: 8px;
    height: 8px;
    background: #00ffd5;
    box-shadow: 0 0 10px rgba(0, 255, 213, 0.7);
    animation: blink 2s infinite;
}

.meta-divider { color: #2a2a36; }
.meta-text { color: #6b7b8d; }

.threshold-footer {
    padding-top: 24px;
    z-index: 10;
}

.threshold-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ff0080, #00ffd5, transparent);
    margin-bottom: 14px;
}

.threshold-caption {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.35em;
    color: #6b7b8d;
    text-transform: uppercase;
    display: block;
    text-align: center;
}

/* ===============================
   SCROLL INDICATOR
   =============================== */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    animation: floatDown 2s ease-in-out infinite;
    z-index: 20;
}

.scroll-arrow {
    font-size: 22px;
    color: #00ffd5;
    text-shadow: 0 0 10px rgba(0, 255, 213, 0.5);
}

.scroll-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #6b7b8d;
}

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

/* ===============================
   RETICLES (Targeting rings)
   =============================== */
.reticle {
    position: relative;
    width: 100%;
    max-width: 140px;
    aspect-ratio: 1;
    z-index: 6;
    align-self: start;
}

.reticle-sm { max-width: 100px; }
.reticle-large { max-width: 220px; align-self: center; justify-self: center; }

.reticle svg {
    width: 100%;
    height: 100%;
}

.reticle-outer {
    transform-origin: center;
    animation: rotateCW 30s linear infinite;
}

.reticle-inner {
    transform-origin: center;
    animation: rotateCCW 20s linear infinite;
}

@keyframes rotateCW { to { transform: rotate(360deg); } }
@keyframes rotateCCW { to { transform: rotate(-360deg); } }

/* ===============================
   ANGULAR STATUS BARS
   =============================== */
.angular-bar {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.25em;
    color: #6b7b8d;
    text-transform: uppercase;
    min-width: 74px;
}

.bar-track {
    flex: 1;
    height: 6px;
    background: #1a1a24;
    border: 1px solid #2a2a36;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 100%, 6px 100%);
}

.bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ffd5, #ffb800);
    box-shadow: 0 0 8px rgba(0, 255, 213, 0.5);
    transition: width 1.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.bar-fill.bar-magenta { background: linear-gradient(90deg, #ff0080, #ff4da6); box-shadow: 0 0 8px rgba(255, 0, 128, 0.5); }
.bar-fill.bar-cyan { background: linear-gradient(90deg, #00ffd5, #00aaff); box-shadow: 0 0 8px rgba(0, 255, 213, 0.5); }
.bar-fill.bar-amber { background: linear-gradient(90deg, #ffb800, #ff8a00); box-shadow: 0 0 8px rgba(255, 184, 0, 0.5); }

/* ===============================
   FERN CONTAINERS / SVG BIOLOGY
   =============================== */
.fern-container {
    position: relative;
    z-index: 2;
    opacity: 0.85;
    align-self: stretch;
    transition: transform 0.35s ease-out;
}

.fern-mirrored {
    transform: scaleX(-1);
}

.fractal-fern {
    width: 100%;
    height: auto;
    max-height: 360px;
}

.fern-stem {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: drawStem 4s ease forwards;
}

.fern-leaf,
.vine-branch,
.root-branch {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    animation: drawLeaf 2s ease forwards;
}

.fern-leaf:nth-child(2) { animation-delay: 0.4s; }
.fern-leaf:nth-child(3) { animation-delay: 0.7s; }
.fern-leaf:nth-child(4) { animation-delay: 1.0s; }
.fern-leaf:nth-child(5) { animation-delay: 1.3s; }
.fern-leaf:nth-child(6) { animation-delay: 1.6s; }
.fern-leaf:nth-child(7) { animation-delay: 1.9s; }
.fern-leaf:nth-child(8) { animation-delay: 2.2s; }

.data-node {
    animation: pulseNode 3s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.biospore {
    animation: biopulse 3s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

@keyframes drawStem { to { stroke-dashoffset: 0; } }
@keyframes drawLeaf { to { stroke-dashoffset: 0; } }

@keyframes pulseNode {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.25); }
}

@keyframes biopulse {
    0%, 100% { opacity: 0.4; filter: drop-shadow(0 0 4px currentColor); }
    50% { opacity: 1; filter: drop-shadow(0 0 12px currentColor); }
}

/* ===============================
   SPECIMEN CARDS
   =============================== */
.specimen-card {
    z-index: 10;
}

.specimen-visual {
    margin: 20px 0 22px;
    padding: 14px;
    background: rgba(10, 10, 15, 0.5);
    border: 1px solid #2a2a36;
}

.specimen-visual svg {
    width: 100%;
    max-width: 220px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.spore-ring {
    animation: pulseRing 4s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}

.spore-ring:nth-child(2) { animation-delay: 1s; }
.spore-ring:nth-child(3) { animation-delay: 2s; }

@keyframes pulseRing {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.04); }
}

.specimen-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.28em;
    color: #ffb800;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.specimen-desc {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    color: #d0d0d0;
    line-height: 1.6;
}

.specimen-info {
    border-top: 1px solid #2a2a36;
    padding-top: 18px;
}

/* ===============================
   SIGNAL BAND (Data Ticker)
   =============================== */
.scene-signal {
    min-height: auto;
    padding: 64px 0 40px;
}

.signal-band {
    position: relative;
    width: 100%;
    background: rgba(10, 10, 15, 0.9);
    overflow: hidden;
}

.signal-border-top,
.signal-border-bottom {
    height: 6px;
    background:
        linear-gradient(90deg, transparent 0, #00ffd5 20%, #00ffd5 80%, transparent 100%);
    box-shadow: 0 0 12px rgba(0, 255, 213, 0.35);
}

.signal-border-top { border-bottom: 2px solid #00ffd5; }
.signal-border-bottom { border-top: 2px solid #00ffd5; }

.ticker-wrap {
    position: relative;
    height: 80px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(10,10,15,1) 0%, transparent 6%, transparent 94%, rgba(10,10,15,1) 100%),
        linear-gradient(180deg, #0a0a0f 0%, #1a1a24 50%, #0a0a0f 100%);
}

.ticker-track {
    display: flex;
    white-space: nowrap;
    animation: ticker 40s linear infinite;
}

.ticker-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 15px;
    letter-spacing: 0.2em;
    color: #00ffd5;
    text-transform: uppercase;
    padding-right: 40px;
    text-shadow: 0 0 10px rgba(0, 255, 213, 0.4);
}

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

.signal-grid {
    max-width: 1440px;
    margin: 22px auto 0;
    padding: 0 48px;
}

.signal-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    color: #6b7b8d;
    text-transform: uppercase;
    flex-wrap: wrap;
}

.meta-kicker { color: #ff0080; }
.meta-value { color: #d0d0d0; }

/* ===============================
   CHAMBER PANEL
   =============================== */
.chamber-panel,
.chamber-evidence {
    z-index: 10;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a2a36;
}

.panel-status {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.25em;
    color: #ff0080;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1px solid #ff0080;
    background: rgba(255, 0, 128, 0.06);
}

.panel-status.alt {
    color: #00ffd5;
    border-color: #00ffd5;
    background: rgba(0, 255, 213, 0.06);
}

.panel-id {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: #6b7b8d;
    text-transform: uppercase;
}

.cipher-display {
    font-family: 'Caveat', cursive;
    font-size: clamp(26px, 3vw, 42px);
    font-weight: 700;
    color: #6b7b8d;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    line-height: 1.35;
    word-wrap: break-word;
    min-height: 3em;
    padding: 12px;
    background: rgba(10, 10, 15, 0.6);
    border: 1px dashed #2a2a36;
}

.cipher-char {
    display: inline-block;
    transition: all 0.3s ease;
    cursor: default;
}

.cipher-char.space { width: 0.4em; }

.cipher-char.revealed {
    color: #00ffd5;
    text-shadow:
        0 0 15px rgba(0, 255, 213, 0.6),
        0 0 30px rgba(0, 255, 213, 0.3);
    transform: translateY(-2px);
}

.panel-note {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: #6b7b8d;
    font-style: italic;
}

/* ===============================
   EVIDENCE BOARD
   =============================== */
.evidence-board {
    position: relative;
    min-height: 320px;
    background: rgba(10, 10, 15, 0.55);
    border: 1px solid #2a2a36;
    padding: 20px;
    margin-top: 8px;
}

.evidence-item {
    position: absolute;
    max-width: 180px;
    z-index: 3;
}

.evidence-pin {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff0080;
    box-shadow:
        0 0 10px rgba(255, 0, 128, 0.7),
        0 0 20px rgba(255, 0, 128, 0.3);
    margin-bottom: 8px;
    animation: pulsePin 2.4s ease-in-out infinite;
}

@keyframes pulsePin {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.evidence-text {
    font-family: 'Caveat', cursive;
    font-size: 20px;
    font-weight: 700;
    color: #e8e8ec;
    line-height: 1.3;
    text-shadow: 0 0 8px rgba(255, 0, 128, 0.2);
}

.evidence-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.evidence-line {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1.5s ease;
}

.evidence-line.drawn { stroke-dashoffset: 0; }

/* ===============================
   GARDEN (Cipher Garden)
   =============================== */
.scene-garden {
    min-height: 100vh;
}

.garden-scatter {
    position: relative;
    width: 100%;
    min-height: 620px;
    z-index: 6;
}

.garden-grid-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.5;
}

.garden-org {
    position: absolute;
    cursor: help;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), filter 0.4s ease;
    z-index: 7;
}

.garden-org svg {
    display: block;
    width: 100%;
    height: auto;
}

.garden-fern { width: 140px; }
.garden-vine { width: 220px; }
.garden-spore { width: 160px; }
.garden-neural { width: 200px; }
.garden-small { width: 80px; }

.garden-org:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 14px rgba(0, 255, 213, 0.5));
    z-index: 12;
}

.garden-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid #ff0080;
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.25);
    color: #e8e8ec;
    font-family: 'Caveat', cursive;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    white-space: normal;
    min-width: 200px;
    max-width: 260px;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 20;
}

.garden-org:hover .garden-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================
   ARCHIVE ENTRIES
   =============================== */
.archive-entry {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    z-index: 10;
    transition: border-color 0.3s ease, transform 0.4s ease;
}

.archive-entry:hover {
    border-color: #6b7b8d;
}

.entry-index {
    font-family: 'Share Tech Mono', monospace;
    font-size: 34px;
    font-weight: 400;
    color: #2a2a36;
    line-height: 1;
    min-width: 60px;
    letter-spacing: 0.02em;
}

.entry-content {
    flex: 1;
}

.entry-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.25em;
    color: #6b7b8d;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.entry-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    color: #d0d0d0;
    line-height: 1.65;
}

.entry-status {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    padding: 5px 10px;
    border: 1px solid;
    white-space: nowrap;
    align-self: flex-start;
}

.entry-status.decoded { color: #00ffd5; border-color: #00ffd5; background: rgba(0, 255, 213, 0.05); }
.entry-status.pending { color: #ffb800; border-color: #ffb800; background: rgba(255, 184, 0, 0.05); }
.entry-status.encrypted { color: #ff0080; border-color: #ff0080; background: rgba(255, 0, 128, 0.05); }
.entry-status.classified { color: #6b7b8d; border-color: #6b7b8d; background: rgba(107, 123, 141, 0.05); }

.redacted {
    background: #e8e8ec;
    color: #e8e8ec;
    padding: 0 4px;
    transition: all 0.5s ease;
    cursor: pointer;
    border-radius: 1px;
}

.redacted:hover {
    background: transparent;
    color: #ff0080;
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.5);
}

/* ===============================
   TERMINAL
   =============================== */
.scene-terminal {
    background:
        linear-gradient(180deg, #0a0a0f 0%, rgba(10, 10, 15, 0.95) 100%),
        radial-gradient(ellipse at 50% 80%, rgba(0, 255, 213, 0.05) 0%, transparent 60%);
}

.terminal-title {
    color: #00ffd5;
    border-color: #00ffd5;
}

.terminal-block {
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid #00ffd5;
    overflow: hidden;
    position: relative;
    z-index: 10;
    padding: 0;
    box-shadow: 0 0 30px rgba(0, 255, 213, 0.12) inset;
}

.terminal-block::before,
.terminal-block::after {
    border-color: #00ffd5;
}

.terminal-header {
    background: #1a1a24;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #2a2a36;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28c840; }

.terminal-path {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: #6b7b8d;
    margin-left: 8px;
    letter-spacing: 0.1em;
}

.terminal-body {
    padding: 26px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    line-height: 1.8;
}

.terminal-line {
    margin-bottom: 4px;
    opacity: 0;
    transform: translateY(5px);
    animation: terminalReveal 0.5s forwards;
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.terminal-line:nth-child(1) { animation-delay: 0.2s; }
.terminal-line:nth-child(2) { animation-delay: 0.8s; }
.terminal-line:nth-child(3) { animation-delay: 1.4s; }
.terminal-line:nth-child(4) { animation-delay: 2.0s; }
.terminal-line:nth-child(5) { animation-delay: 2.6s; }
.terminal-line:nth-child(6) { animation-delay: 3.2s; }
.terminal-line:nth-child(7) { animation-delay: 3.8s; }
.terminal-line:nth-child(8) { animation-delay: 4.4s; }

@keyframes terminalReveal {
    to { opacity: 1; transform: translateY(0); }
}

.terminal-prompt {
    color: #00ffd5;
    text-shadow: 0 0 6px rgba(0, 255, 213, 0.4);
}

.terminal-cmd { color: #e8e8ec; }
.terminal-response { color: #d0d0d0; }
.terminal-response.dim { color: #6b7b8d; }

.terminal-response.accent {
    color: #ff0080;
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.4);
}

.terminal-cursor {
    color: #00ffd5;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.final-riddle {
    position: relative;
}

/* ===============================
   FOOTER MARK
   =============================== */
.footer-mark {
    text-align: center;
    padding-top: 48px;
    margin-top: 24px;
    z-index: 4;
    position: relative;
}

.footer-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, #ff0080, #00ffd5, #ffb800);
    margin: 0 auto 20px;
}

.footer-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.3em;
    color: #6b7b8d;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.footer-coord {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: #2a2a36;
    text-transform: uppercase;
    display: block;
}

/* ===============================
   GLITCH TEXT EFFECT
   =============================== */
.glitch-text {
    position: relative;
    display: inline-block;
}

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

.glitch-text::before {
    color: #00ffd5;
    animation: glitch1 5s infinite;
}

.glitch-text::after {
    color: #ff0080;
    animation: glitch2 5s infinite;
}

@keyframes glitch1 {
    0%, 90%, 100% { opacity: 0; transform: translate(0); }
    92% { opacity: 0.7; transform: translate(-3px, 2px); }
    94% { opacity: 0; transform: translate(0); }
    96% { opacity: 0.5; transform: translate(2px, -1px); }
    98% { opacity: 0; }
}

@keyframes glitch2 {
    0%, 91%, 100% { opacity: 0; transform: translate(0); }
    93% { opacity: 0.7; transform: translate(3px, -2px); }
    95% { opacity: 0; transform: translate(0); }
    97% { opacity: 0.5; transform: translate(-2px, 1px); }
    99% { opacity: 0; }
}

/* ===============================
   SCENE REVEAL ANIMATIONS
   =============================== */
.scene-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.9s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

.scene-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 1024px) {
    .scene {
        padding: 80px 32px 64px;
    }

    .coord-label {
        right: 80px;
        font-size: 10px;
    }

    .scene-grid {
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .scene {
        padding: 72px 20px 56px;
    }

    .scene-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 14px;
    }

    .scene-grid > * {
        grid-column: 1 / -1 !important;
        transform: none !important;
    }

    .scene::after { display: none; }

    #cipher-wheel {
        right: 8px;
    }

    .wheel-marker { display: none; }

    .wheel-glyph {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }

    .coord-label {
        right: 60px;
        padding: 4px 8px;
        font-size: 9px;
    }

    .riddle-title {
        font-size: 64px;
    }

    .garden-scatter { min-height: 1100px; }
    .garden-org { position: relative !important; display: block; margin: 20px auto; top: auto !important; left: auto !important; right: auto !important; }

    .signal-meta { padding: 0 20px; font-size: 10px; }
}

@media (max-width: 600px) {
    .riddle-title { font-size: 50px; }
    .riddle-text { font-size: 22px; }
    .entry-index { font-size: 26px; min-width: 42px; }
    .archive-entry { flex-direction: column; gap: 10px; }
    .entry-status { align-self: flex-end; }

    #cipher-wheel { right: 4px; }

    .wheel-glyph {
        width: 26px;
        height: 26px;
        font-size: 9px;
    }
}
