:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #152033;
  --surface-3: #0b1220;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #06b6d4;
  --accent-2: #2563eb;
  --positive: #22c55e;
  --danger: #ef4444;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  padding-bottom: 0;
}

body.football-theme {
  --bg: #07140d;
  --surface: #132418;
  --surface-2: #0e1d13;
  --surface-3: #06100a;
  --line: rgba(187, 247, 208, 0.22);
  --accent: #a3e635;
  --accent-2: #16a34a;
  --positive: #22c55e;
  --amber: #facc15;
  background:
    linear-gradient(180deg, rgba(22, 163, 74, 0.14), transparent 360px),
    radial-gradient(circle at 20% 0%, rgba(163, 230, 53, 0.12), transparent 360px),
    var(--bg);
}

body.football-theme .site-header,
body.football-theme .dashboard-topbar {
  background: rgba(7, 20, 13, 0.9);
}

body.football-theme .brand-mark,
body.football-theme .primary,
body.football-theme .badge {
  background: linear-gradient(135deg, #16a34a, #a3e635);
  border-color: rgba(163, 230, 53, 0.7);
}

body.football-theme .hero-overlay {
  background:
    linear-gradient(90deg, rgba(7, 20, 13, 0.96), rgba(7, 20, 13, 0.5)),
    linear-gradient(0deg, rgba(7, 20, 13, 0.55), rgba(7, 20, 13, 0.1));
}

body.football-theme .market-strip div {
  background: #0a1b10;
}

body.football-theme .game-card.best {
  border-color: rgba(163, 230, 53, 0.52);
}

body.football-theme .football-pitch-band {
  min-height: 92px;
  border-block: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 49%, rgba(248, 250, 252, 0.12) 49% 51%, transparent 51%),
    repeating-linear-gradient(90deg, rgba(34, 197, 94, 0.16) 0 90px, rgba(22, 163, 74, 0.1) 90px 180px);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(15, 23, 42, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.hero-actions,
.card-topline,
.section-heading,
.tabs,
.confidence-panel,
.footer,
.mobile-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #07111f;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.24);
}

.brand-mark span {
  position: relative;
}

.brand-mark span::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -7px;
  width: 11px;
  height: 11px;
  border-top: 2px solid #07111f;
  border-right: 2px solid #07111f;
}

.nav {
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover,
.header-action:hover,
.text-link:hover {
  color: var(--accent);
}

.header-action,
.text-link {
  color: var(--text);
  border: 0;
  background: transparent;
  font-weight: 800;
}

.top-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(6, 182, 212, 0.45);
  border-radius: 8px;
  color: #07111f;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 10px 28px rgba(6, 182, 212, 0.18);
}

.top-login:hover {
  color: #07111f;
}

.hero {
  position: relative;
  min-height: 84svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 120px clamp(18px, 5vw, 72px) 64px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 18vh;
  background: linear-gradient(0deg, var(--bg), rgba(15, 23, 42, 0));
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.24)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 790px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 790px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 7vw, 6.6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.hero-copy,
.section-copy,
.confidence-panel p {
  max-width: 670px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.7;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 900;
}

.button:disabled {
  cursor: wait;
  opacity: 0.7;
}

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

.primary {
  color: #07111f;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: rgba(6, 182, 212, 0.8);
}

.compact-button {
  width: 100%;
  min-height: 42px;
}

.market-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.market-strip div {
  padding: 18px clamp(16px, 3vw, 32px);
  background: #101a30;
}

.market-strip span,
.metric-grid span,
.stat-grid span,
.premium-board span,
.calculator-result span,
.history-list div:first-child span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.market-strip strong,
.metric-grid b,
.premium-board strong,
.stat-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 1.35rem;
}

.section {
  padding: 88px clamp(18px, 5vw, 72px);
}

