/* ============================================================
   TERMINAL THEME — shared design system
   Direction: "Top-up Exchange Terminal" — a trading-desk read on
   a game-currency storefront. Denominations behave like listed
   instruments; orders print like terminal receipts.
   Palette: ink/charcoal ground, single amber (currency) accent,
   mint used only for live/success state.
   Type: Space Grotesk (display) / Inter (body) / IBM Plex Mono (data)
   ============================================================ */

:root {
  --ink: #0A0C10;
  --ink-soft: #0D1016;
  --panel: #12151B;
  --panel-2: #171B23;
  --line: #262B35;
  --line-soft: #1B1F28;

  --amber: #E8A93D;
  --amber-soft: rgba(232, 169, 61, 0.14);
  --amber-line: rgba(232, 169, 61, 0.35);

  --mint: #35D0A6;
  --mint-soft: rgba(53, 208, 166, 0.14);

  --danger: #E5595E;
  --danger-soft: rgba(229, 89, 94, 0.14);

  --text: #EDEFF3;
  --text-dim: #8A93A6;
  --text-faint: #545C6C;

  --radius: 14px;
  --radius-sm: 8px;

  /* ---- Kazuki-inspired accent set (used by nav + homepage) ---- */
  --primary: #6C47FF;
  --primary-soft: rgba(108, 71, 255, 0.14);
  --primary-line: rgba(108, 71, 255, 0.4);
  --primary-glow: rgba(108, 71, 255, 0.55);

  --gold: #F5B400;
  --gold-soft: rgba(245, 180, 0, 0.14);
  --gold-line: rgba(245, 180, 0, 0.35);
}

.tk-body {
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, var(--ink-soft) 0%, var(--ink) 320px),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-text-size-adjust: 100%;
}

.tk-display { font-family: 'Space Grotesk', sans-serif; }
.tk-mono { font-family: 'IBM Plex Mono', monospace; }

/* ---------- Surfaces ---------- */
.tk-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tk-panel-2 { background: var(--panel-2); }

.tk-inset {
  background: var(--ink-soft);
  border: 1px solid var(--line-soft);
}

/* ---------- Ticker strip (signature element) ---------- */
.tk-ticker-wrap {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.tk-ticker-wrap::before,
.tk-ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 24px;
  z-index: 2;
  pointer-events: none;
}
.tk-ticker-wrap::before { left: 0; background: linear-gradient(90deg, var(--panel), transparent); }
.tk-ticker-wrap::after { right: 0; background: linear-gradient(270deg, var(--panel), transparent); }

.tk-ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: tk-scroll 32s linear infinite;
  padding: 7px 0;
}
.tk-ticker-wrap:hover .tk-ticker-track { animation-play-state: paused; }

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

.tk-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  border-right: 1px solid var(--line-soft);
}
.tk-ticker-item .tk-up { color: var(--mint); }

@media (prefers-reduced-motion: reduce) {
  .tk-ticker-track { animation: none; overflow-x: auto; }
}

/* ---------- Top bar ---------- */
.tk-topbar {
  background: rgba(10, 12, 16, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.tk-logo-mark {
  width: 34px; height: 34px;
  background: var(--amber);
  color: var(--ink);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

.tk-wallet-pill {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tk-wallet-pill .tk-dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--mint);
  box-shadow: 0 0 6px var(--mint);
}

.tk-icon-btn {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color .2s ease, color .2s ease;
}
.tk-icon-btn:hover { border-color: var(--amber-line); color: var(--amber); }

/* ---------- Drawer / menu ---------- */
.tk-drawer {
  background: var(--ink-soft);
  border-right: 1px solid var(--line);
}

.tk-drawer-link {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  border: 1px solid transparent;
  transition: all .15s ease;
}
.tk-drawer-link:hover { background: var(--panel-2); color: var(--text); }
.tk-drawer-link.tk-active {
  background: var(--amber-soft);
  border-color: var(--amber-line);
  color: var(--text);
}
.tk-drawer-link.tk-active .tk-idx { color: var(--amber); }

.tk-idx {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text-faint);
  width: 20px;
}

/* ---------- Bottom nav ---------- */
.tk-bottomnav {
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tk-nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-faint); flex: 1; transition: color .2s; }
.tk-nav-item.tk-active { color: var(--amber); }
.tk-nav-item span { font-size: 9px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

.tk-fab {
  background: var(--amber);
  color: var(--ink);
  box-shadow: 0 4px 18px rgba(232,169,61,.35);
}

/* ---------- Buttons ---------- */
.tk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 13px;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  transition: all .15s ease;
  border: 1px solid transparent;
}
.tk-btn-primary { background: var(--amber); color: var(--ink); }
.tk-btn-primary:hover { filter: brightness(1.08); }
.tk-btn-ghost { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.tk-btn-ghost:hover { border-color: var(--amber-line); }
.tk-btn-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(229,89,94,.3); }

/* ---------- Cards ---------- */
.tk-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s ease, transform .2s ease;
}
.tk-card:hover { border-color: var(--amber-line); transform: translateY(-2px); }

