/* Base */
body {
  margin: 0;
}

/* Animatable CSS variable for header hue */
@property --mid-h {
  syntax: '<number>';
  inherits: false;
  initial-value: 210;
}

@keyframes headerHueShift {
  0% {
    --mid-h: 0;
  }

  100% {
    --mid-h: 360;
  }
}

/* Header gradient styling */
header {
  padding: 20px;
  --mid-h: 210;
  background: linear-gradient(135deg, #000000 0%, hsl(265.85deg 90% 58%) 70%, #0005ff 100%);
  color: #ffffff;
  animation: headerHueShift 12s linear infinite;
}

header .logo {
  color: #ffffff;
}

header .description {
  color: rgba(255, 255, 255, 0.82);
}

header a {
  color: #ffffff;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.container {
  margin: 0 auto;
  width: calc(100% - 40px);
  padding: 0 20px;
}

main {
  padding-bottom: 50px;
}

.grid {
  display: grid;
  gap: 20px;
}

.card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
}

div[data-league-code="TEST"]{
  	background: linear-gradient(90deg, #b9deed, #efefef);
}

h2 {
  margin-top: 0;
}

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

th,
td {
  border-bottom: 1px solid #eee;
  padding: 2px;
  text-align: left;
}

.status {
  font-size: 12px;
  color: #666;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn {
  padding: 8px 12px;
  border: 1px solid #444;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.badge-scheduled {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-live {
  background: #fef3c7;
  color: #92400e;
}

.badge-finished {
  background: #dcfce7;
  color: #166534;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

.muted {
  color: #666;
  font-size: 12px;
}

.logo {
  font-size: 36px;
  font-weight: bold;
  color: white;
}

.description {
  font-size: 18px;
  margin-bottom: 20px;
  color: white;
}

/* Table */
.responsive-table {
  width: 100%;
}

.coupons-block{
  padding: 16px 0;
}

/* Div-based responsive table (rt) */
.rt {
  width: 100%;
  display: block;
}

.rt-head,
.rt-row {
  padding: 8px 15px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 3fr 0.8fr 0.9fr 1fr 0.9fr 1.1fr 1.1fr;
  border-bottom: 1px solid #eee;
}
.rt-row:nth-child(even) {
  background: #7584fb08;
}


.rt-head {
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #64748b;
}

.rt-th,
.rt-cell {
  padding: 2px;
  text-align: left;
}
.rt-cell{
  font-size: 13px;
}

.rt-row:hover {
  background: #f9fafb;
}

.rt-body .rt-row:last-child .rt-cell {
  border-bottom: 0;
}

.odd-btn {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

.odd-btn:hover {
  background: #f3f4f6;
}

.sep {
  color: #999;
  margin: 0 4px;
}

/* Improved odds layout */
.odd-group {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.odd-btn {
  font-size: 13px;
  padding: 2px 5px;
  font-weight: 600;
  border-radius: 9999px;
  border-color: transparent;
}

.odd-btn--home {
  background: #e0f2fe;
  color: #075985;
}

.odd-btn--draw {
  background: #f3f4f6;
  color: #111827;
}

.odd-btn--away {
  background: #fee2e2;
  color: #7f1d1d;
}

.odd-btn:hover {
  filter: brightness(0.95);
}

.line tr:last-child td {
  border-bottom: 0;
}

.line td {
  padding: 3px 2px;
}

.muted {
  color: #6b7280;
  font-size: 12px;
}

.wrap {
  word-break: break-word;
}

.collapsible .collapse-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  padding: 6px 10px;
}

.collapsible .arrow {
  font-size: 16px;
  line-height: 1;
}

.collapsible.is-collapsed .collapsible-body {
  display: none;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header {
  margin-bottom: 8px;
}

.teams-row {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.team-name {
  font-weight: 600;
}

.vs-sep {
  color: #6b7280;
}

.event-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.extra-row {
  background: #f9fafb;
}

.extra-markets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}

.market-box {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}

.market-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.market-sels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.market-sel {
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #f3f4f6;
}

/* Table header polish */
table thead th {
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #64748b;
}

table tbody tr:hover {
  background: #f9fafb;
}

/* Card title spacing */
.card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Nav tweaks */
nav a {
  text-underline-offset: 3px;
}

nav a[aria-current="page"] {
  text-decoration: underline;
}

/* Status dots */
.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.status-dot--win {
  background: #16a34a;
}

.status-dot--lose {
  background: #dc2626;
}

/* Form helpers */
.form-label {
  width: 110px;
}

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

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

.mt-20 {
  margin-top: 20px;
}

/* Bet slip */
#slip-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.slip-item {
  padding: 6px 0 12px;
  border-bottom: 1px solid #eee;
}

/* Mobile */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }

  /* rt mobile behavior mirrors the old table-based responsive layout */
  .rt-head {
    display: none;
  }

  .rt-row {
    grid-template-columns: 1fr;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
  }

  .rt-cell {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border: none;
    padding: 6px 0;
  }

  .rt-cell::before {
    content: attr(data-label);
    font-size: 12px;
    color: #666;
    margin-right: 8px;
  }

  .row {
    flex-direction: column;
    align-items: flex-start;
  }

  .odd-btn {
    padding: 6px 8px;
  }

  .teams-title {
    font-weight: 700;
  }
}