/* ===========================================================
   STONKSWAR - WAR ROOM TERMINAL DESIGN SYSTEM
   =========================================================== */

/* -- Noise texture (SVG data URI) ---------------------------- */
:root {
  --noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");

  /* -- Background layers ----------------------------------- */
  --bg-primary: #080B09; /* near-black with green undertone */
  --bg-secondary: #0D1210;
  --bg-card: #111815; /* card surface */
  --bg-subtle: #181F1B; /* elevated subtle */
  --bg-elevated: #202820;

  /* -- Text ------------------------------------------------ */
  --text-primary: #E8EDE9; /* warm off-white */
  --text-main: #E8EDE9;
  --text-muted: #5A6B5C; /* desaturated green-grey */
  --text-dim: #334035;
  --text-accent: #F59E0B; /* amber - primary accent */
  --text-warning: #F59E0B;

  /* -- Accent / Brand Colors ------------------------------- */
  --amber: #F59E0B; /* primary action color */
  --amber-dim: #78490A;
  --amber-glow: rgba(245,158,11,0.15);

  --green: #22C55E; /* positive prices / win */
  --color-green: #22C55E;
  --color-green-dark: #16A34A;

  --red: #EF4444; /* negative prices / loss */
  --color-red: #EF4444;

  --blue: #3B82F6;
  --color-blue: #3B82F6;
  --color-yellow: #F59E0B;
  --yellow: #F59E0B;
  --color-purple: #A855F7;
  --purple: #A855F7;
  --color-teal: #14B8A6;

  /* -- Borders --------------------------------------------- */
  --border-primary: #1E2820;
  --border-subtle: #253025;
  --border-color: #1E2820;
  --border-amber: rgba(245,158,11,0.35);

  /* -- Typography ------------------------------------------ */
  --font-display: 'Barlow Condensed', 'Impact', sans-serif; /* headings */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif; /* body */
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace; /* prices/numbers */

  /* -- Shape - ZERO RADIUS (terminal aesthetic) ------------ */
  --radius: 0px;
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 2px; /* only very slight, for inset elements */
  --radius-xl: 2px;
  --radius-pill: 2px;

  /* -- Shadows ---------------------------------------------- */
  --shadow-card: 0 1px 0 0 var(--border-primary), inset 0 1px 0 0 rgba(255,255,255,0.02);
  --shadow-raise: 0 4px 24px rgba(0,0,0,0.5);

  /* Backward compat */
  --black: #080B09;
}


/* ==========================
   LIGHT MODE THEME
   ========================== */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-elevated: #e2e8f0;
  
  --text-primary: #0f172a;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --text-accent: #059669;
  --text-warning: #d97706;
  
  --border-primary: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-color: #e2e8f0;

  --black: #0f172a;
}

[data-theme="light"] .navbar {
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border-primary);
}

[data-theme="light"] .btn-black {
  background-color: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

[data-theme="light"] .btn-black:hover {
  background-color: #1e293b;
}

[data-theme="light"] .watchlist-card,
[data-theme="light"] .mode-card,
[data-theme="light"] .clash-interactive-card,
[data-theme="light"] .bottom-stats-bar,
[data-theme="light"] .warchest-chip,
[data-theme="light"] .card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.theme-toggle-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  padding: 0;
  flex-shrink: 0;
  overflow: visible;
}

/* Dark mode state - subtle, dim */
.theme-toggle-btn:hover {
  background: var(--bg-subtle);
  border-color: rgba(255,255,255,0.2);
  color: var(--text-primary);
  transform: scale(1.08);
}

/* Light / Glow state - amber sun glow */
.theme-toggle-btn.is-light {
  background: radial-gradient(circle, #fffbeb 0%, #fef3c7 100%);
  border-color: #f59e0b;
  color: #b45309;
  box-shadow:
    0 0 0 3px rgba(245, 158, 11, 0.15),
    0 0 12px rgba(245, 158, 11, 0.35),
    0 0 24px rgba(245, 158, 11, 0.15);
}

.theme-toggle-btn.is-light:hover {
  box-shadow:
    0 0 0 4px rgba(245, 158, 11, 0.25),
    0 0 20px rgba(245, 158, 11, 0.5),
    0 0 36px rgba(245, 158, 11, 0.2);
  transform: scale(1.1);
}

/* Pulse ring on light mode */
.theme-toggle-btn.is-light::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  animation: theme-glow-pulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes theme-glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}

.theme-toggle-btn svg.icon {
  width: 18px;
  height: 18px;
  transition: transform 0.4s ease;
}

.theme-toggle-btn.is-light svg.icon {
  transform: rotate(30deg);
}

/* ===== GLOBAL SVG ICON RULE (CRITICAL FOR SIZING) ===== */
svg.icon, .icon {
  width: 1.125rem;
  height: 1.125rem;
  display: inline-block;
  vertical-align: -0.15em;
  fill: currentColor;
  stroke: currentColor;
  flex-shrink: 0;
}

/* ===== BASE STYLES ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif, "Apple Color Emoji", "Segoemoji", "Noto Color Emoji";
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.2);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  margin: 0;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

p {
  margin: 0;
  margin-bottom: 1rem;
}

img {
  border-style: none;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

caption {
  padding: 0.75rem 0.5rem;
  color: var(--text-muted);
  text-align: left;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

td,
th {
  padding: 0.625rem;
  vertical-align: top;
  border-top: 1px solid var(--border-subtle);
}

button,
input,
optin,
select {
  margin: 0;
  font-family: inherit;
  font-size: 100%;
}

button,
input {
  overflow: visible;
}

button,
[role="button"] {
  cursor: pointer;
}

button {
  border: 0;
  border-radius: 0;
  background-color: transparent;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
}

button:focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
}

*:focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
}

::-moz-focus-inner {
  border: 0;
  padding: 0;
}

/* ==========================
   UTILITY CLASSES
   ========================== */

