/* theme.css — Hong Kong Financial Command Center
   Signature visual effects & animations */

/* ── PAGE LOAD ANIMATION ── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.view.on { animation: fadeSlideIn .25s ease-out; }

/* ── SECTION HEADERS ── */
.view h2,
.view h3 {
  font-family: 'Rajdhani', 'Noto Sans SC', sans-serif;
  font-weight: 700;
  letter-spacing: .03em;
}
.view h2 { font-size: 22px; color: var(--text); }
.view h3 { font-size: 16px; color: var(--text); margin-bottom: 12px; }
.view p { color: var(--muted); font-size: 14px; }

/* ── SCROLLBAR STYLING ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── TERMINAL CURSOR BLINK — for waiting states ── */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.terminal-cursor::after {
  content: '▊';
  font-size: .9em;
  color: var(--navy);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

/* ── TICKER ANIMATION — for stat values ── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-card .sv { animation: countUp .4s ease-out both; }

/* ── GLOW PULSE — for active/live elements ── */
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(56,189,248,.0); }
  50%      { box-shadow: 0 0 12px 2px rgba(56,189,248,.2); }
}
.sb-item.on { animation: none; } /* don't pulse nav items */
.ai-role-badge { animation: none; } /* role dot pulses, not the badge */

/* ── SCANLINE OVERLAY — subtle terminal texture ── */
.main::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,.015) 2px,
    rgba(0,0,0,.015) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

/* ── INPUT FIELDS DARK ── */
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
input::placeholder,
textarea::placeholder { color: var(--hint); }
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(56,189,248,.1);
}

/* ── SIDEBAR AVATAR / ROLE CHIP ── */
#sb-lang-tier {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

/* ── PANEL HEADER LABELS ── */
.panel-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--hint);
  margin-bottom: 12px;
}

/* ── COLD OPEN APPEAR ── */
@keyframes briefingDrop {
  from { opacity: 0; transform: translateY(-12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cold-open-card { animation: briefingDrop .35s cubic-bezier(.34,1.3,.64,1); }

/* ── THINKING DOTS ── */
@keyframes thinkingDots {
  0%,80%,100% { transform: scale(0); opacity: 0; }
  40%         { transform: scale(1); opacity: 1; }
}
.thinking-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: thinkingDots 1.2s ease-in-out infinite;
}
.thinking-dot:nth-child(2) { animation-delay: .15s; }
.thinking-dot:nth-child(3) { animation-delay: .3s; }

/* ── LINK OVERRIDE ── */
a:hover { color: var(--navy); }

/* ── SELECTION COLOR ── */
::selection { background: rgba(56,189,248,.2); color: var(--text); }

/* ── MODAL OVERLAY UNIFORM ── */
.login-overlay,
.privacy-modal { animation: fadeIn .2s ease-out; }

/* ── RESPONSIVE FONT SCALE ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 28px; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .ss-grid  { grid-template-columns: repeat(2,1fr); }
  .act-grid { grid-template-columns: repeat(2,1fr); }
  .how-grid { grid-template-columns: 1fr; }
}

/* ── HOMEPAGE HERO — command center style ── */
.hero h1 {
  background: linear-gradient(135deg, var(--text) 0%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── LEVEL UP FLASH ── */
@keyframes levelFlash {
  0%   { opacity: 0; transform: scale(.8); }
  30%  { opacity: 1; transform: scale(1.05); }
  60%  { transform: scale(1); }
  100% { opacity: 0; transform: scale(1) translateY(-20px); }
}
.level-up-msg {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  text-align: center;
  pointer-events: none;
  animation: levelFlash 2s ease-out forwards;
}
.level-up-msg .lu-emoji { font-size: 48px; display: block; }
.level-up-msg .lu-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: var(--glow-amber);
  letter-spacing: .05em;
}
.level-up-msg .lu-sub { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── TICKERS — live data feel ── */
.ticker-row {
  display: flex;
  gap: 16px;
  padding: 6px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.ticker-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-item .tv { color: var(--green); }
.ticker-item .tv.neg { color: var(--red); }
