/* Kaomoji portal — "tableflip" terminal theme (ported from Claude Design).
 * Black ground, VT323 / Space Mono, purple accent, scanlines + kaomoji confetti.
 * Structural styles live inline in the pages (as designed); this file holds the
 * shared shell: fonts fallbacks, keyframes, hover states, fx layers, tooltips. */

html, body { margin: 0; padding: 0; background: #050505; }
body {
  font-family: "Space Mono", ui-monospace, Menlo, Consolas, monospace;
  color: #ededed;
  -webkit-font-smoothing: antialiased;
}
body.vt { font-family: "VT323", ui-monospace, Menlo, monospace; }
a { color: #b8a6f5; text-decoration: none; }
a:hover { color: #ffffff; text-decoration: underline; }
::selection { background: #b8a6f5; color: #050505; }
input[type=range] { accent-color: #b8a6f5; }
* { box-sizing: border-box; }

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes drift { 0% { transform: translateY(0); } 100% { transform: translateY(-6px); } }
@keyframes fall { from { transform: translateY(-70px); } to { transform: translateY(105vh); } }
@keyframes softblink { 0% { opacity: 0.15; } 12% { opacity: 0.9; } 65% { opacity: 0.9; } 96% { opacity: 0.15; } 100% { opacity: 0.15; } }

/* ---------- fx layers (injected by js/fx.js) ---------- */
.fx-scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px,
    rgba(255,255,255,0.025) 2px, rgba(255,255,255,0.025) 3px);
}
.fx-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }

/* ---------- page shell ---------- */
.wrap {
  position: relative; z-index: 2; background: #050505;
  max-width: 760px; margin: 0 auto; padding: 28px 20px 120px;
  display: flex; flex-direction: column; gap: 28px;
}

/* ---------- nav ---------- */
nav.portal { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 10px 0; }
nav.portal .spacer { display: none; }
a.navtab {
  font-size: 15px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #8f8f8f; border: 1px solid #2c2c2c; padding: 6px 12px;
}
a.navtab:hover { color: #ededed; border-color: #3a3a3a; text-decoration: none; }
a.navtab.here { color: #050505; background: #ededed; border-color: #ededed; }

/* ---------- hover states (converted from design's style-hover) ---------- */
.hv-ink:hover { color: #ededed !important; }
.hv-grey:hover { color: #8f8f8f !important; }
.hv-accent:hover { color: #b8a6f5 !important; }
.tilt { transition: transform 0.15s; }
.tilt.t1:hover { transform: rotate(-1.2deg); }
.tilt.t2:hover { transform: rotate(1deg); }
.tilt.t3:hover { transform: rotate(-0.8deg); }
.tilt.t4:hover { transform: rotate(1.2deg); }

/* ---------- buttons ---------- */
button.btn {
  font-family: "VT323", ui-monospace, monospace;
  font-size: 19px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 12px 24px; cursor: pointer; white-space: nowrap;
}
button.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-light { background: #ededed; color: #050505; border: 1px solid #ededed; }
.btn-light:hover:not(:disabled) { background: #b8a6f5; border-color: #b8a6f5; }
.btn-accent { background: #b8a6f5; color: #050505; border: 1px solid #b8a6f5; }
.btn-accent:hover:not(:disabled) { background: #ededed; border-color: #ededed; }
.btn-ghost { background: transparent; color: #ededed; border: 1px solid #ededed; }
.btn-ghost:hover:not(:disabled) { color: #b8a6f5; border-color: #b8a6f5; }

/* ---------- chart tooltip ---------- */
.tip {
  position: absolute; pointer-events: none; opacity: 0; transform: translate(-50%, -100%);
  background: #1d1d1d; border: 1px solid #3a3a3a; color: #ededed;
  padding: 8px 10px; font-size: 12.5px; line-height: 1.55; white-space: nowrap;
  font-family: "Space Mono", ui-monospace, monospace; transition: opacity 0.08s;
}
.tip b { color: #b8a6f5; font-weight: 700; }
.tip .muted { color: #8f8f8f; }

/* ---------- status lines ---------- */
.status { font-size: 19px; color: #8f8f8f; min-height: 1.4em; overflow-wrap: anywhere; }
.status.ok { color: #7ddb8a; }
.status.err { color: #f0b3a8; }