/* Container */
.container {
  max-width: 100%;
  padding: 0 1rem;
  margin: 0 auto;
}

/* Visually Hidden */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus-Visible State */
.focus-visible:focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
  }
}

/* ==========================
   TYPOGRAPHY
   ========================== */

.display-1 {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
}

.display-2 {
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.display-3 {
  font-size: 3.75rem;
  font-weight: 700;
  line-height: 1.1;
}

.display-4 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
}

.font-display {
  font-family: "Roboto Slab", "Times New Roman", serif;
}

.font-sans {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
}

.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

.text-monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1em;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================
   COLOR UTILITIES
   ========================== */

.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-card { background-color: var(--bg-card); }
.bg-subtle { background-color: var(--bg-subtle); }
.bg-elevated { background-color: var(--bg-elevated); }

.text-primary { color: var(--text-primary); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-accent { color: var(--text-accent); }
.text-warning { color: var(--color-yellow); }

/* Background helpers */
.bg-green { background-color: var(--color-green); }
.bg-green-dark { background-color: var(--color-green-dark); }
.bg-yellow { background-color: var(--color-yellow); }
.bg-blue { background-color: var(--color-blue); }
.bg-purple { background-color: var(--color-purple); }
.bg-red { background-color: var(--color-red); }
.bg-teal { background-color: var(--color-teal); }

/* Text color helpers */
.text-green { color: var(--color-green); }
.text-yellow { color: var(--color-yellow); }
.text-blue { color: var(--color-blue); }
.text-purple { color: var(--color-purple); }
.text-red { color: var(--color-red); }
.text-teal { color: var(--color-teal); }

/* Border helpers */
.border-green { border-color: var(--color-green); }
.border-yellow { border-color: var(--color-yellow); }
.border-blue { border-color: var(--color-blue); }
.border-purple { border-color: var(--color-purple); }
.border-red { border-color: var(--color-red); }
.border-teal { border-color: var(--color-teal); }

/* ==========================
   LAYOUT UTILITIES
   ========================== */

.d-flex {
  display: flex;
}

.d-inline-flex {
  display: inline-flex;
}

.flex-column {
  flex-direction: column;
}

.flex-row {
  flex-direction: row;
}

.justify-content-start {
  justify-content: flex-start;
}

.justify-content-end {
  justify-content: flex-end;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-between {
  justify-content: space-between;
}

.align-items-start {
  align-items: flex-start;
}

.align-items-center {
  align-items: center;
}

.align-items-baseline {
  align-items: baseline;
}

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Spacing Scale */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.ml-0 { margin-left: 0; }
.mr-0 { margin-right: 0; }

.m-1 { margin: 0.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.ml-1 { margin-left: 0.5rem; }
.mr-1 { margin-right: 0.5rem; }

.m-2 { margin: 1rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.ml-2 { margin-left: 1rem; }
.mr-2 { margin-right: 1rem; }

.m-3 { margin: 1.5rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

/* ==========================
   BUTTONS
   ========================== */

.btn {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  margin: 0;
  font-family: inherit;
}

.btn:hover {
  filter: brightness(1.1);
}

.btn:focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.65;
}

.btn-primary {
  color: #fff;
  background-color: var(--text-accent);
  border-color: var(--text-accent);
}

.btn-primary:hover {
  background-color: var(--color-green-dark);
  border-color: var(--color-green-dark);
}

.btn-secondary {
  color: var(--text-primary);
  background-color: var(--bg-subtle);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background-color: var(--bg-elevated);
}

.btn-outline {
  color: var(--text-primary);
  background-color: transparent;
  border-color: var(--text-muted);
}

.btn-outline:hover {
  color: var(--color-green);
  border-color: var(--color-green);
}

.btn-danger {
  color: #fff;
  background-color: var(--color-red);
  border-color: var(--color-red);
}

.btn-danger:hover {
  background-color: #dc2636;
  border-color: #dc2636;
}

/* ==========================
   BADGES
   ========================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  background-color: var(--bg-subtle);
  color: var(--text-muted);
}

.badge-green {
  color: var(--color-green);
  background-color: rgba(16, 185, 129, 0.15);
}

.badge-yellow {
  color: var(--color-yellow);
  background-color: rgba(245, 158, 11, 0.15);
}

.badge-purple {
  color: var(--color-purple);
  background-color: rgba(168, 85, 247, 0.15);
}

.badge-neutral {
  color: var(--text-muted);
  background-color: var(--bg-subtle);
}

.badge-amber {
  color: var(--color-yellow);
}

/* ==========================
   CARDS
   ========================== */

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.card-body {
  padding: 1rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================
   TABLES
   ========================== */

.table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.table td {
  font-size: 0.875rem;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--bg-subtle);
}

/* ==========================
   FORMS
   ========================== */

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.form-control {
  display: block;
  width: 100%;
  height: calc(1.5em + 0.75rem);
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--text-accent);
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.1);
}

.form-control:disabled {
  background-color: var(--bg-subtle);
  opacity: 0.5;
}

.form-select {
  display: block;
  width: 100%;
  height: calc(1.5em + 0.75rem);
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out;
}

.form-select:focus {
  border-color: var(--text-accent);
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.1);
}

.form-check {
  display: block;
  padding-left: 1.5rem;
  margin-bottom: 0.25rem;
}

.form-check-input {
  position: absolute;
  margin-top: 0.25rem;
  margin-left: -1.5rem;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  border-radius: 0.25rem;
}

.form-check-input:checked {
  background-color: var(--color-green);
  border-color: var(--color-green);
}

.form-check-input:focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
}

