/**
 * SportPesa-inspired sportsbook theme (generic green palette, not SportPesa branding).
 * Scope with body.sp-theme on landing, auth, and home.
 */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

html {
  overflow-x: hidden;
  max-width: 100%;
}

body.sp-theme,
body.sp-theme * {
  box-sizing: border-box;
}

body.sp-theme {
  margin: 0;
  --sp-green: #009639;
  --sp-green-dark: #007a32;
  --sp-green-deep: #005e26;
  --sp-green-soft: #e8f7ee;
  --sp-gold: #ffb81c;
  --sp-gold-dark: #e5a500;
  --sp-gold-soft: #fff4d6;
  --sp-ink: #0f172a;
  --sp-ink-muted: #64748b;
  --sp-surface: #ffffff;
  --sp-page: #f4f6f8;
  --sp-border: #e2e8f0;
  --sp-nav-dark: #007a32;
  --sp-red: #dc2626;
  --sp-amber: #ffb81c;
  --banner-height: 200px;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--sp-page);
  color: var(--sp-ink);
}

body.sp-theme * {
  font-family: inherit;
}

body.sp-theme header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: var(--sp-surface);
  border-bottom: 1px solid var(--sp-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  max-width: 100%;
  box-sizing: border-box;
}

body.sp-theme header a.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--sp-green);
  text-decoration: none;
  display: inline-block;
}

body.sp-theme header a.logo:hover {
  opacity: 0.9;
}

body.sp-theme header a.logo span {
  color: var(--sp-gold-dark, #e5a500);
  font-weight: 800;
}

body.sp-theme .user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--sp-ink);
  font-size: 0.875rem;
  flex-wrap: wrap;
}

body.sp-theme .balance {
  color: var(--sp-green);
  font-weight: 700;
  background: var(--sp-green-soft);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
}

body.sp-theme .top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

body.sp-theme .top-actions button {
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8125rem;
  transition: background 0.2s, transform 0.15s;
}

body.sp-theme .top-actions .primary {
  background: var(--sp-green);
  color: #fff;
}

body.sp-theme .top-actions .primary:hover {
  background: var(--sp-green-dark);
}

body.sp-theme .top-actions .primary.alt {
  background: var(--sp-nav-dark);
  color: #fff;
}

body.sp-theme .top-actions .primary.alt:hover {
  background: #37474f;
}

body.sp-theme .top-actions .logout {
  background: transparent;
  color: var(--sp-red);
  border: 1px solid var(--sp-border);
}

body.sp-theme .top-actions .logout:hover {
  background: #ffebee;
  border-color: #ffcdd2;
}

body.sp-theme .site-top-chrome nav {
  background: var(--sp-nav-dark);
  display: flex;
  overflow-x: auto;
  padding: 0 12px;
  gap: 4px;
  scrollbar-width: none;
  border-bottom: 3px solid var(--sp-green);
}

body.sp-theme .site-top-chrome nav::-webkit-scrollbar {
  display: none;
}

body.sp-theme .site-top-chrome nav a {
  text-decoration: none;
  padding: 12px 14px;
  font-size: 0.8125rem;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, color 0.2s;
  border-radius: 6px 6px 0 0;
  margin-top: 4px;
}

body.sp-theme .site-top-chrome nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

body.sp-theme .site-top-chrome nav a.active {
  background: var(--sp-surface);
  color: var(--sp-green);
  font-weight: 600;
}

body.sp-theme .nav-badge {
  background: var(--sp-red);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  margin-left: 4px;
}

body.sp-theme .text-live {
  color: var(--sp-red);
  font-weight: 700;
}

body.sp-theme .market-section {
  margin-bottom: 20px;
}

body.sp-theme .market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

body.sp-theme:not(.game-page) .main {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 320px;
  gap: 0;
  padding: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  min-width: 0;
  align-items: stretch;
  box-sizing: border-box;
}

@media (max-width: 1023px) {
  body.sp-theme:not(.game-page) .main {
    grid-template-columns: 200px minmax(0, 1fr);
    padding: 12px;
    gap: 12px;
  }
  body.sp-theme .betslip {
    display: none;
  }
}

