:root {
  --bg: #06110d;
  --surface: rgba(14, 35, 27, 0.7);
  --surface-border: rgba(90, 248, 162, 0.2);
  --text: #e7fff3;
  --muted: #a6d6be;
  --primary: #5af8a2;
  --primary-strong: #2fd785;
  --shadow: 0 12px 50px rgba(18, 163, 95, 0.25);
}

html[data-theme='light'] {
  --bg: #eef8f2;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-border: rgba(15, 133, 74, 0.24);
  --text: #0f2a1e;
  --muted: #2f6650;
  --primary: #11a85d;
  --primary-strong: #0a8d4b;
  --shadow: 0 12px 40px rgba(14, 117, 65, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at 10% 0%, #113d2c 0%, transparent 30%), var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.wrapper {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.bg-glow {
  position: fixed;
  z-index: -1;
  border-radius: 100%;
  filter: blur(80px);
}

.bg-glow-1 {
  width: 300px;
  height: 300px;
  background: rgba(61, 231, 139, 0.32);
  top: -100px;
  left: -90px;
}

.bg-glow-2 {
  width: 320px;
  height: 320px;
  background: rgba(25, 181, 108, 0.24);
  bottom: -100px;
  right: -100px;
}

.glass {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  border-radius: 18px;
}

.hero {
  padding: 1.2rem 0 1rem;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  position: relative;
  z-index: 50;
}

.top-nav h1 {
  margin: 0;
  font-size: 1.1rem;
}


.nav-links {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0 1rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
  border-color: var(--surface-border);
  background: rgba(90, 248, 162, 0.12);
}

.mini-line {
  color: var(--muted);
  font-size: 0.8rem;
  display: block;
  margin-top: 0.35rem;
}

.account-menu {
  position: relative;
}

.account-trigger {
  border: 1px solid var(--surface-border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  min-height: 42px;
  padding: 0.25rem 0.65rem 0.25rem 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(90, 248, 162, 0.14);
  font-size: 0.82rem;
  font-weight: 700;
}

.account-label {
  font-size: 0.8rem;
}

.account-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: min(330px, 88vw);
  padding: 0.9rem;
  z-index: 40;
}

.signup-form {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.menu-section-title {
  margin: 0.8rem 0 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.google-signin-slot {
  min-height: 40px;
}

.menu-action {
  border: 1px solid var(--surface-border);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  padding: 0.58rem 0.75rem;
  margin-top: 0.35rem;
  text-align: left;
}

.menu-action-primary {
  text-align: center;
  background: rgba(90, 248, 162, 0.15);
}

.hero-content {
  margin-top: 1rem;
  padding: 1.5rem;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-content h2 {
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  line-height: 1.15;
  margin: 0;
}

.hero-content p {
  color: var(--muted);
  max-width: 68ch;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chips span {
  font-size: 0.82rem;
  border: 1px solid var(--surface-border);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

.controls {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1rem;
  margin-top: 1.2rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

input,
select {
  width: 100%;
  padding: 0.76rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
}

html[data-theme='light'] input,
html[data-theme='light'] select {
  background: rgba(255, 255, 255, 0.6);
}

.stats-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.stat-card {
  padding: 1rem;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.stat-card strong {
  font-size: 1.5rem;
}

.strategy-sections {
  margin-top: 1.1rem;
  display: grid;
  gap: 1rem;
}

.section-card {
  padding: 1rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.section-head h3 {
  margin: 0;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.stock-card {
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 0.8rem;
  background: rgba(10, 41, 30, 0.35);
}

html[data-theme='light'] .stock-card {
  background: rgba(255, 255, 255, 0.52);
}

.stock-card h4 {
  margin: 0;
}

.stock-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.83rem;
}

.badge {
  background: rgba(90, 248, 162, 0.15);
  color: var(--primary);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.73rem;
}

.methodology {
  margin: 1.2rem 0;
  padding: 1rem 1.2rem;
}

.methodology ol {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.45;
}

.footer {
  padding: 0.8rem 0 1.6rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 720px) {
  .top-nav {
    align-items: flex-start;
    gap: 0.6rem;
    flex-direction: column;
  }
/* ── Live Price Styles ──────────────────────────────────────────────────── */

.price-up   { color: #5af8a2; }
.price-down { color: #ff6b6b; }

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5af8a2;
  animation: pulse-dot 2s ease-in-out infinite;
  vertical-align: middle;
  margin-left: 3px;
}

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

.stock-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stock-card-header h4 {
  margin: 0;
  flex: 1;
}

.stock-live-price {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.live-price-value {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.live-price-change {
  font-size: 0.78rem;
  font-weight: 600;
}

/* ── Freshness Badge ────────────────────────────────────────────────────── */

#freshnessBadge {
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}

/* ── Index Map Cards ────────────────────────────────────────────────────── */

.index-map-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.index-map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.index-map-header p {
  margin: 0;
  font-weight: 600;
}

.price-badge {
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.price-badge.price-up   { border-color: rgba(90, 248, 162, 0.4); background: rgba(90, 248, 162, 0.1); }
.price-badge.price-down { border-color: rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.1); }

.index-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.index-tile {
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
  background: rgba(0,0,0,0.15);
}

.index-tile em {
  font-style: normal;
  margin-left: 3px;
  font-weight: 400;
}

.index-tile.price-up   { border-color: rgba(90, 248, 162, 0.3); }
.index-tile.price-down { border-color: rgba(255, 107, 107, 0.3); }

/* ── Prediction Market Probability Bar ──────────────────────────────────── */

.prob-bar-track {
  height: 5px;
  background: rgba(90, 248, 162, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.prob-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.6s ease;
}
  .controls {
    grid-template-columns: 1fr;
  }
}