.form-check-label {
  font-size: 0.875rem;
  margin-left: 0.5rem;
}

/* ==========================
   NAVBAR
   ========================== */

.navbar {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================
   SCREEN VIEW MANAGEMENT
   ========================== */
.screen-view {
  display: none;
  animation: fadeIn 0.2s ease;
}

.screen-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================
   CONTAINER & LAYOUT
   ========================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================
   NAVBAR (SPACIOUS & EXPANSIVE)
   ========================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(10, 15, 14, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-primary);
  padding: 1rem 0;
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.nav-brand:hover {
  text-decoration: none;
  color: var(--text-primary);
}

.nav-brand-sub {
  display: block;
  font-size: 0.5625rem;
  letter-spacing: 0.16em;
  color: var(--color-green);
  font-weight: 700;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-subtle);
}

.nav-link.active {
  color: var(--color-green);
  background-color: rgba(16, 185, 129, 0.12);
}

.nav-link-locked {
  opacity: 0.38;
  cursor: not-allowed !important;
  pointer-events: none;
}
.nav-link-locked:hover {
  background: none;
  color: inherit;
}
.nav-lock {
  font-size: 0.65em;
  vertical-align: middle;
  margin-left: 2px;
  opacity: 0.7;
}


.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-shrink: 0;
}

/* ==========================
   BUTTONS
   ========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-black {
  background-color: var(--bg-card);
  color: #ffffff;
  border-color: var(--border-subtle);
}

.btn-black:hover {
  background-color: #1c2128;
  border-color: var(--color-green);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-primary);
}

.btn-outline:hover {
  background-color: var(--bg-subtle);
  border-color: var(--text-muted);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background-color: var(--bg-subtle);
}

.btn-sm {
  padding: 0 1.15rem;
  height: 40px;
  font-size: 0.8125rem;
  border-radius: 9999px;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* ==========================
   WAR CHEST CHIP
   ========================== */
.warchest-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 9999px;
  padding: 0 1rem;
  height: 40px;
}

.warchest-chip .icon {
  width: 16px;
  height: 16px;
  color: var(--color-green);
  flex-shrink: 0;
}

.warchest-label {
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  line-height: 1.1;
  text-transform: uppercase;
}

.warchest-balance {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.8125rem;
  color: var(--color-green);
  white-space: nowrap;
  line-height: 1.2;
}

/* ==========================
   HERO LAYOUT
   ========================== */
.hero-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  padding: 3.5rem 0 2.5rem;
}

.hero-content h1 {
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
}

.green-accent {
  color: var(--color-green);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 1.75rem;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-trust-badges {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-primary);
  padding-top: 1.5rem;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.trust-item svg.icon, .trust-item .icon {
  width: 18px;
  height: 18px;
  color: var(--color-green);
}

/* ==========================
   HERO WIDGETS
   ========================== */
.watchlist-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.watchlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.watchlist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.watchlist-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.watchlist-sym {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stock-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  background: var(--bg-subtle);
}

.sparkline-svg {
  width: 60px;
  height: 24px;
}

.watchlist-prices {
  text-align: right;
}

.live-contest-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, var(--bg-card) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ==========================
   BOTTOM STATS BAR
   ========================== */
.bottom-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2.5rem 0 3.5rem;
}

.stat-item {
  text-align: center;
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-green);
  margin-bottom: 0.25rem;
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================
   MODES & WARS
   ========================== */
.page-hero {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.page-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ==============================================
   WAR ROOM - MODES SCREEN
   ============================================== */

/* Section header */
.wrt-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 0 1.25rem;
  border-bottom: 1px solid var(--border-primary);
  margin-bottom: 0;
  flex-wrap: wrap;
  gap: 12px;
}
.wrt-section-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wrt-section-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--amber);
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  padding: 3px 8px;
}
.wrt-section-divider {
  font-family: var(--font-mono);
  color: var(--border-primary);
  font-size: 1rem;
}
.wrt-section-title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-transform: uppercase;
}
.wrt-section-status {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 var(--green);
  animation: pulse-ring 1.8s ease-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* Mode list - command rows */
.wrt-mode-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wrt-mode-row {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--border-primary);
  padding: 1.125rem 0;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}
.wrt-mode-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  transition: background 0.15s ease;
}
.wrt-mode-row:hover::before,
.wrt-mode-row.featured::before {
  background: var(--amber);
}
.wrt-mode-row:hover {
  background: rgba(245,158,11,0.03);
}
.wrt-mode-row.featured {
  background: rgba(16,185,129,0.03);
}
.wrt-mode-row.featured::before {
  background: var(--green);
}

/* Index number */
.wrt-mode-index {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--border-primary);
  width: 52px;
  flex-shrink: 0;
  padding-left: 12px;
  letter-spacing: -0.02em;
  transition: color 0.15s ease;
}
.wrt-mode-row:hover .wrt-mode-index {
  color: var(--amber);
}