@media (max-width: 768px) {
  body.sp-theme:not(.game-page) .main {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }
  body.sp-theme:not(.game-page) aside.sports-sidebar,
  body.sp-theme:not(.game-page) aside:not(.sports-sidebar) {
    display: none;
  }
  body.sp-theme .betslip {
    display: none;
  }
  body.sp-theme .mobile-betslip {
    display: flex;
  }
}

body.sp-theme:not(.game-page) aside:not(.sports-sidebar) {
  background: var(--sp-surface);
  border-radius: 8px;
  padding: 12px;
  height: fit-content;
  border: 1px solid var(--sp-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.sp-theme:not(.game-page) aside:not(.sports-sidebar) h4 {
  margin: 0 0 12px;
  font-size: 0.75rem;
  color: var(--sp-green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

body.sp-theme:not(.game-page) aside:not(.sports-sidebar) .sport {
  padding: 10px 12px;
  font-size: 0.8125rem;
  color: var(--sp-ink);
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.sp-theme:not(.game-page) aside:not(.sports-sidebar) .sport:hover {
  background: var(--sp-page);
}

body.sp-theme:not(.game-page) aside:not(.sports-sidebar) .sport.active {
  background: var(--sp-green-soft);
  color: var(--sp-green-dark);
  font-weight: 600;
  border-left: 3px solid var(--sp-green);
}

body.sp-theme:not(.game-page) .content {
  background: var(--sp-surface);
  border-radius: 8px;
  padding: 16px;
  min-height: 560px;
  border: 1px solid var(--sp-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.sp-theme .banner-slider {
  width: 100%;
  height: var(--banner-height);
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--sp-border);
}

body.sp-theme .banner-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.sp-theme .featured-wrapper {
  margin: 12px 0;
  overflow: hidden;
}

body.sp-theme .featured-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

body.sp-theme .featured-scroll::-webkit-scrollbar {
  display: none;
}

body.sp-theme .featured-card {
  min-width: 100px;
  height: 100px;
  background: var(--sp-page);
  border: 1px solid var(--sp-border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--sp-ink);
  font-weight: 600;
  font-size: 0.6875rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  scroll-snap-align: start;
  flex-shrink: 0;
  position: relative;
}

body.sp-theme .featured-card:hover {
  transform: translateY(-2px);
  border-color: var(--sp-green);
  box-shadow: 0 4px 12px rgba(0, 150, 57, 0.15);
}

body.sp-theme .featured-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: 4px;
}

body.sp-theme .badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--sp-red);
  color: #fff;
  font-size: 0.5625rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

body.sp-theme .tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--sp-border);
  padding-bottom: 0;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

body.sp-theme .tabs span {
  font-size: 0.8125rem;
  cursor: pointer;
  color: var(--sp-ink-muted);
  padding: 10px 14px;
  border-radius: 6px 6px 0 0;
  transition: color 0.2s, background 0.2s;
}

body.sp-theme .tabs span:hover {
  color: var(--sp-ink);
  background: var(--sp-page);
}

body.sp-theme .tabs span.active {
  color: var(--sp-green);
  font-weight: 600;
  background: var(--sp-green-soft);
}

body.sp-theme .filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

body.sp-theme .filters button {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  color: var(--sp-ink-muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

body.sp-theme .filters button:hover,
body.sp-theme .filters button.active {
  background: var(--sp-green);
  color: #fff;
  border-color: var(--sp-green);
}

body.sp-theme .match-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 0.8fr;
  gap: 14px;
  align-items: center;
  padding: 14px 12px;
  border-bottom: 1px solid var(--sp-border);
  transition: background 0.15s;
  cursor: pointer;
  background: var(--sp-surface);
}

body.sp-theme .match-row:hover {
  background: #fafafa;
}

body.sp-theme .match-left .league {
  font-size: 0.6875rem;
  color: var(--sp-ink-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
  font-weight: 600;
}

body.sp-theme .match-left .teams {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--sp-ink);
}

body.sp-theme .match-odds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

body.sp-theme .match-odds .odds-label {
  text-align: center;
  font-size: 0.625rem;
  color: var(--sp-ink-muted);
  margin-bottom: 2px;
  font-weight: 600;
}

body.sp-theme .match-odds .odds {
  background: var(--sp-page);
  text-align: center;
  padding: 10px 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1px solid var(--sp-border);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: var(--sp-ink);
}

body.sp-theme .match-odds .odds:hover {
  background: var(--sp-green-soft);
  border-color: var(--sp-green);
  color: var(--sp-green-dark);
}

body.sp-theme .match-odds .odds.selected {
  background: var(--sp-green);
  color: #fff;
  border-color: var(--sp-green);
}

body.sp-theme .match-right {
  text-align: right;
  font-size: 0.75rem;
}

body.sp-theme .match-right .time {
  color: var(--sp-ink-muted);
  margin-bottom: 4px;
}

body.sp-theme .match-right .markets {
  color: var(--sp-green);
  font-weight: 600;
  font-size: 0.6875rem;
}

body.sp-theme @keyframes sp-odd-up {
  from {
    background: #c8e6c9;
    color: var(--sp-green-dark);
  }
  to {
    background: inherit;
    color: inherit;
  }
}

body.sp-theme @keyframes sp-odd-down {
  from {
    background: #ffcdd2;
    color: var(--sp-red);
  }
  to {
    background: inherit;
    color: inherit;
  }
}

body.sp-theme .odd-up {
  animation: sp-odd-up 0.6s ease;
}

body.sp-theme .odd-down {
  animation: sp-odd-down 0.6s ease;
}

body.sp-theme .full-markets {
  display: none;
  background: var(--sp-surface);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--sp-border);
}

body.sp-theme .full-markets.active {
  display: block;
}

body.sp-theme .back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  background: var(--sp-page);
  color: var(--sp-ink);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
  border: 1px solid var(--sp-border);
  transition: background 0.2s;
}

body.sp-theme .back-btn:hover {
  background: var(--sp-green-soft);
  border-color: var(--sp-green);
  color: var(--sp-green-dark);
}

body.sp-theme .market-title {
  font-size: 0.875rem;
  color: var(--sp-green);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sp-border);
  font-weight: 600;
}

body.sp-theme .market-grid .odds {
  background: var(--sp-page);
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  font-size: 0.75rem;
  border: 1px solid var(--sp-border);
  transition: all 0.15s;
}

body.sp-theme .market-grid .odds:hover {
  background: var(--sp-green);
  color: #fff;
  border-color: var(--sp-green);
}

body.sp-theme .market-grid .odds .name {
  color: var(--sp-ink-muted);
}

body.sp-theme .market-grid .odds:hover .name {
  color: rgba(255, 255, 255, 0.9);
}

body.sp-theme .betslip {
  background: var(--sp-surface);
  border-radius: 8px;
  padding: 16px;
  position: sticky;
  top: 72px;
  height: calc(100vh - 96px);
  overflow-y: auto;
  border: 1px solid var(--sp-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body.sp-theme .betslip h4 {
  margin-bottom: 14px;
  color: var(--sp-ink);
  font-size: 1rem;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--sp-green);
}

body.sp-theme .bet-item {
  background: var(--sp-page);
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  position: relative;
  border: 1px solid var(--sp-border);
}

body.sp-theme .bet-item .match {
  font-size: 0.75rem;
  margin-bottom: 4px;
  line-height: 1.35;
  padding-right: 24px;
}

body.sp-theme .bet-item .selection {
  font-size: 0.6875rem;
  color: var(--sp-ink-muted);
}

body.sp-theme .bet-item .odd {
  color: var(--sp-green);
  font-weight: 700;
  font-size: 0.875rem;
}

body.sp-theme .remove-bet {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--sp-ink-muted);
  cursor: pointer;
  font-size: 1.125rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

body.sp-theme .remove-bet:hover {
  background: #ffebee;
  color: var(--sp-red);
}

body.sp-theme .betslip-summary {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--sp-border);
}

body.sp-theme .betslip-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.8125rem;
  color: var(--sp-ink);
}

