/* jellyqda drift & play · css/17-extras.css
   Die Lernspiele aus js/extras/: Tiefenmeter, Muscheln, Strömung, Bug-Jagd,
   Reise des Klicks, Expedition, R-Konsole, Schwärme.
   Die CSS-Dateien werden in Nummern-Reihenfolge geladen: spätere Regeln gewinnen. */

/* ---------- Tiefenmeter: Begleit-Szene je nach Zone ---------- */
.buddy-tank.zone-1 { background: radial-gradient(240px 120px at 50% -10%, rgba(140,210,255,.25), transparent 70%), linear-gradient(180deg, #145a86 0%, #0a3557 60%, #062240 100%); }
.buddy-tank.zone-2 { background: radial-gradient(200px 100px at 50% -10%, rgba(140,210,255,.12), transparent 70%), linear-gradient(180deg, #0b2f52 0%, #071c36 60%, #040f22 100%); }
.buddy-tank.zone-3 { background: linear-gradient(180deg, #071a30 0%, #030b18 60%, #01050c 100%); }
.buddy-depth { position: absolute; top: 8px; right: 10px; font: 700 12px var(--f-mono); color: #d8efff; background: rgba(0,20,40,.45); padding: 2px 7px; border-radius: 8px; }
.wesen-swim { position: absolute; animation: wesenswim 14s linear infinite; opacity: .9; }
.wesen-swim.w0 { top: 18%; } .wesen-swim.w1 { top: 60%; animation-duration: 18s; } .wesen-swim.w2 { top: 32%; animation-duration: 22s; } .wesen-swim.w3 { top: 66%; animation-duration: 26s; }
@keyframes wesenswim { from { left: -60px; } to { left: calc(100% + 20px); } }
.wesen .lure, .boss-angler.on .lure { animation: lure 2s ease-in-out infinite; }
@keyframes lure { 50% { filter: drop-shadow(0 0 8px #f9f871); opacity: .7; } }
.boss-angler { opacity: .55; }
.boss-angler.on { opacity: 1; }
.gauge-bar { position: relative; height: 34px; border-radius: 10px; overflow: visible; background: var(--surface2); }
.dz { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 6px; opacity: .35; overflow: hidden; }
.dz:first-child { border-radius: 10px 0 0 10px; } .dz:last-of-type { border-radius: 0 10px 10px 0; }
.dz.reached { opacity: 1; }
.dz span { font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.gauge-mark { position: absolute; top: -6px; bottom: -6px; width: 3px; background: var(--bad); border-radius: 2px; transform: translateX(-1px); }
.gauge-mark b { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); font: 700 12px var(--f-mono); color: var(--ink); white-space: nowrap; }
.gauge p { margin-top: 26px !important; }

/* ---------- Muscheln ---------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-top: 10px; }
.shell { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; font-size: 11px; color: var(--muted); padding: 6px 2px; border-radius: 10px; }
.shell.got { color: var(--ink); background: var(--surface2); }
.shell.got svg { filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.shelltoast { position: fixed; left: 50%; top: calc(80px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 80; display: flex; gap: 12px; align-items: center; background: var(--surface); color: var(--ink); border: 2px solid #f3c84b; border-radius: 14px; padding: 10px 16px; box-shadow: var(--shadow); max-width: calc(100% - 32px); animation: shellin .5s cubic-bezier(.2,1.4,.4,1); }
.shelltoast b { display: block; } .shelltoast span { font-size: 13px; color: var(--muted); }
.shelltoast.out { transition: opacity .5s, transform .5s; opacity: 0; transform: translateX(-50%) translateY(-20px); }
@keyframes shellin { from { transform: translateX(-50%) scale(.6); opacity: 0; } }

/* ---------- Tägliche Strömung ---------- */
.daily { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); overflow: hidden; position: relative; border-left: 4px solid #4cc9f0; }
.daily > div:nth-child(2) { flex: 1; }
.daily-wave { width: 46px; height: 46px; flex: none; border-radius: 50%; background: repeating-linear-gradient(170deg, #4cc9f0 0 6px, #a2e8fb 6px 12px); animation: wave 3s linear infinite; background-size: 100% 24px; }
@keyframes wave { to { background-position: 0 24px; } }
.daily.done { border-left-color: var(--good); }

/* ---------- Spiele-Übersicht ---------- */
.game { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; align-items: flex-start; }
.game:hover { border-color: var(--accent); }
.game b { font-family: var(--f-display); font-size: 18px; }
.game-ico { width: 56px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(180deg, #2a9ac6, #0f5a8a); margin-bottom: 8px; }

/* ---------- Bug-Jagd ---------- */
.buglines { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 0; overflow-x: auto; }
.bugline { display: flex; width: 100%; min-width: max-content; text-align: left; border: none; background: none; padding: 3px 10px 3px 0; cursor: pointer; font-family: var(--f-mono); font-size: 13px; color: var(--code-ink); border-left: 3px solid transparent; }
.bugline:hover:not(:disabled) { background: var(--accent-soft); border-left-color: var(--accent); }
.bugline .n { width: 3.4em; flex: none; text-align: right; padding-right: 12px; color: var(--tk-com); }
.bugline code { white-space: pre; font-size: 13px; }
.bugline.wrong { background: var(--bad-soft); border-left-color: var(--bad); }
.bugline.right { background: var(--good-soft); border-left-color: var(--good); }

/* ---------- Reise des Klicks ---------- */
.journey { background: linear-gradient(180deg, var(--reef-1), var(--reef-2) 60%, var(--reef-3)); border-radius: 18px; padding: 70px 44px 16px; overflow-x: auto; }
.jtrack { position: relative; height: 90px; min-width: 640px; }
.jtrack::before { content: ""; position: absolute; left: 0; right: 0; top: 30px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.35); }
.jstop { position: absolute; top: 14px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; border: none; background: none; cursor: pointer; color: #fff; width: 90px; }
.jdot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #0b2a4a; border: 3px solid rgba(255,255,255,.7); color: #fff; }
.side-b .jdot { border-color: #ffd166; } .side-r .jdot { border-color: #8ecae6; } .side-d .jdot { border-color: #b8f2c9; }
.jstop.past .jdot { background: #2a9ac6; }
.jstop.on .jdot { background: #fff; color: #0b2a4a; transform: scale(1.15); box-shadow: 0 0 16px rgba(255,255,255,.8); }
.jlbl { font-size: 11.5px; font-weight: 700; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.5); line-height: 1.2; }
.jpacket { position: absolute; top: -56px; transform: translateX(-50%); transition: left 1.2s cubic-bezier(.45,0,.3,1); }
.jzones { display: flex; justify-content: space-between; min-width: 640px; color: rgba(255,255,255,.85); font-size: 12px; font-weight: 700; margin-top: 4px; }
.jpack { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); margin-bottom: 12px; }
.jpack code { font-size: 13.5px; overflow-wrap: anywhere; }

/* ---------- Expedition ---------- */
.expmap { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.expmap button { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--line2); background: var(--surface); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ink); }
.expmap button span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); font-size: 12px; }
.expmap li.done button span { background: var(--good); color: #fff; }
.expmap li.cur button { border-color: var(--accent); background: var(--accent-soft); }
.expmap li.cur button span { background: var(--accent); color: var(--accent-ink); }
.expmap button:disabled { opacity: .45; cursor: default; }
.expgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.expwhy { padding: 12px 14px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--line); align-self: start; }
.rcon { background: #0e1a20; color: #d6e6ec; border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-family: var(--f-mono); font-size: 13px; overflow-x: auto; }
.rcon-in .pr { color: #8fd0f5; }
.rcon-out { margin: 6px 0 0; color: #b9cfd8; white-space: pre; font-size: 12.5px; }
.rcon .k-kw { color: #d1a0f0; } .rcon .k-str { color: #9fd8a6; } .rcon .k-num { color: #f2b880; } .rcon .k-fn { color: #8cc8f5; }
.expdoc { white-space: pre-wrap; font-size: 14px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.report { border: 1px solid var(--line2); border-radius: 12px; padding: 14px 18px; background: var(--surface); margin-top: 10px; }
.report h3 { margin: 0 0 8px; } .report h4 { margin: 14px 0 6px; }

/* ---------- R-Konsole ---------- */
.rout { min-height: 220px; max-height: 420px; }

/* ---------- Schwärme ---------- */
.swarms { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 10px; }
.swarms > * { min-width: 0; }
.swarm { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); text-decoration: none; color: var(--ink); }
.swarm b { font-family: var(--f-mono); font-size: 13px; overflow-wrap: anywhere; }
.swarm.done { border-color: #f3c84b; background: linear-gradient(135deg, rgba(243,200,75,.18), transparent 70%), var(--surface2); }
.jelly .spark { animation: spark 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spark { 50% { opacity: .3; transform: scale(.6); } }