.section-heading {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.game-grid,
.pricing-grid,
.stat-grid,
.player-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.game-card,
.game-detail,
.confidence-panel,
.stat-grid div,
.player-grid article,
.premium-board,
.bankroll-tool,
.ai-assistant,
.ranking-list,
.history-list,
.plan {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.game-card,
.player-grid article,
.bankroll-tool,
.ai-assistant,
.plan {
  padding: 22px;
}

.game-card.best {
  border-color: rgba(34, 197, 94, 0.48);
}

.game-card.warning {
  border-color: rgba(245, 158, 11, 0.48);
}

.game-card.muted-card {
  border-color: rgba(148, 163, 184, 0.22);
}

.game-card.muted-card .pick {
  color: var(--muted);
}

.card-topline {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.positive {
  color: var(--positive);
}

.alert {
  color: var(--amber);
}

.pick {
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 900;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.metric-grid span,
.reason-list span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
}

.reason-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
}

.reason-list span::before,
.reason-board span::before {
  content: "+";
  margin-right: 8px;
  color: var(--positive);
  font-weight: 900;
}

.analysis-layout,
.premium-layout,
.tools-layout,
.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 18px;
  align-items: stretch;
}

.game-detail {
  padding: 24px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(21, 32, 51, 0.98));
}

.detail-heading {
  align-items: start;
}

.market-chip {
  padding: 10px 12px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 8px;
  color: var(--accent);
  background: rgba(6, 182, 212, 0.08);
  font-weight: 900;
}

.probability-stack {
  display: grid;
  gap: 16px;
  margin: 28px 0;
}

.probability-row {
  display: grid;
  grid-template-columns: 80px 1fr 50px;
  gap: 12px;
  align-items: center;
}

.bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--positive);
}

.bar.muted i {
  background: var(--amber);
}

.bar.danger i {
  background: var(--danger);
}

.reason-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reason-board span {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.44);
}

.confidence-panel {
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  text-align: center;
}

.gauge {
  width: 178px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 0 58%, transparent 59%),
    conic-gradient(var(--accent) calc(var(--value) * 1%), rgba(148, 163, 184, 0.18) 0);
}

.gauge span {
  font-size: 2.6rem;
  font-weight: 950;
}

.confidence-panel strong {
  color: var(--accent);
  font-size: 1.3rem;
  text-transform: uppercase;
}

.tabs {
  gap: 8px;
}

.tab {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-weight: 900;
}

.tab.active {
  color: #07111f;
  background: var(--accent);
  border-color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.stat-grid div {
  padding: 22px;
}

.stat-grid strong,
.premium-board strong {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.player-grid article {
  display: grid;
  gap: 10px;
}

.player-grid span {
  color: var(--muted);
  font-weight: 900;
}

.premium-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

.premium-board div {
  padding: 24px;
  border: 1px solid var(--line);
}

.premium-console,
.premium-dashboard,
.premium-lock,
.vip-lock,
.vip-tools {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.premium-console {
  overflow: hidden;
}

.premium-lock,
.vip-lock {
  padding: 24px;
}

.premium-lock p,
.vip-lock p,
.vip-result {
  color: var(--muted);
  line-height: 1.6;
}

.premium-dashboard {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.premium-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.premium-tab {
  min-height: 48px;
  border: 0;
  color: var(--muted);
  background: var(--surface-2);
  font-weight: 900;
}

.premium-tab.active {
  color: #07111f;
  background: var(--accent);
}

.premium-view {
  display: none;
  padding: 18px;
}

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

.premium-list {
  display: grid;
  gap: 10px;
}

.premium-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
}

.premium-item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.premium-item strong {
  color: var(--text);
}

.premium-item-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.premium-item-metrics span {
  padding: 10px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.84rem;
  font-weight: 800;
}

.vip-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 16px;
}

.vip-bankroll {
  display: grid;
  gap: 12px;
}

.vip-result {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-3);
}

.tools-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
}

.compact-heading {
  display: block;
  margin-bottom: 20px;
}

.calculator {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface-3);
  font-weight: 900;
}

input,
select {
  min-height: 48px;
}

textarea {
  min-height: 128px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(6, 182, 212, 0.5);
  outline-offset: 2px;
}

.calculator-result {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 14px;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-3);
}

.calculator-result strong {
  color: var(--accent);
  font-size: 1.35rem;
}