body.sp-theme .betslip-row.total {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sp-green);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--sp-border);
}

body.sp-theme .stake-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  color: var(--sp-ink);
  border-radius: 6px;
  margin: 10px 0;
  font-size: 0.9375rem;
}

body.sp-theme .stake-input:focus {
  outline: none;
  border-color: var(--sp-green);
  box-shadow: 0 0 0 3px var(--sp-green-soft);
}

body.sp-theme .betslip button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s;
  margin-top: 8px;
}

body.sp-theme .btn-place {
  background: var(--sp-green);
  color: #fff;
}

body.sp-theme .btn-place:hover:not(:disabled) {
  background: var(--sp-green-dark);
}

body.sp-theme .btn-place:disabled {
  background: #bdbdbd;
  color: #fff;
  cursor: not-allowed;
}

body.sp-theme .btn-deposit {
  background: var(--sp-nav-dark);
  color: #fff;
}

body.sp-theme .btn-deposit:hover {
  background: #37474f;
}

body.sp-theme .mobile-betslip {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: var(--sp-green);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  z-index: 1001;
  box-shadow: 0 4px 16px rgba(0, 150, 57, 0.45);
  border: 2px solid #fff;
}

body.sp-theme .mobile-betslip .count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--sp-red);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  border: 2px solid #fff;
}