/* Icon */
.wrt-mode-icon-wrap {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 16px;
}
.wrt-mode-icon-wrap svg.icon { width: 22px; height: 22px; }
.wrt-mode-icon-wrap.blue { color: #3B82F6; }
.wrt-mode-icon-wrap.green { color: var(--green); }
.wrt-mode-icon-wrap.purple { color: #A855F7; }
.wrt-mode-icon-wrap.amber { color: var(--amber); }
.wrt-mode-icon-wrap.red { color: var(--red); }

/* Info block */
.wrt-mode-info {
  flex: 1;
  min-width: 0;
  padding-right: 24px;
}
.wrt-mode-name {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.wrt-mode-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Live chip */
.wrt-live-chip {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 2px 6px;
  vertical-align: middle;
}

/* Metrics */
.wrt-mode-metrics {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
  margin-right: 24px;
}
.wrt-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}
.wrt-metric-val {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.wrt-metric-val.green { color: var(--green); }
.wrt-metric-lbl {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

/* CTA */
.wrt-mode-cta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: color 0.15s ease;
  padding-right: 8px;
  min-width: 72px;
  justify-content: flex-end;
}
.wrt-arrow {
  transition: transform 0.15s ease;
  display: inline-block;
}
.wrt-mode-row:hover .wrt-mode-cta {
  color: var(--amber);
}
.wrt-mode-row:hover .wrt-arrow {
  transform: translateX(4px);
}

/* Footer */
.wrt-mode-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1rem 0 2rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 640px) {
  .wrt-mode-metrics { display: none; }
  .wrt-mode-index { width: 36px; font-size: 1.125rem; }
  .wrt-section-status { display: none; }
}


/* ==========================
   BADGES & PILLS
   ========================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.badge-green { background: rgba(16, 185, 129, 0.15); color: var(--color-green); }
.badge-purple { background: rgba(168, 85, 247, 0.15); color: var(--color-purple); }
.badge-blue { background: rgba(59, 130, 246, 0.15); color: var(--color-blue); }
.badge-amber { background: rgba(245, 158, 11, 0.15); color: var(--color-yellow); }



.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ==========================
   CARDS & MISC
   ========================== */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

/* ==========================
   RESPONSIVE
   ========================== */
@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2rem 0;
  }
  .bottom-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 600px) {
  .bottom-stats-bar {
    grid-template-columns: 1fr;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
}

/* ==========================
   INTERACTIVE CLASH & PARIMUTUEL STYLES
   ========================== */
.clash-interactive-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  padding: 1.5rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 1.25rem;
}

.clash-interactive-card:hover {
  border-color: var(--border-subtle);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.clash-interactive-card.expanded {
  border-color: var(--color-green);
  box-shadow: 0 12px 36px rgba(16, 185, 129, 0.12);
}

.logo-stack {
  display: flex;
  align-items: center;
}

.logo-stack .stock-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  margin-left: -8px;
  object-fit: cover;
  background: var(--bg-subtle);
}

.logo-stack .stock-logo-img:first-child {
  margin-left: 0;
}

.uniswap-wager-box {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
}

.uniswap-wager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.uniswap-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
}

.uniswap-input-row input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  width: 100%;
  outline: none;
}

.uniswap-pct-chips {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.pct-chip {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  padding: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.pct-chip:hover {
  color: var(--text-primary);
  border-color: var(--color-green);
  background: rgba(16, 185, 129, 0.08);
}

.payout-estimate-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.75rem 0.25rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.75rem;
}

.payout-estimate-strip strong {
  color: var(--color-green);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

/* ==========================
   DUEL ROSTER & CARDS
   ========================== */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.roster-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.roster-card:hover {
  border-color: var(--color-blue);
}

.roster-card.selected {
  border-color: var(--color-green);
  background: rgba(16, 185, 129, 0.06);
}

.time-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-primary);
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
}

.time-btn.active {
  background: var(--color-green);
  color: #000;
  border-color: var(--color-green);
}

/* ==========================
   FACTION WARFARE & TERRITORY MAP
   ========================== */
.faction-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.faction-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-subtle);
}

.faction-card.active {
  border-color: var(--color-green);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, var(--bg-card) 100%);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.faction-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.faction-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.faction-card-title {
  font-weight: 800;
  font-size: 0.9375rem;
}

.hex-tile {
  background-color: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  position: relative;
  transition: all 0.2s ease;
}

.hex-tile:hover {
  border-color: var(--color-green);
  transform: scale(1.02);
}

.hex-tile-title {
  font-size: 0.8125rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.hex-tile-assets {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.hex-tile-faction {
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hex-tile-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-subtle);
  overflow: hidden;
  margin-top: 0.35rem;
}

.hex-tile-bar-fill {
  height: 100%;
  border-radius: 3px;
}

/* ==========================
   MISSING COMPONENT STYLES
   ========================== */
.breadcrumb-bar {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-bar a {
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
}

.breadcrumb-bar a:hover {
  color: var(--color-green);
}

.two-col-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .two-col-layout {
    grid-template-columns: 1fr;
  }
}

.duel-vs-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
}

.fighter-card {
  flex: 1;
  text-align: center;
  padding: 1rem;
}

.fighter-label {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.vs-pill {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 2px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.salary-bar-wrap {
  margin-bottom: 1rem;
}

.salary-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.salary-bar-track {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 4px;
  overflow: hidden;
}

.salary-bar-fill {
  height: 100%;
  background: var(--color-green);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.search-filter-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.6rem 0.875rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--color-green);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.filter-pill {
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-subtle);
  border: 1px solid var(--border-primary);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill.active {
  background: var(--color-green);
  color: #000;
  border-color: var(--color-green);
}

.stock-table {
  width: 100%;
  border-collapse: collapse;
}

.stock-table th {
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border-primary);
}

.stock-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-primary);
  font-size: 0.875rem;
  vertical-align: middle;
}

.stock-table tr:hover {
  background: var(--bg-subtle);
}

.stock-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
}

.stock-logo-fallback {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--text-muted);
}

