:root {
  --bg: #09121f;
  --bg-soft: #122235;
  --panel: rgba(7, 17, 29, 0.86);
  --panel-border: rgba(170, 255, 92, 0.15);
  --text: #f5f7f0;
  --muted: #91a5b9;
  --accent: #b4ff52;
  --accent-strong: #e7ff72;
  --accent-dark: #274409;
  --danger: #ff7e7a;
  --chip: rgba(255, 255, 255, 0.05);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(180, 255, 82, 0.15), transparent 28%),
    radial-gradient(circle at bottom right, rgba(58, 136, 255, 0.16), transparent 35%),
    linear-gradient(145deg, #08111d 0%, #102039 55%, #08121f 100%);
  font-family: Bahnschrift, "Segoe UI", sans-serif;
  position: relative;
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  inset: auto;
  width: 20rem;
  height: 20rem;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.5;
  pointer-events: none;
}

.backdrop-a {
  top: 4rem;
  right: -4rem;
  background: rgba(180, 255, 82, 0.18);
  animation: float 9s ease-in-out infinite;
}

.backdrop-b {
  bottom: 6rem;
  left: -5rem;
  background: rgba(64, 162, 255, 0.18);
  animation: float 11s ease-in-out infinite reverse;
}

.hero,
.layout,
.footer-note {
  position: relative;
  z-index: 1;
}

.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem 1rem;
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 1.25rem;
  align-items: end;
}

.eyebrow,
.section-kicker,
.note-label {
  margin: 0 0 0.65rem;
  color: var(--accent);
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1,
.panel-head h2 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.04rem;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.92;
  max-width: 10ch;
}