body.sp-theme .betslip-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 80%;
  background: var(--sp-surface);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 20px;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--sp-border);
}

body.sp-theme .betslip-drawer.open {
  transform: translateY(0);
}

body.sp-theme .drawer-header h4 {
  color: var(--sp-ink);
  font-weight: 700;
}

body.sp-theme .close-drawer {
  background: var(--sp-page);
  border: 1px solid var(--sp-border);
  color: var(--sp-ink);
  font-size: 1.25rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  line-height: 1;
}

body.sp-theme .loading {
  text-align: center;
  padding: 40px;
  color: var(--sp-ink-muted);
}

body.sp-theme .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--sp-border);
  border-top-color: var(--sp-green);
  border-radius: 50%;
  animation: sp-spin 0.9s linear infinite;
  margin: 0 auto 12px;
}

@keyframes sp-spin {
  to {
    transform: rotate(360deg);
  }
}

body.sp-theme .error-message {
  background: #ffebee;
  border: 1px solid #ffcdd2;
  color: var(--sp-red);
  padding: 14px;
  border-radius: 8px;
  text-align: center;
  margin: 16px 0;
  font-size: 0.875rem;
}

body.sp-theme footer {
  background: var(--sp-nav-dark);
  padding: 28px 20px;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 32px;
}

body.sp-theme footer p + p {
  margin-top: 8px;
}

@media (max-width: 768px) {
  body.sp-theme .match-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  body.sp-theme .match-odds {
    order: 2;
  }
  body.sp-theme .match-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  body.sp-theme .featured-card {
    min-width: 88px;
    height: 88px;
  }
}

/* --- Landing (index.html) --- */
body.sp-theme.landing header {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  border-radius: 0;
}

body.sp-theme.landing .hero {
  background: linear-gradient(160deg, var(--sp-nav-dark) 0%, #37474f 50%, var(--sp-green-dark) 100%);
  padding: 56px 24px 64px;
  text-align: center;
  color: #fff;
}

body.sp-theme.landing .hero-content {
  max-width: 720px;
  margin: 0 auto;
}

body.sp-theme.landing .hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}

body.sp-theme.landing .hero h1 span {
  color: #69f0ae;
}

body.sp-theme.landing .hero p {
  font-size: 1.0625rem;
  opacity: 0.92;
  margin-bottom: 28px;
  line-height: 1.55;
}

body.sp-theme.landing .cta-button {
  background: var(--sp-green);
  color: #fff;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
}

body.sp-theme.landing .cta-button:hover {
  background: #00c853;
  transform: translateY(-2px);
}

body.sp-theme.landing .features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 48px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

body.sp-theme.landing .feature {
  background: var(--sp-surface);
  padding: 24px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--sp-border);
  transition: box-shadow 0.2s, border-color 0.2s;
}