.time-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.tabs-header {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--bg-subtle);
  border: 1px solid var(--border-primary);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn.active {
  background: var(--color-green);
  color: #000;
  border-color: var(--color-green);
}

.tab-btn:hover:not(.active) {
  background: var(--bg-elevated);
}

/* Streak Components */
.streak-counter-box {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.streak-number {
  font-size: 3.5rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1;
}

.streak-fire {
  color: var(--color-yellow);
}

.streak-progress {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.streak-progress-fill {
  height: 100%;
  background: var(--color-green);
  border-radius: 4px;
}

.reward-milestone-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.milestone-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-subtle);
  border-radius: 8px;
}

/* Flowchart / How It Works */
.flowchart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.flow-step {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.flow-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

/* Wallet Screen */
.wallet-hero {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.wallet-balance-num {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-green);
}

/* Clash Card Components */
.clash-card-summary {
  cursor: pointer;
}

.clash-card-drawer {
  display: none;
}

.clash-interactive-card.expanded .clash-card-drawer {
  display: block;
}

.clash-drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.constituent-panel {
  background: var(--bg-subtle);
  border-radius: 10px;
  padding: 1rem;
}

.constituent-panel-title {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-primary);
}

.constituent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-primary);
}

.constituent-row:last-child {
  border-bottom: none;
}

.logo-stack {
  display: flex;
}

.logo-stack-item {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  object-fit: contain;
  margin-left: -8px;
}

.logo-stack-item:first-child {
  margin-left: 0;
}

/* Uniswap-style Wager Components */
.uniswap-wager-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 1rem;
}

.uniswap-wager-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.uniswap-wager-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.uniswap-wager-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  outline: none;
}

.uniswap-wager-input:focus {
  border-color: var(--color-green);
}

.uniswap-token-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-weight: 800;
  font-size: 0.875rem;
}

.uniswap-percent-bar {
  display: flex;
  gap: 0.375rem;
}

.wager-pct-btn {
  flex: 1;
  padding: 0.375rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.wager-pct-btn.active, .wager-pct-btn:hover {
  background: var(--color-green);
  color: #000;
  border-color: var(--color-green);
}

.payout-estimate-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-radius: 8px;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
}

/* Market Moments */
.moment-countdown {
  font-family: var(--font-mono);
  font-weight: 800;
  background: var(--bg-subtle);
  border-radius: 6px;
  padding: 0.25rem 0.75rem;
}

.moment-countdown.urgent {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-red);
  animation: pulse-urgent 1s infinite;
}

@keyframes pulse-urgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Leaderboard */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border-primary);
}

.leaderboard-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-primary);
  font-size: 0.875rem;
}

.leaderboard-table tr:hover {
  background: var(--bg-subtle);
}

.btn-green {
  background: var(--color-green);
  color: #000;
  border: 1px solid var(--color-green);
}

.btn-red {
  background: var(--color-red);
  color: #fff;
  border: 1px solid var(--color-red);
}

.badge-red {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--color-red);
}

.badge-neutral {
  background-color: var(--bg-subtle);
  color: var(--text-muted);
}

/* ===========================================================
   TOAST NOTIFICATION SYSTEM
   =========================================================== */
#sw-toast-container {
  position: fixed;
  bottom: 72px;
  right: 16px;
  z-index: 99999;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
  max-width: 360px;
  width: calc(100vw - 32px);
}

.sw-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.2);
  font-size: 0.875rem;
  line-height: 1.4;
  animation: toast-in 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
  transform-origin: bottom right;
  backdrop-filter: blur(12px);
}

.sw-toast.toast-exit {
  animation: toast-out 0.25s ease-in forwards;
}

.sw-toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
  font-weight: 900;
}

