/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: #f5f6f7;
  color: #333;
  line-height: 1.5;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Header ===== */
header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 0;
}

header .container {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111;
}

.match-day-label {
  font-size: 0.85rem;
  color: #888;
}

.history-link {
  margin-left: auto;
  font-size: 0.85rem;
  color: #f97316;
  text-decoration: none;
  white-space: nowrap;
}

.history-link:hover { text-decoration: underline; }

.back-link {
  font-size: 0.85rem;
  color: #888;
  text-decoration: none;
  white-space: nowrap;
}

.back-link:hover { color: #333; }

/* ===== Date Selector ===== */
.date-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 4px;
  border-top: 1px solid #f3f4f6;
  margin-top: 4px;
}

.date-selector label {
  font-size: 0.85rem;
  color: #555;
  white-space: nowrap;
}

.date-selector select {
  font-size: 0.9rem;
  padding: 4px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  color: #333;
  cursor: pointer;
}

.history-label {
  margin: 12px 0 4px;
}

.site-desc {
  font-size: 0.82rem;
  color: #aaa;
  padding: 6px 0 2px;
  border-top: 1px solid #f3f4f6;
  margin-top: 4px;
}

/* ===== Stats ===== */
.stats {
  margin: 16px 0 12px;
  font-size: 0.9rem;
  color: #555;
}

/* ===== Match List ===== */
.match-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 32px;
}

/* ===== Section Divider ===== */
.section-divider {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  padding: 4px 8px;
  background: #f3f4f6;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.live-divider {
  color: #16a34a;
  background: #f0fdf4;
}

/* ===== Match Card ===== */
.match-card {
  background: #fff;
  border-radius: 8px;
  border-top: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  border-left: 4px solid transparent;
  padding: 14px 16px;
}

.match-card.recommended {
  border-left-color: #f97316;
  background: #fffbf7;
}

/* Card Header row */
.match-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.star {
  color: #f97316;
  font-size: 1rem;
  line-height: 1;
}

.league {
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
}

.match-time {
  margin-left: auto;
  font-size: 0.85rem;
  color: #888;
}

/* Teams */
.teams {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #111;
}

.vs {
  font-weight: 400;
  color: #aaa;
  margin: 0 6px;
  font-size: 0.9rem;
}

/* Odds row */
.odds {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: #444;
  margin-bottom: 4px;
}

.odds span { white-space: nowrap; }

/* Extra row (handicap / ou) */
.extra {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 4px;
}

/* Comment */
.comment {
  margin-top: 10px;
  padding: 8px 12px;
  background: #fff7ed;
  border-left: 3px solid #f97316;
  border-radius: 4px;
  font-size: 0.88rem;
  color: #92400e;
  line-height: 1.6;
}

/* ===== Error ===== */
.error-msg {
  padding: 16px;
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid #e5e7eb;
  padding: 16px 0;
  text-align: center;
  font-size: 0.8rem;
  color: #aaa;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  header h1 { font-size: 1.2rem; }
  .teams { font-size: 0.98rem; }
  .odds { gap: 10px; font-size: 0.83rem; }
  .extra { gap: 10px; font-size: 0.8rem; }
}