body.sp-theme.landing .feature:hover {
  border-color: var(--sp-green);
  box-shadow: 0 4px 16px rgba(0, 150, 57, 0.1);
}

body.sp-theme.landing .feature h3 {
  font-size: 1.0625rem;
  margin: 12px 0 8px;
  color: var(--sp-green);
  font-weight: 700;
}

body.sp-theme.landing .feature p {
  color: var(--sp-ink-muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

body.sp-theme.landing .sports-preview {
  padding: 40px 20px;
  background: var(--sp-page);
}

body.sp-theme.landing .section-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 28px;
  font-weight: 800;
  color: var(--sp-ink);
}

body.sp-theme.landing .section-title span {
  color: var(--sp-green);
}

body.sp-theme.landing .sports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  max-width: 960px;
  margin: 0 auto;
}

body.sp-theme.landing .sport-card {
  background: var(--sp-surface);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--sp-border);
  transition: all 0.2s;
}

body.sp-theme.landing .sport-card:hover {
  border-color: var(--sp-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

body.sp-theme.landing .sport-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-top: 8px;
}

body.sp-theme.landing .sport-card .icon {
  font-size: 2rem;
  line-height: 1;
}

body.sp-theme.landing .odds-preview {
  padding: 40px 20px;
  max-width: 960px;
  margin: 0 auto;
}

body.sp-theme.landing .preview-table {
  background: var(--sp-surface);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--sp-border);
}

body.sp-theme.landing .preview-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 14px 16px;
  align-items: center;
  border-bottom: 1px solid var(--sp-border);
  font-size: 0.875rem;
}

body.sp-theme.landing .preview-row:last-child {
  border-bottom: none;
}

body.sp-theme.landing .preview-row.header {
  background: var(--sp-nav-dark);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.sp-theme.landing .preview-row:not(.header):hover {
  background: var(--sp-page);
}

body.sp-theme.landing .team {
  font-weight: 600;
}

body.sp-theme.landing .odds-box {
  background: var(--sp-page);
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  font-weight: 700;
  color: var(--sp-green);
  border: 1px solid var(--sp-border);
}

body.sp-theme.landing .footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
}

body.sp-theme.landing .footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.875rem;
}

body.sp-theme.landing .footer-links a:hover {
  color: #69f0ae;
}

body.sp-theme.landing .copyright {
  color: rgba(255, 255, 255, 0.55);
}

body.sp-theme.landing footer {
  margin-top: 0;
}

@media (max-width: 768px) {
  body.sp-theme.landing .preview-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  body.sp-theme.landing .preview-row.header {
    display: none;
  }
}