.sw-toast.toast-success { border-color: rgba(16,185,129,0.35); }
.sw-toast.toast-success .sw-toast-icon { background: rgba(16,185,129,0.2); color: #10b981; }

.sw-toast.toast-error { border-color: rgba(239,68,68,0.35); }
.sw-toast.toast-error .sw-toast-icon { background: rgba(239,68,68,0.2); color: #ef4444; }

.sw-toast.toast-info { border-color: rgba(59,130,246,0.35); }
.sw-toast.toast-info .sw-toast-icon { background: rgba(59,130,246,0.2); color: #3b82f6; }

.sw-toast.toast-warning { border-color: rgba(245,158,11,0.35); }
.sw-toast.toast-warning .sw-toast-icon { background: rgba(245,158,11,0.2); color: #f59e0b; }

.sw-toast-body { flex: 1; min-width: 0; }
.sw-toast-title { font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.sw-toast-msg { color: var(--text-muted); font-size: 0.8125rem; }

.sw-toast-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.sw-toast-close:hover { color: var(--text-primary); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px) scale(0.92); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(40px) scale(0.9); }
}

/* ===========================================================
   SCREEN TRANSITIONS
   =========================================================== */
.screen-view {
  display: none;
  animation: screen-fade-in 0.22s ease forwards;
}
.screen-view.active {
  display: block;
}
@keyframes screen-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===========================================================
   CLASH CARD POLISH
   =========================================================== */
.clash-interactive-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.clash-interactive-card:not(.expanded):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

/* Animated pool bar fill */
.pool-bar-fill {
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

/* Card stagger entrance */
@keyframes card-enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.clash-interactive-card {
  animation: card-enter 0.3s ease both;
}
.clash-interactive-card:nth-child(1) { animation-delay: 0.00s; }
.clash-interactive-card:nth-child(2) { animation-delay: 0.05s; }
.clash-interactive-card:nth-child(3) { animation-delay: 0.10s; }
.clash-interactive-card:nth-child(4) { animation-delay: 0.15s; }
.clash-interactive-card:nth-child(5) { animation-delay: 0.20s; }
.clash-interactive-card:nth-child(6) { animation-delay: 0.25s; }

/* ===========================================================
   PRICE FLASH ANIMATION (green up, red down)
   =========================================================== */
@keyframes flash-green {
  0% { background: rgba(16,185,129,0.25); }
  100% { background: transparent; }
}
@keyframes flash-red {
  0% { background: rgba(239,68,68,0.25); }
  100% { background: transparent; }
}
.price-flash-up { animation: flash-green 0.8s ease forwards; border-radius: 4px; }
.price-flash-down { animation: flash-red 0.8s ease forwards; border-radius: 4px; }

/* ===========================================================
   LOCK-IN BUTTON STATES
   =========================================================== */
.lock-btn-success {
  background: var(--color-green) !important;
  color: #000 !important;
  border-color: var(--color-green) !important;
}
.lock-btn-success:disabled { opacity: 1 !important; cursor: default !important; }

/* ===========================================================
   SPINNER ANIMATION
   =========================================================== */
.spin {
  animation: spin-anim 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin-anim {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===========================================================
   WATCHLIST TABLE ROW HOVER
   =========================================================== */
#stockTableBody tr {
  transition: background 0.15s;
}
#stockTableBody tr:hover {
  background: var(--bg-subtle);
}

/* ===========================================================
   CONFIRM MODAL (replaces alert)
   =========================================================== */
.sw-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  animation: modal-bg-in 0.2s ease forwards;
}
@keyframes modal-bg-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.sw-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  padding: 28px 28px 24px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  animation: modal-in 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.88) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.sw-modal-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.sw-modal h3 {
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.sw-modal p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 20px;
  line-height: 1.6;
}
.sw-modal-data {
  background: var(--bg-subtle);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}
.sw-modal-data div { display: flex; justify-content: space-between; padding: 3px 0; }
.sw-modal-data .label { color: var(--text-muted); }
.sw-modal-data .value { font-weight: 700; }
.sw-modal-data .value.green { color: var(--color-green); }
.sw-modal-data .value.red { color: var(--color-red); }
.sw-modal-actions { display: flex; gap: 10px; }
.sw-modal-actions .btn { flex: 1; justify-content: center; }

/* ===========================================================
   NAV ACTIVE UNDERLINE ANIMATION
   =========================================================== */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--text-accent);
  border-radius: 2px;
  transition: width 0.25s ease;
}
.nav-link.active::after {
  width: 60%;
}

/* ===========================================================
   WAR ROOM TERMINAL - COMPONENT OVERRIDES
   =========================================================== */

/* -- Global base -------------------------------------------- */
html {
  font-family: var(--font-sans);
}

body {
  background-color: var(--bg-primary);
  background-image: var(--noise);
  padding-bottom: 40px; /* room for ticker bar */
}

/* -- Headings -> Barlow Condensed --------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
}
h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Hero headline */
.hero-content h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--amber);
  text-shadow: 0 0 60px rgba(245,158,11,0.12);
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  line-height: 1.7;
  text-transform: uppercase;
  font-weight: 500;
  max-width: 420px;
}

/* -- Monospace numbers everywhere -------------------------- */
.stat-val,
.warchest-balance,
.watchlist-prices,
.font-mono,
[class*="price"],
[class*="pct"],
[class*="pool"] {
  font-family: var(--font-mono) !important;
}

/* -- Market Status Bar ------------------------------------- */
.market-status-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  height: 28px;
  display: flex;
  align-items: center;
}
.market-status-inner {
  width: 100%;
  max-width: 100%;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.market-status-live {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.market-status-utc {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* -- Navbar - War Room style ------------------------------ */
.navbar {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-primary) !important;
  backdrop-filter: none !important;
  height: 48px !important;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
}

/* Brand */
.nav-brand {
  font-family: var(--font-display) !important;
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  color: var(--text-primary) !important;
  text-transform: uppercase;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand-sub { display: none; }

/* Nav links */
.nav-link {
  font-family: var(--font-sans) !important;
  font-size: 0.6875rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--text-muted) !important;
  padding: 0 12px !important;
  height: 48px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  border-radius: 0 !important;
}
.nav-link:hover {
  color: var(--text-primary) !important;
  background: transparent !important;
}
.nav-link.active {
  color: var(--amber) !important;
  border-bottom-color: var(--amber) !important;
}
.nav-link::after { display: none !important; }

/* Warchest chip */
.warchest-chip {
  background: var(--bg-subtle) !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 0 !important;
  padding: 4px 10px !important;
}
.warchest-label {
  font-family: var(--font-mono) !important;
  font-size: 0.5625rem !important;
  letter-spacing: 0.1em !important;
  color: var(--text-muted) !important;
}
.warchest-balance {
  font-family: var(--font-mono) !important;
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  color: var(--amber) !important;
}

/* -- Buttons - sharp, terminal ----------------------------- */
.btn {
  border-radius: 0 !important;
  font-family: var(--font-sans) !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  font-size: 0.75rem !important;
  transition: background 0.15s, color 0.15s, border-color 0.15s !important;
}
.btn:hover { filter: none !important; }

/* Amber CTA - primary action */
.btn-amber {
  background: var(--amber) !important;
  color: #000 !important;
  border: 1px solid var(--amber) !important;
  font-weight: 800 !important;
}
.btn-amber:hover {
  background: #FBB031 !important;
  border-color: #FBB031 !important;
}

/* Black - secondary */
.btn-black {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-subtle) !important;
}
.btn-black:hover {
  background: var(--bg-subtle) !important;
  border-color: var(--amber) !important;
  color: var(--amber) !important;
}

/* Outline */
.btn-outline {
  background: transparent !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border-subtle) !important;
}
.btn-outline:hover {
  border-color: var(--amber) !important;
  color: var(--amber) !important;
}