.tk-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------- Badges / status ---------- */
.tk-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.tk-badge-success { background: var(--mint-soft); color: var(--mint); }
.tk-badge-pending { background: var(--amber-soft); color: var(--amber); }
.tk-badge-danger { background: var(--danger-soft); color: var(--danger); }
.tk-badge-neutral { background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--line); }

/* ---------- Receipt (order / terminal printout look) ---------- */
.tk-receipt {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.tk-receipt::before {
  content: '';
  position: absolute;
  left: 16px; right: 16px; top: 0;
  border-top: 1px dashed var(--line);
}
.tk-receipt-row { display: flex; justify-content: space-between; font-size: 11px; padding: 6px 0; border-bottom: 1px dashed var(--line-soft); }
.tk-receipt-row:last-child { border-bottom: none; }
.tk-receipt-row .tk-label { color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }
.tk-receipt-row .tk-value { font-family: 'IBM Plex Mono', monospace; color: var(--text); }

/* ---------- Inputs ---------- */
.tk-input {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease;
}
.tk-input:focus { outline: none; border-color: var(--amber); }
.tk-input::placeholder { color: var(--text-faint); }

/* ---------- Misc ---------- */
.tk-divider { height: 1px; background: var(--line-soft); }
.tk-glow-amber { box-shadow: 0 0 0 1px var(--amber-line), 0 8px 24px rgba(232,169,61,.12); }
.tk-scroll::-webkit-scrollbar { width: 3px; height: 3px; }
.tk-scroll::-webkit-scrollbar-thumb { background: var(--amber-line); border-radius: 10px; }

/* ============================================================
   KAZUKI-STYLE HOMEPAGE COMPONENTS
   ============================================================ */

/* Horizontal top nav (desktop) */
.kz-navlink {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  transition: all .15s ease;
  white-space: nowrap;
}
.kz-navlink:hover { color: var(--text); background: var(--panel-2); }
.kz-navlink.kz-active { background: var(--panel-2); color: var(--text); }

.kz-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px; font-weight: 600;
}

.kz-coin-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  padding: 6px 10px 6px 6px;
  font-size: 12px; font-weight: 700;
  color: var(--gold);
}
.kz-coin-badge {
  width: 20px; height: 20px; border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800;
}
.kz-coin-add {
  width: 16px; height: 16px; border-radius: 999px;
  background: var(--panel);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
}

/* Hero peek-carousel */
.kz-hero-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 8px 0 28px;
}
.kz-hero-track {
  display: flex; align-items: center; gap: 16px;
  transition: transform .5s cubic-bezier(.25,.8,.25,1);
}
.kz-hero-slide {
  flex-shrink: 0;
  width: 78%;
  max-width: 900px;
  aspect-ratio: 16/6.2;
  border-radius: 20px;
  overflow: hidden;
  opacity: 0.35;
  transform: scale(0.92);
  transition: opacity .5s ease, transform .5s ease;
  border: 1px solid var(--line);
}
.kz-hero-slide.kz-hero-active { opacity: 1; transform: scale(1); border-color: var(--primary-line); }
.kz-hero-slide img { width: 100%; height: 100%; object-fit: cover; }

.kz-hero-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.kz-hero-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--line); transition: all .2s; }
.kz-hero-dot.kz-hero-dot-active { background: var(--primary); width: 18px; }

/* Filter pills row */
.kz-filter-pill {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: all .15s ease;
  white-space: nowrap;
}
.kz-filter-pill.kz-filter-active { background: #fff; color: #0a0a0f; border-color: #fff; }
.kz-filter-pill:not(.kz-filter-active):hover { border-color: var(--primary-line); color: var(--text); }

/* Standard game card with neon hover glow */
.kz-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  aspect-ratio: 3/4;
}
.kz-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-line);
  box-shadow: 0 0 0 1px var(--primary-line), 0 12px 32px rgba(108,71,255,.25);
}
.kz-card img { width: 100%; height: 100%; object-fit: cover; }
.kz-card-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 8px 8px;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
  font-size: 11px; font-weight: 700; color: #fff;
}

.kz-ribbon {
  position: absolute; top: 8px; right: -26px;
  background: var(--danger);
  color: #fff;
  font-size: 9px; font-weight: 800;
  padding: 3px 28px;
  transform: rotate(35deg);
  z-index: 3;
  letter-spacing: .04em;
}

/* Country/flag variant card — matches Kazuki's PH/SG/MY/RU/TR tiles */
.kz-flag-card {
  position: relative;
  border-radius: 14px;
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, #1a1030, #0d0a14);
  border: 1px solid var(--primary-line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  box-shadow: 0 0 24px rgba(108,71,255,.18), inset 0 0 40px rgba(108,71,255,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
.kz-flag-card:hover { transform: translateY(-4px); box-shadow: 0 0 32px rgba(108,71,255,.32), inset 0 0 40px rgba(108,71,255,.1); }
.kz-flag-emoji { font-size: 30px; line-height: 1; }
.kz-flag-country {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 15px;
  background: linear-gradient(135deg, #F5D77A, #F5B400);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: .02em;
}
.kz-flag-sub { font-size: 9px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .08em; }