/* --- Auth (login / register) --- */
body.sp-theme .auth-page-surface {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 48px;
  background: linear-gradient(180deg, var(--sp-page) 0%, #cfd8dc 100%);
}

body.sp-theme .auth-page-surface .login-container,
body.sp-theme .auth-page-surface .register-container {
  background: var(--sp-surface);
  padding: 36px;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--sp-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.sp-theme .auth-page-surface .register-container {
  max-width: 460px;
}

body.sp-theme .auth-page-surface .subtitle {
  text-align: center;
  color: var(--sp-ink-muted);
  margin-bottom: 28px;
  font-size: 0.875rem;
}

body.sp-theme .auth-page-surface .form-group label {
  color: var(--sp-ink);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  font-size: 0.8125rem;
}

body.sp-theme .auth-page-surface .form-group input {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  color: var(--sp-ink);
}

body.sp-theme .auth-page-surface .form-group input:focus {
  border-color: var(--sp-green);
  box-shadow: 0 0 0 3px var(--sp-green-soft);
}

body.sp-theme .auth-page-surface .btn-login,
body.sp-theme .auth-page-surface .btn-register {
  background: var(--sp-green);
  border-radius: 8px;
  color: #fff;
  letter-spacing: 0.02em;
}

body.sp-theme .auth-page-surface .btn-login:hover,
body.sp-theme .auth-page-surface .btn-register:hover:not(:disabled) {
  background: var(--sp-green-dark);
}

body.sp-theme .auth-page-surface .register-link a,
body.sp-theme .auth-page-surface .login-link a,
body.sp-theme .auth-page-surface .forgot-password a {
  color: var(--sp-green);
}

body.sp-theme .auth-page-surface .register-link,
body.sp-theme .auth-page-surface .login-link {
  text-align: center;
  border-top: 1px solid var(--sp-border);
  padding-top: 22px;
  margin-top: 8px;
}

body.sp-theme .auth-page-surface .referral-box {
  background: var(--sp-green-soft);
  border-color: var(--sp-green);
  border-style: solid;
}

body.sp-theme .auth-page-surface .referral-box label {
  color: var(--sp-green-dark);
}

body.sp-theme .auth-page-surface .captcha-box {
  background: var(--sp-page);
  border-color: var(--sp-border);
}

body.sp-theme .auth-page-surface .checkbox-group {
  color: var(--sp-ink);
}

body.sp-theme .auth-page-surface .checkbox-group a {
  color: var(--sp-green);
}

body.sp-theme .auth-page-surface .error {
  background: #ffebee;
  border: 1px solid #ffcdd2;
  color: var(--sp-red);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.8125rem;
  text-align: center;
}

body.sp-theme .auth-page-surface .success {
  background: var(--sp-green-soft);
  border: 1px solid var(--sp-green);
  color: var(--sp-green-dark);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.8125rem;
  text-align: center;
}

body.sp-theme .auth-page-surface .btn-register:disabled {
  background: #bdbdbd;
  cursor: not-allowed;
}

body.sp-theme .auth-page-surface .auth-card-head {
  text-align: center;
  margin-bottom: 28px;
}

body.sp-theme .auth-page-surface .auth-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: var(--sp-green-soft);
  color: var(--sp-green-dark);
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

body.sp-theme.page-auth .auth-brand-logo-wrap {
  background: #000 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  padding: 14px 20px !important;
  margin-bottom: 4px !important;
}

body.sp-theme .auth-page-surface .auth-card-title {
  margin: 0 0 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--sp-ink);
  letter-spacing: -0.02em;
}

body.sp-theme .auth-page-surface .auth-card-lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--sp-ink-muted);
}

body.sp-theme .auth-page-surface .auth-card-lead strong {
  color: var(--sp-ink);
}

body.sp-theme .auth-page-surface .auth-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

body.sp-theme .auth-page-surface .btn-auth-outline {
  width: 100%;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--sp-border);
  background: var(--sp-surface);
  color: var(--sp-ink);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

body.sp-theme .auth-page-surface .btn-auth-outline:hover:not(:disabled) {
  border-color: var(--sp-green);
  color: var(--sp-green-dark);
  background: var(--sp-green-soft);
}

body.sp-theme .auth-page-surface .btn-auth-outline:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.sp-theme .auth-page-surface .success a {
  color: var(--sp-green-dark);
  font-weight: 700;
}

body.sp-theme .auth-buttons {
  display: flex;
  gap: 10px;
}

body.sp-theme .auth-buttons .btn-login {
  background: transparent;
  color: var(--sp-ink);
  border: 1px solid var(--sp-border);
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.875rem;
}

body.sp-theme .auth-buttons .btn-login:hover {
  border-color: var(--sp-green);
  color: var(--sp-green);
}

body.sp-theme .auth-buttons .btn-register {
  background: var(--sp-green);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.875rem;
}

body.sp-theme .auth-buttons .btn-register:hover {
  background: var(--sp-green-dark);
}

body.sp-theme .text-muted-soft {
  color: var(--sp-ink-muted);
  text-align: center;
  padding: 20px 0;
  font-size: 0.875rem;
}