.chat-window {
  display: grid;
  gap: 12px;
  max-height: 460px;
  overflow: auto;
  margin: 20px 0;
  padding-right: 6px;
}

.question,
.answer {
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.question {
  color: var(--text);
  background: rgba(37, 99, 235, 0.18);
}

.answer {
  color: var(--muted);
  background: var(--surface-3);
}

.answer.thinking {
  color: var(--accent);
}

.answer.error {
  color: var(--amber);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.ranking-list {
  margin: 0;
  padding: 10px;
  list-style: none;
  counter-reset: rank;
}

.ranking-list li {
  counter-increment: rank;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.ranking-list li:last-child {
  border-bottom: 0;
}

.ranking-list li::before {
  content: counter(rank) "o";
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #07111f;
  background: var(--accent);
  font-weight: 950;
}

.ranking-list strong {
  color: var(--positive);
  font-size: 1.3rem;
}

.history-list {
  overflow: hidden;
}

.history-list div {
  display: grid;
  grid-template-columns: 0.8fr 1.5fr 1.2fr 1fr 0.8fr;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.history-list div:last-child {
  border-bottom: 0;
}

.history-list span {
  color: var(--text);
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan.featured {
  border-color: rgba(6, 182, 212, 0.62);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.22), var(--surface));
}

.badge {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #07111f;
  background: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
}

.price {
  margin-bottom: 20px;
  font-size: 2.3rem;
  font-weight: 950;
}

.price span {
  color: var(--muted);
  font-size: 1rem;
}

ul {
  display: grid;
  gap: 12px;
  min-height: 118px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

li::marker {
  color: var(--accent);
}

.plan li::before {
  content: "+";
  margin-right: 8px;
  color: var(--accent);
  font-weight: 900;
}

.plan .button {
  width: 100%;
}

.footer {
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  max-width: 760px;
  margin: 0;
}

.mobile-nav {
  display: none;
}

.auth-modal,
.profile-modal {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

.auth-modal[hidden],
.profile-modal[hidden] {
  display: none !important;
}

.auth-modal.open,
.profile-modal.open {
  display: grid;
}

.auth-dialog {
  position: relative;
  width: min(100%, 460px);
  max-height: calc(100svh - 36px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-3);
  font-weight: 900;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 22px 0 20px;
}

.auth-tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 900;
}

.auth-tab.active {
  color: #07111f;
  border-color: var(--accent);
  background: var(--accent);
}

.auth-form {
  display: none;
  gap: 14px;
}

.auth-form.active {
  display: grid;
}

.auth-form h2 {
  font-size: 2.2rem;
}

.selected-plan {
  padding: 12px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(6, 182, 212, 0.08);
}

.selected-plan strong,
.auth-message.success {
  color: var(--positive);
}

.auth-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--amber);
  line-height: 1.5;
}

.profile-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
}

.profile-card span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.profile-card strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.profile-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.subscriber-entry {
  display: grid;
  gap: 16px;
}

.subscriber-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(6, 182, 212, 0.07), transparent 300px),
    var(--bg);
}

.dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 12px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
}

.dashboard-home-link {
  justify-self: center;
  color: var(--muted);
  font-weight: 800;
}

.dashboard-home-link:hover {
  color: var(--accent);
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px clamp(18px, 5vw, 72px) 48px;
}

.dashboard-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dashboard-sidebar-head {
  display: grid;
  gap: 6px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.dashboard-sidebar-head strong {
  font-size: 1.05rem;
}

.dashboard-menu {
  display: grid;
  padding: 10px;
}

.dashboard-menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}

.dashboard-menu-item small {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.72rem;
}

.dashboard-menu-item:hover,
.dashboard-menu-item.active {
  color: var(--text);
  background: rgba(6, 182, 212, 0.1);
}

.dashboard-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.dashboard-hero,
.dashboard-content,
.dashboard-gate,
.dashboard-card,
.dashboard-tool,
.dashboard-result,
.dashboard-empty,
.dashboard-loading,
.dashboard-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 28px;
}