.lead {
  max-width: 55ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-note,
.panel,
.analysis-card,
.coupon-card,
.match-card,
.analysis-placeholder {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.hero-note {
  padding: 1.3rem 1.4rem;
  border-radius: 1.4rem;
}

.note-list {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
  display: grid;
  gap: 0.5rem;
}

.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  gap: 1.25rem;
}

.panel {
  border-radius: 1.6rem;
  padding: 1.35rem;
  animation: rise-in 0.55s ease both;
}

.controls {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.panel-head h2 {
  font-size: 2rem;
}

.profile-select {
  display: grid;
  gap: 0.4rem;
  min-width: 12rem;
}

.profile-select span,
.sub-panel-head p {
  color: var(--muted);
  font-size: 0.9rem;
}

select,
input,
button {
  font: inherit;
}

select,
input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

select:focus,
input:focus {
  border-color: rgba(180, 255, 82, 0.68);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.35rem;
}

button {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

button:hover {
  transform: translateY(-2px);
}

.primary-button,
.ghost-button {
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
}

.primary-button {
  color: #0a1408;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 12px 30px rgba(180, 255, 82, 0.2);
  font-weight: 700;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.ghost-button.danger {
  color: var(--danger);
}

.sub-panel {
  padding: 1rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-banner {
  padding: 0.95rem 1rem;
  border-radius: 1.1rem;
  background: linear-gradient(135deg, rgba(180, 255, 82, 0.12), rgba(87, 157, 255, 0.08));
  border: 1px solid rgba(180, 255, 82, 0.18);
}

.info-banner.warning {
  background: linear-gradient(135deg, rgba(255, 214, 102, 0.12), rgba(87, 157, 255, 0.08));
  border-color: rgba(255, 214, 102, 0.22);
}

.info-banner.warning strong {
  color: #ffe07f;
}

.info-banner.error {
  background: linear-gradient(135deg, rgba(255, 126, 122, 0.12), rgba(87, 157, 255, 0.08));
  border-color: rgba(255, 126, 122, 0.24);
}

.info-banner.error strong {
  color: #ffd4d2;
}

.info-banner strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--accent-strong);
}

.info-banner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.sub-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.sub-panel-head h3 {
  margin: 0;
  font-size: 1rem;
}

.api-fetch-panel {
  display: grid;
  gap: 0.95rem;
}

.api-toolbar {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fixture-filters {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--text);
}

.toggle-row input {
  width: auto;
  accent-color: var(--accent);
}

.toggle-row span {
  color: var(--text);
  font-size: 0.92rem;
}

.league-filter-group {
  display: grid;
  gap: 0.6rem;
}

.league-filter-grid,
.market-filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.league-chip-option,
.market-chip-option {
  position: relative;
  display: inline-flex;
}

.league-chip-option input,
.market-chip-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.league-chip-option span,
.market-chip-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.48rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.84rem;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.league-chip-option input:checked + span,
.market-chip-option input:checked + span {
  border-color: rgba(180, 255, 82, 0.35);
  background: rgba(180, 255, 82, 0.12);
  color: var(--accent-strong);
}

.league-chip-option:hover span,
.market-chip-option:hover span {
  transform: translateY(-1px);
}

.market-filter-group {
  display: grid;
  gap: 0.6rem;
}

.api-toolbar label {
  display: grid;
  gap: 0.45rem;
}

.api-toolbar label span,
.helper-copy {
  color: var(--muted);
}

.helper-copy {
  margin: 0;
  line-height: 1.6;
  font-size: 0.9rem;
}

.match-list,
.analysis-list,
.tracker-stack,
.fixture-results {
  display: grid;
  gap: 0.85rem;
}

.match-list.empty,
.empty-state,
.analysis-placeholder {
  color: var(--muted);
}

.tracker-stack {
  margin-top: 1rem;
}

.match-card,
.analysis-card,
.coupon-card {
  border-radius: 1.2rem;
  padding: 1rem;
}

.match-card {
  display: grid;
  gap: 0.7rem;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.fixture-option {
  display: grid;
  gap: 0.7rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.fixture-option-head,
.fixture-option-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.fixture-option-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.fixture-subline {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.fixture-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.88rem;
}

.fixture-note strong,
.analysis-note strong {
  color: var(--text);
}

.fixture-option-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-chip.upcoming {
  background: rgba(180, 255, 82, 0.12);
  color: var(--accent-strong);
}

.status-chip.live {
  background: rgba(255, 214, 102, 0.16);
  color: #ffe07f;
}

.status-chip.ended {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.match-card-top,
.analysis-header,
.coupon-head,
.pick-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.analysis-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.fixture {
  margin: 0;
  font-weight: 700;
  font-size: 1.02rem;
}

.league-chip,
.metric-chip,
.pick-chip,
.confidence-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: var(--chip);
  font-size: 0.82rem;
}

.suitability-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 800;
}

.suitability-pill.play {
  background: rgba(180, 255, 82, 0.15);
  color: var(--accent-strong);
}

.suitability-pill.caution {
  background: rgba(255, 214, 102, 0.16);
  color: #ffe07f;
}

.suitability-pill.avoid {
  background: rgba(255, 126, 122, 0.16);
  color: #ffd4d2;
}

.site-fit-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 800;
}

.site-fit-pill.listed {
  background: rgba(180, 255, 82, 0.15);
  color: var(--accent-strong);
}

.site-fit-pill.limited {
  background: rgba(87, 157, 255, 0.16);
  color: #c8dcff;
}

.site-fit-pill.blocked {
  background: rgba(255, 126, 122, 0.16);
  color: #ffd4d2;
}

.quality-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 800;
}

.quality-pill.clean {
  background: rgba(180, 255, 82, 0.15);
  color: var(--accent-strong);
}

.quality-pill.limited {
  background: rgba(255, 214, 102, 0.16);
  color: #ffe07f;
}

.quality-pill.weak {
  background: rgba(255, 126, 122, 0.16);
  color: #ffd4d2;
}

.match-meta,
.analysis-metrics,
.coupon-picks,
.analysis-picks,
.analysis-tracker-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.remove-button {
  justify-self: start;
  background: rgba(255, 126, 122, 0.14);
  color: var(--danger);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
}

.coupon-summary {
  margin-bottom: 1rem;
}

.focus-summary {
  margin-bottom: 1rem;
}

.no-bet-card {
  display: grid;
  gap: 0.9rem;
}

.no-bet-card.active {
  border-color: rgba(255, 214, 102, 0.26);
  background: linear-gradient(135deg, rgba(255, 214, 102, 0.08), rgba(255, 255, 255, 0.02));
}

.no-bet-card.clear {
  border-color: rgba(180, 255, 82, 0.2);
}

.no-bet-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
}

.no-bet-pill.active {
  background: rgba(255, 214, 102, 0.16);
  color: #ffe07f;
}

.no-bet-pill.clear {
  background: rgba(180, 255, 82, 0.15);
  color: var(--accent-strong);
}

.coupon-card {
  display: grid;
  gap: 1rem;
  animation: rise-in 0.45s ease both;
}

.coupon-card p,
.analysis-card p,
.analysis-placeholder,
.footer-note {
  line-height: 1.65;
}

.coupon-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.stat-box {
  padding: 0.9rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.stat-box span {
  color: var(--muted);
  font-size: 0.82rem;
}

.stat-box strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.1rem;
}

.analysis-card {
  display: grid;
  gap: 0.8rem;
  animation: rise-in 0.45s ease both;
}

.analysis-card h3,
.coupon-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.analysis-card p,
.coupon-card p {
  margin: 0;
  color: var(--muted);
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.focus-card {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.focus-rank {
  color: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.16rem;
  text-transform: uppercase;
}

.focus-card h3 {
  margin: 0;
  font-size: 1rem;
}

.focus-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.decision-box {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.decision-box span {
  color: var(--muted);
  font-size: 0.8rem;
}

.decision-box strong {
  font-size: 0.98rem;
}

.decision-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.analysis-note {
  padding: 0.8rem 0.9rem;
  border-radius: 0.95rem;
  background: rgba(87, 157, 255, 0.1);
  border: 1px solid rgba(87, 157, 255, 0.14);
}

.analysis-note.avoid-note {
  background: rgba(255, 126, 122, 0.08);
  border-color: rgba(255, 126, 122, 0.18);
}

.tracker-panel {
  display: grid;
  gap: 0.9rem;
}

.tracker-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

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

.result-sync-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.result-sync-status.warning {
  color: var(--danger);
}

.performance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

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

.performance-grid.empty-state {
  color: var(--muted);
}

.learning-grid.empty-state,
.backtest-grid.empty-state {
  color: var(--muted);
}

.learning-card,
.backtest-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.95rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.learning-card h4,
.backtest-card h4 {
  margin: 0;
  font-size: 0.98rem;
}

.learning-card p,
.backtest-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.learning-list {
  display: grid;
  gap: 0.45rem;
}

.learning-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  font-size: 0.76rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.mini-pill.good {
  background: rgba(180, 255, 82, 0.15);
  color: var(--accent-strong);
}

.mini-pill.bad {
  background: rgba(255, 126, 122, 0.16);
  color: #ffd4d2;
}

.mini-pill.warn {
  background: rgba(255, 214, 102, 0.16);
  color: #ffe07f;
}

.pick-chip.primary {
  color: #08110f;
  background: linear-gradient(135deg, var(--accent) 0%, #f0ff9b 100%);
  font-weight: 700;
}

.pick-chip.secondary {
  color: #eaf2ff;
  background: rgba(87, 157, 255, 0.18);
}

.confidence-pill {
  color: #08110f;
  background: #ebff89;
  font-weight: 800;
}

.analysis-tracker {
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.analysis-tracker-head {
  display: grid;
  gap: 0.5rem;
}

.analysis-tracker-head strong {
  font-size: 0.98rem;
}

.tracker-copy {
  color: var(--muted);
}

.result-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.result-form label {
  display: grid;
  gap: 0.45rem;
}

.result-form label span {
  color: var(--muted);
  font-size: 0.84rem;
}

.result-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.result-pill.win {
  background: rgba(180, 255, 82, 0.16);
  color: var(--accent-strong);
}

.result-pill.loss {
  background: rgba(255, 126, 122, 0.14);
  color: var(--danger);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.footer-note {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
  color: var(--muted);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 680px) {
  .hero {
    padding-top: 2rem;
  }

  .panel {
    padding: 1rem;
  }

  .api-toolbar,
  .focus-grid,
  .decision-grid,
  .coupon-stats,
  .result-form {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .sub-panel-head,
  .coupon-head,
  .pick-line,
  .analysis-header,
  .fixture-option-head,
  .fixture-option-actions {
    flex-direction: column;
    align-items: start;
  }
}