body.sp-theme .league-group-header {
  background: var(--sp-nav-dark);
  padding: 12px 16px;
  border-radius: 8px 8px 0 0;
  font-weight: 700;
  font-size: 0.8125rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ========== Mobile: overflow, safe areas, touch targets ========== */
body.sp-theme {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  body.sp-theme {
    overflow-x: hidden;
  }
}

@media (max-width: 768px) {
  body.sp-theme {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body.sp-theme button,
  body.sp-theme nav a,
  body.sp-theme .btn-login,
  body.sp-theme .btn-register,
  body.sp-theme .top-actions button {
    touch-action: manipulation;
  }

  body.sp-theme nav {
    padding-left: max(8px, env(safe-area-inset-left, 0px));
    padding-right: max(8px, env(safe-area-inset-right, 0px));
    -webkit-overflow-scrolling: touch;
  }

  body.sp-theme nav a {
    min-height: 44px;
    padding: 12px 12px;
    box-sizing: border-box;
  }

  body.sp-theme footer {
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
    padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
  }

  body.sp-theme .auth-page-surface {
    min-height: calc(100dvh - 120px);
    padding: 20px 14px 40px;
  }

  body.sp-theme .auth-page-surface .login-container,
  body.sp-theme .auth-page-surface .register-container {
    padding: 28px 20px;
  }
}

@media (max-width: 540px) {
  body.sp-theme header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    max-width: 100%;
    box-sizing: border-box;
  }

  body.sp-theme nav {
    max-width: 100%;
    box-sizing: border-box;
  }

  body.sp-theme header a.logo {
    font-size: 1.2rem;
    align-self: flex-start;
  }

  body.sp-theme .user-info {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  body.sp-theme .balance {
    align-self: flex-start;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.sp-theme .top-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  body.sp-theme .top-actions button {
    min-height: 44px;
    padding: 10px 6px;
    font-size: 0.6875rem;
  }

  body.sp-theme .guest-header-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  body.sp-theme .guest-header-actions .btn-login,
  body.sp-theme .guest-header-actions .btn-register {
    min-height: 44px;
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  body.sp-theme .auth-page-surface {
    padding: 16px 12px 32px;
  }

  body.sp-theme .auth-page-surface .login-container,
  body.sp-theme .auth-page-surface .register-container {
    padding: 22px 16px;
  }

  body.sp-theme .auth-page-surface .auth-card-title {
    font-size: 1.25rem;
  }
}

/* --- Auth pages: login / register (page-auth) --- */
body.sp-theme.page-auth {
  background: #0f1218;
  color: #eef1f6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.sp-theme.page-auth .site-top-chrome > nav {
  display: none;
}

body.sp-theme.page-auth .mobile-menu-btn {
  display: none !important;
}

body.sp-theme.page-auth .guest-header-actions,
body.sp-theme.page-auth .header-utilities,
body.sp-theme.page-auth .top-actions {
  display: none !important;
}

body.sp-theme.page-auth .site-top-chrome header {
  justify-content: center;
  padding: 14px 16px;
}

body.sp-theme.page-auth .mobile-hub {
  display: none !important;
}

body.sp-theme.page-auth .mobile-bottom-nav,
body.sp-theme.page-auth .pwa-install-banner {
  display: none !important;
}

body.sp-theme.page-auth.has-mobile-nav {
  padding-bottom: 0 !important;
}

body.sp-theme.page-auth .auth-page-surface {
  flex: 1;
  width: 100%;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 32px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 150, 57, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 184, 28, 0.08) 0%, transparent 50%),
    #0f1218;
}

body.sp-theme.page-auth .login-container,
body.sp-theme.page-auth .register-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 28px 24px 24px;
  background: #1a1f2e;
  border: 1px solid #2d3548;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

body.sp-theme.page-auth .register-container {
  max-width: 460px;
}

body.sp-theme.page-auth .auth-card-head {
  text-align: center;
  margin-bottom: 24px;
}

body.sp-theme.page-auth .auth-card-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

body.sp-theme.page-auth .auth-card-lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #8b95a8;
}

body.sp-theme.page-auth .form-group {
  margin-bottom: 16px;
}

body.sp-theme.page-auth .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #cbd5e1;
}

body.sp-theme.page-auth .form-group input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  background: #222836;
  border: 1px solid #2d3548;
  color: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

body.sp-theme.page-auth .form-group input::placeholder {
  color: #64748b;
}

body.sp-theme.page-auth .form-group input:focus {
  outline: none;
  border-color: #009639;
  box-shadow: 0 0 0 3px rgba(0, 150, 57, 0.2);
}

