/* =========================================================================
   TACTICS VIEW — the live game
   ========================================================================= */
#view-tactics.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.view-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #22201d;
  border-bottom: 1px solid var(--line);
}

.view-topbar h2 { font-size: 15px; font-weight: 800; }

.topbar-stats { display: flex; gap: 8px; }

.stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
}

.stats-badge b { font-size: 17px; }

.badge-blue   { background: rgba(59, 130, 246, .16);  color: #93C5FD; }
.badge-orange { background: rgba(249, 115, 22, .16);  color: #FDBA74; }
.badge-green  { background: rgba(16, 185, 129, .16);  color: #6EE7B7; }

.left-main-pane {
  flex: 1 1 60%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px;
}

.matrix-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: min(40vh, 400px);
}

.matrix-cell {
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.matrix-cell svg { width: 86%; height: 86%; }

.matrix-cell.blank-target {
  border: 2px dotted var(--accent-blue);
  background: rgba(59, 130, 246, .08);
  color: var(--accent-blue);
  font-size: 30px;
  font-weight: 800;
  animation: blank-pulse 1.7s ease-in-out infinite; /* the goal breathes */
}

@keyframes blank-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
  50%      { box-shadow: 0 0 20px 3px rgba(59, 130, 246, .4); }
}

/* Wider than the matrix on purpose — the answers are what you CLICK,
   so they deserve near-matrix-sized targets, not thumbnail chips. */
.options-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  width: min(64vh, 640px);
  max-width: 100%;   /* never spill out of a narrow panel (e.g. the Daily) */
}

.option-card {
  aspect-ratio: 1;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.option-card svg { width: 82%; height: 82%; }

.option-card:hover {
  transform: translateY(-4px) scale(1.02);
  filter: drop-shadow(0 10px 15px rgba(59, 130, 246, 0.2));
  border-color: var(--accent-blue);
}

.option-card.correct {
  border: 3px solid var(--accent-emerald);
  background: rgba(16, 185, 129, .2);
  animation: pulse-green .55s ease, pop-card .5s ease;
}

.option-card.wrong {
  border: 3px solid #EF4444;
  background: rgba(239, 68, 68, .2);
  animation: shake .3s ease;
}

.option-card.revealed {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .4), 0 0 22px rgba(16, 185, 129, .5);
}

@keyframes pop-card {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.16); }
  100% { transform: scale(1); }
}

.right-sidebar-pane {
  flex: 0 0 34%;
  min-height: 0;
  border-top: 1px solid #334155;
  display: grid;
  /* Hint · log · rating — hint and log both get more room now; rating
     still takes whatever's left, just less of it than before. */
  grid-template-columns: 300px minmax(300px, 380px) 1fr;
  gap: 12px;
  padding: 12px;
  background: #22201d;
}

.pane-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pane-card h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pane-text { font-size: 13px; line-height: 1.55; color: var(--text-main); }
.pane-text.subtle { color: var(--text-muted); margin-top: 8px; }

/* The stakes chips — what a click pays or costs, visible up front */
.stakes-line { display: flex; gap: 8px; margin-top: 10px; }

.stake-chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: .3px;
}

.stake-chip.stake-win  { background: rgba(16, 185, 129, .16); color: #6EE7B7; box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .35); }
.stake-chip.stake-loss { background: rgba(239, 68, 68, .14);  color: #FCA5A5; box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .3); }

.stake-inline { font-weight: 900; }
.stake-inline.stake-win  { color: #6EE7B7; }
.stake-inline.stake-loss { color: #FCA5A5; }

/* The giant-slayer bonus gets its own crown + gold pulse — the payout
   for a real giant should visibly announce itself, not read the same
   as beating a merely-hard bot. */
.stake-inline.stake-giant {
  color: #fde047;
  animation: giant-glow 1.6s ease-in-out infinite;
}
@keyframes giant-glow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(253, 224, 71, .35)); }
  50%      { filter: drop-shadow(0 0 9px rgba(253, 224, 71, .9)); }
}

.ghost-btn {
  margin-top: auto;
  align-self: flex-start;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: border-color .15s, color .15s;
}

.ghost-btn:hover { border-color: var(--accent-green); color: var(--text-main); }

.log-card { overflow: hidden; }

#engine-log { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }

.log-entry {
  font-size: 14.5px;
  line-height: 1.55;
  padding: 9px 12px;
  margin-bottom: 7px;
  border-radius: 6px;
  border-left: 3px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--text-main);
}

.log-entry .log-time { color: var(--text-muted); margin-right: 7px; font-size: 13px; }

.log-entry.log-win  { border-left-color: var(--accent-emerald); }
.log-entry.log-loss { border-left-color: #EF4444; }
.log-entry.log-info { border-left-color: var(--accent-blue); }

#elo-sparkline {
  width: 100%;
  flex: 1;              /* fills the whole card instead of a thin strip */
  min-height: 160px;
  background: rgba(0, 0, 0, .28);
  border-radius: 10px;
}

.chart-caption {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 10px;
  text-align: center;
}

/* =========================================================================
   ROADMAP / SETTINGS VIEWS
   ========================================================================= */
.roadmap-panel { max-width: 760px; margin: 0 auto; padding: 46px 24px; }

.roadmap-panel h2 { font-size: 24px; margin-bottom: 10px; }

.roadmap-panel > .pane-text { color: var(--text-muted); font-size: 14px; }

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.roadmap-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.roadmap-card h4 { font-size: 15px; margin-bottom: 6px; }
.roadmap-card p  { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.bot-avatar { font-size: 30px; margin-bottom: 8px; }

.roadmap-note { font-size: 13px; color: var(--text-muted); font-style: italic; }