/* Large hero CTA */
.btn-lg {
  padding: 14px 28px !important;
  font-size: 0.8125rem !important;
  letter-spacing: 0.12em !important;
}

/* -- Cards - noise texture + left amber accent ------------- */
.card,
.watchlist-card,
.mode-card,
.clash-interactive-card,
.live-contest-card,
.faction-card,
.hex-tile,
.wallet-panel,
.wager-box-panel,
.market-moment-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 0 !important;
  border-left: 2px solid var(--amber) !important;
  background-image: var(--noise) !important;
  box-shadow: none !important;
}

/* Section cards that span wide - no left accent */
.bottom-stats-bar,
.stat-item {
  border-radius: 0 !important;
}

/* -- Stat values - amber ----------------------------------- */
.stat-val {
  font-family: var(--font-mono) !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: var(--amber) !important;
  letter-spacing: -0.02em !important;
}
.stat-lbl {
  font-family: var(--font-sans) !important;
  font-size: 0.625rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--text-muted) !important;
}

/* -- Badges - sharp --------------------------------------- */
.badge {
  border-radius: 0 !important;
  font-family: var(--font-mono) !important;
  font-size: 0.625rem !important;
  letter-spacing: 0.08em !important;
  font-weight: 700 !important;
}
.badge-green {
  background: rgba(34,197,94,0.12) !important;
  color: var(--green) !important;
}

/* -- Pulse dot - green for live --------------------------- */
.pulse-dot {
  width: 6px !important;
  height: 6px !important;
  background: var(--green) !important;
  box-shadow: 0 0 6px var(--green) !important;
}

/* -- Section headers --------------------------------------- */
.section-header h2,
.section-title,
[class*="section"] > h2 {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

/* -- Filter pills / tabs - terminal style ----------------- */
.filter-pill,
.tab-btn,
.time-btn {
  border-radius: 0 !important;
  font-family: var(--font-mono) !important;
  font-size: 0.6875rem !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}
.filter-pill.active,
.tab-btn.active,
.time-btn.active {
  background: var(--amber) !important;
  color: #000 !important;
  border-color: var(--amber) !important;
}

/* -- Price colors ------------------------------------------ */
.text-green, [style*="var(--green)"], [style*="#10b981"] {
  color: var(--green) !important;
}

/* -- VS pill on clash cards ------------------------------- */
.vs-pill {
  border-radius: 0 !important;
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--amber) !important;
  font-family: var(--font-mono) !important;
  font-weight: 800 !important;
  font-size: 0.625rem !important;
  letter-spacing: 0.1em !important;
}

/* -- Wager input ------------------------------------------- */
.uniswap-wager-box {
  border-radius: 0 !important;
  border: 1px solid var(--border-subtle) !important;
  background: var(--bg-subtle) !important;
}
.uniswap-wager-input {
  border-radius: 0 !important;
  font-family: var(--font-mono) !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  background: transparent !important;
}
.uniswap-token-badge {
  border-radius: 0 !important;
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-primary) !important;
  font-family: var(--font-mono) !important;
  font-weight: 700 !important;
  color: var(--amber) !important;
}
.wager-pct-btn {
  border-radius: 0 !important;
  font-family: var(--font-mono) !important;
  font-size: 0.6875rem !important;
}
.wager-pct-btn.active {
  background: var(--amber) !important;
  color: #000 !important;
  border-color: var(--amber) !important;
}

/* -- Constituent panel ------------------------------------ */
.constituent-panel {
  border-radius: 0 !important;
  border: 1px solid var(--border-primary) !important;
  border-top: 1px solid var(--border-amber) !important;
}
.constituent-panel-title {
  font-family: var(--font-mono) !important;
  font-size: 0.6875rem !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

/* -- Lock-in button amber on expand ----------------------- */
#screen-clash .btn-black.btn-block {
  background: var(--amber) !important;
  color: #000 !important;
  border-color: var(--amber) !important;
  font-weight: 800 !important;
}
#screen-clash .btn-black.btn-block:hover {
  background: #FBB031 !important;
}

/* -- Table headers ---------------------------------------- */
th {
  font-family: var(--font-mono) !important;
  font-size: 0.625rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--text-muted) !important;
}

/* -- Leaderboard ------------------------------------------- */
.leaderboard-table th {
  font-family: var(--font-mono) !important;
  letter-spacing: 0.08em !important;
}

/* -- Input fields ------------------------------------------ */
input[type="text"],
input[type="number"],
input[type="search"] {
  border-radius: 0 !important;
  font-family: var(--font-mono) !important;
  border: 1px solid var(--border-primary) !important;
  background: var(--bg-subtle) !important;
  color: var(--text-primary) !important;
}
input:focus {
  border-color: var(--amber) !important;
  outline: none !important;
}

/* -- Toast overrides --------------------------------------- */
.sw-toast {
  border-radius: 0 !important;
  border-left: 3px solid var(--amber) !important;
}
.sw-toast.toast-success { border-left-color: var(--green) !important; }
.sw-toast.toast-error { border-left-color: var(--red) !important; }
.sw-toast.toast-info { border-left-color: var(--blue) !important; }

/* -- Modal overrides --------------------------------------- */
.sw-modal {
  border-radius: 0 !important;
  border-top: 2px solid var(--amber) !important;
}

/* -- Market status bar ------------------------------------ */
/* (already defined above) */