.dashboard-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.96;
}

.dashboard-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-content {
  min-height: 420px;
  padding: 18px;
}

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--surface-2);
}

.dashboard-card-top,
.dashboard-table-head,
.dashboard-table-row {
  display: grid;
  gap: 12px;
}

.dashboard-card-top {
  grid-template-columns: 1fr auto;
  color: var(--muted);
  font-size: 0.92rem;
}

.dashboard-card h3,
.dashboard-result h3,
.dashboard-gate h2 {
  margin: 0;
}

.dashboard-card p,
.dashboard-result p,
.dashboard-gate p,
.dashboard-empty,
.dashboard-loading {
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-metrics span {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 0.82rem;
}

.dashboard-metrics strong {
  color: var(--accent);
  font-size: 1.2rem;
}

.dashboard-table {
  overflow: hidden;
}

.dashboard-table-head,
.dashboard-table-row {
  grid-template-columns: 120px 1.3fr 1.3fr 0.7fr 90px;
  align-items: center;
  padding: 14px 16px;
}

.dashboard-table-head {
  color: var(--accent);
  background: var(--surface-3);
  font-weight: 950;
}

.dashboard-table-row {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.dashboard-gate {
  display: grid;
  gap: 14px;
  max-width: 560px;
  padding: 24px;
}

.dashboard-login-form {
  display: grid;
  gap: 12px;
}

.dashboard-tool {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.dashboard-result,
.dashboard-empty,
.dashboard-loading {
  padding: 22px;
}

.dashboard-stack {
  display: grid;
  gap: 16px;
}

.dashboard-ai-panel {
  display: grid;
  gap: 16px;
}

.dashboard-ai-chat {
  min-height: 360px;
  max-height: 540px;
}

.dashboard-select-label {
  max-width: 720px;
}

.single-panel {
  grid-template-columns: 1fr;
}

.dashboard-stack h2 {
  margin: 8px 0 16px;
}

.ai-output {
  white-space: pre-line;
}

.premium-ai-preview {
  margin-bottom: 18px;
}

@media (max-width: 1040px) {
  .market-strip,
  .game-grid,
  .pricing-grid,
  .analysis-layout,
  .premium-layout,
  .tools-layout,
  .ranking-layout,
  .stat-grid,
  .player-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-shell,
  .dashboard-tool,
  .dashboard-card-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
  }

  .dashboard-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: 72px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    padding: 12px 16px;
  }

  .header-action {
    font-size: 0.9rem;
  }

  .hero {
    min-height: 80svh;
    padding: 98px 16px 54px;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.68)),
      linear-gradient(0deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.14));
  }

  h1 {
    font-size: 3rem;
  }

  .section {
    padding: 66px 16px;
  }

  .section-heading {
    display: block;
  }

  .metric-grid,
  .reason-board,
  .premium-board,
  .premium-item-metrics,
  .premium-tabs,
  .vip-grid,
  .calculator,
  .calculator-result,
  .dashboard-topbar,
  .dashboard-hero,
  .dashboard-metrics,
  .dashboard-table-head,
  .dashboard-table-row {
    grid-template-columns: 1fr;
  }

  .dashboard-home-link {
    display: none;
  }

  .dashboard-shell {
    padding: 16px 16px 88px;
  }

  .dashboard-menu {
    grid-template-columns: 1fr;
  }

  .dashboard-content,
  .dashboard-hero,
  .dashboard-gate {
    padding: 18px;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .history-list div {
    grid-template-columns: 1fr;
  }

  .history-list div:first-child {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    z-index: 30;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--line);
    border-top: 1px solid var(--line);
  }

  .mobile-nav a,
  .mobile-nav button {
    display: grid;
    place-items: center;
    min-height: 60px;
    border: 0;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.96);
    font-size: 0.82rem;
    font-weight: 900;
  }

  .mobile-nav a:hover,
  .mobile-nav button:hover {
    color: var(--accent);
  }

  .footer {
    display: block;
  }

  .footer strong {
    display: block;
    margin-bottom: 12px;
  }
}