body.sp-theme.page-auth .forgot-password {
  text-align: right;
  margin: -4px 0 16px;
}

body.sp-theme.page-auth .forgot-password a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffb81c;
  text-decoration: none;
}

body.sp-theme.page-auth .forgot-password a:hover {
  text-decoration: underline;
}

body.sp-theme.page-auth .btn-login,
body.sp-theme.page-auth .btn-register {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  background: linear-gradient(135deg, #ffb81c 0%, #f7941d 100%);
  color: #1a1f2e;
  box-shadow: 0 4px 16px rgba(255, 184, 28, 0.35);
  transition: filter 0.15s, transform 0.1s;
}

body.sp-theme.page-auth .btn-login:hover,
body.sp-theme.page-auth .btn-register:hover:not(:disabled) {
  filter: brightness(1.05);
}

body.sp-theme.page-auth .btn-login:active,
body.sp-theme.page-auth .btn-register:active:not(:disabled) {
  transform: scale(0.99);
}

body.sp-theme.page-auth .register-link,
body.sp-theme.page-auth .login-link {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #2d3548;
  font-size: 0.875rem;
  color: #8b95a8;
}

body.sp-theme.page-auth .register-link a,
body.sp-theme.page-auth .login-link a {
  color: #4ade80;
  font-weight: 700;
  text-decoration: none;
}

body.sp-theme.page-auth .register-link a:hover,
body.sp-theme.page-auth .login-link a:hover {
  text-decoration: underline;
}

body.sp-theme.page-auth .error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.8125rem;
  text-align: center;
}

body.sp-theme.page-auth .success {
  background: rgba(0, 150, 57, 0.12);
  border: 1px solid rgba(0, 150, 57, 0.35);
  color: #86efac;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.8125rem;
  text-align: center;
}

body.sp-theme.page-auth .success a {
  color: #ffb81c;
  font-weight: 700;
}

body.sp-theme.page-auth .referral-box {
  padding: 14px;
  border-radius: 10px;
  background: rgba(0, 150, 57, 0.1);
  border: 1px solid rgba(0, 150, 57, 0.3);
}

body.sp-theme.page-auth .referral-box label {
  color: #4ade80;
}

body.sp-theme.page-auth .referral-box .hint {
  font-size: 0.6875rem;
  margin-top: 6px;
  color: #8b95a8;
  line-height: 1.4;
}

body.sp-theme.page-auth .checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.8125rem;
  color: #cbd5e1;
  line-height: 1.45;
}

body.sp-theme.page-auth .checkbox-group input {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: #009639;
}

body.sp-theme.page-auth .checkbox-group label {
  margin: 0;
  font-weight: 500;
}

body.sp-theme.page-auth .checkbox-group a {
  color: #ffb81c;
  text-decoration: none;
}

body.sp-theme.page-auth .checkbox-group a:hover {
  text-decoration: underline;
}

body.sp-theme.page-auth .captcha-box {
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 16px;
  background: #222836;
  border: 1px solid #2d3548;
}

body.sp-theme.page-auth .captcha-box label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.8125rem;
  color: #cbd5e1;
}

body.sp-theme.page-auth .captcha-box input {
  width: 88px;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 1.125rem;
  font-weight: 700;
  background: #1a1f2e;
  border: 1px solid #2d3548;
  color: #fff;
}

body.sp-theme.page-auth footer {
  background: transparent;
  border: none;
  padding: 16px;
  font-size: 0.6875rem;
  color: #64748b;
}

body.sp-theme.page-auth footer p {
  margin: 0;
  opacity: 0.85;
}

body.sp-theme.page-auth footer p + p {
  display: none;
}

@media (max-width: 768px) {
  body.sp-theme.page-auth .auth-page-surface {
    align-items: flex-start;
    padding: 16px 12px 24px;
    min-height: auto;
  }

  body.sp-theme.page-auth .login-container,
  body.sp-theme.page-auth .register-container {
    padding: 22px 18px 20px;
    border-radius: 14px;
  }

  body.sp-theme.page-auth .auth-card-title {
    font-size: 1.25rem;
  }
}