/* ===========================================================
   LIVE TICKER BAR
   =========================================================== */
.ticker-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 34px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  z-index: 1000;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.ticker-label {
  flex-shrink: 0;
  background: var(--amber);
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  border-right: none;
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.ticker-items {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
  will-change: transform;
}
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.tick-item {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0 20px;
  border-right: 1px solid var(--border-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
}
.tick-price {
  color: var(--text-primary);
  font-weight: 700;
}
.tick-up { color: var(--green); }
.tick-down { color: var(--red); }

/* ===========================================================
   HERO CTA - terminal style
   =========================================================== */
.hero-cta-group .btn-black {
  background: var(--amber) !important;
  color: #000 !important;
  border-color: var(--amber) !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.14em !important;
  font-weight: 900 !important;
}
.hero-cta-group .btn-black:hover {
  background: #FBB031 !important;
}
.hero-cta-group .btn-outline {
  color: var(--text-muted) !important;
  border-color: var(--border-subtle) !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.14em !important;
}

/* -- Trust badges ------------------------------------------ */
.hero-trust-badges .trust-item {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* -- Green accent text on hero ----------------------------- */
.green-accent {
  color: var(--green) !important;
  font-family: var(--font-display);
  font-weight: 900;
}

/* -- Payout estimate strip --------------------------------- */
.payout-estimate-strip {
  font-family: var(--font-mono) !important;
  font-size: 0.75rem !important;
  border-radius: 0 !important;
  background: var(--bg-subtle) !important;
}

/* -- Clash card expand button ------------------------------ */
.clash-card-summary .btn {
  font-size: 0.625rem !important;
  letter-spacing: 0.12em !important;
}

/* -- Section screen padding -------------------------------- */
.screen-view {
  padding-top: 24px;
}

/* -- War Desk / matchmaking ------------------------------- */
.pos-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
}
.pos-stat {
  min-width: 88px;
}
.pos-stat-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--green);
}
.pos-stat-lbl {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.pos-section {
  margin-bottom: 28px;
}
.pos-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.pos-section-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.pos-help {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.pos-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pos-card {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
}
@media (max-width: 720px) {
  .pos-card {
    grid-template-columns: 1fr;
  }
}
.pos-card-title {
  font-weight: 800;
  font-size: 0.95rem;
}
.pos-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-family: var(--font-mono);
}
.pos-card-wager {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--amber);
  white-space: nowrap;
}
.pos-card-phase {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border: 1px solid var(--border-primary);
  text-align: center;
  max-width: 220px;
}
.phase-live { color: var(--green); border-color: rgba(34,197,94,0.35); }
.phase-wait { color: var(--amber); border-color: rgba(245,158,11,0.35); }
.phase-win { color: var(--green); background: rgba(34,197,94,0.08); }
.phase-lose { color: var(--red); }
.phase-neutral { color: var(--text-muted); }
.pos-empty, .pos-empty-inline, .pos-loading {
  padding: 28px 20px;
  text-align: center;
  color: var(--text-muted);
}
.pos-empty h3 {
  color: var(--text-primary);
  margin-top: 0;
}
.pos-journey {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 18px 0;
}
.pos-journey-wide {
  justify-content: stretch;
}
.pos-step {
  flex: 1 1 120px;
  min-width: 110px;
  padding: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-primary);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.pos-step span {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.7rem;
  color: var(--bg-primary);
  background: var(--amber);
}
.pos-step strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 2px;
}

/* -- Docs page --------------------------------------------- */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 48px;
}
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-toc {
    position: static !important;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .docs-toc-title { width: 100%; }
  .docs-toc-link { flex: 1 1 auto; text-align: left; }
}
.docs-toc {
  position: sticky;
  top: 88px;
  padding: 14px;
}
.docs-toc-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.docs-toc-link {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 6px 8px;
  cursor: pointer;
  border-left: 2px solid transparent;
  font-family: var(--font-sans);
}
.docs-toc-link:hover {
  color: var(--amber);
  border-left-color: var(--amber);
  background: var(--bg-subtle);
}
.docs-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.docs-section h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.03em;
}
.docs-section h3 {
  margin: 16px 0 8px;
  font-size: 0.95rem;
  color: var(--amber);
}
.docs-section p,
.docs-section li {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.65;
}
.docs-section ul,
.docs-section ol {
  margin: 0 0 8px;
  padding-left: 1.25rem;
}
.docs-muted { font-size: 0.75rem; color: var(--text-muted); }
.docs-note {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-left: 2px solid var(--amber);
  font-size: 0.8125rem !important;
}
.docs-warn {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(239, 68, 68, 0.08);
  border-left: 2px solid var(--red);
  font-size: 0.8125rem !important;
  color: var(--text-primary) !important;
}
.docs-table-wrap {
  overflow-x: auto;
  margin: 10px 0;
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.docs-table th,
.docs-table td {
  border: 1px solid var(--border-primary);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.docs-table th {
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.docs-table code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--green);
}
.docs-pre {
  margin: 12px 0 0;
  padding: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-primary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.55;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: pre;
}
.docs-flow {
  margin-bottom: 12px;
}
.docs-flow .flow-icon {
  font-family: var(--font-mono);
  font-weight: 800;
}
.docs-deploy-box {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-primary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.6;
  word-break: break-all;
}
.docs-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 12px 0 24px;
}

.rank-chip {
  cursor: pointer;
  max-width: 220px;
}
.rank-chip .warchest-balance {
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos-rank-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-left: 3px solid var(--amber);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.pos-rank-banner strong {
  color: var(--amber);
  font-size: 1rem;
}