/* CrickSumi v1 — dark premium theme. Mobile-first, system fonts, no CDNs. */
:root {
  --bg: #0b0f1a;
  --bg-soft: #0f1524;
  --card: #141b2d;
  --card-2: #1a2338;
  --border: #232d47;
  --text: #eef2fa;
  --muted: #9aa6c2;
  --red: #e63946;
  --green: #22c55e;
  --gold: #f5b942;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  line-height: 1.55;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header / Footer (shared markup) ---------- */
.site-header {
  background: rgba(11, 15, 26, .96);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.25rem; letter-spacing: .5px; }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); background: var(--card-2); }
.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 28px 0; color: var(--muted); font-size: .9rem; }
.site-footer .fine { font-size: .8rem; }

/* ---------- Typography / layout ---------- */
main { min-height: 60vh; }
h1 { font-size: 1.6rem; margin: 24px 0 8px; }
h2.section-title { font-size: 1.2rem; margin: 32px 0 14px; display: flex; align-items: center; gap: 10px; }
h3 { margin: 0 0 10px; font-size: 1.05rem; }
.sub { color: var(--muted); margin: 0 0 16px; }
a { color: #7aa7ff; }

/* ---------- Match cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px;
}
.match-card { display: block; text-decoration: none; color: inherit; transition: border-color .15s; }
a.match-card:hover { border-color: var(--red); }
.match-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; font-size: .82rem; color: var(--muted); }
.team-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 4px 0; }
.team-name { font-weight: 700; }
.team-name .short { display: inline-block; min-width: 42px; font-size: .75rem; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; margin-right: 8px; }
.team-score { font-weight: 800; font-variant-numeric: tabular-nums; }
.team-score .overs { font-weight: 400; color: var(--muted); font-size: .85rem; }
.status-line { color: var(--red); font-size: .88rem; font-weight: 600; margin-top: 8px; }
.result-line { color: var(--muted); font-size: .88rem; margin-top: 8px; }
.meta-line { color: var(--muted); font-size: .82rem; }

/* ---------- Live pulse ---------- */
.live-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-weight: 800; font-size: .8rem; letter-spacing: 1px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ---------- Scorecard tables ---------- */
.innings { margin-bottom: 20px; }
.innings-head { background: var(--card-2); padding: 10px 14px; border-radius: var(--radius) var(--radius) 0 0; font-weight: 800; border: 1px solid var(--border); border-bottom: none; }
table.score { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--card); }
table.score caption { text-align: left; padding: 8px 14px; color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
table.score th, table.score td { padding: 8px 10px; text-align: right; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
table.score th:first-child, table.score td:first-child { text-align: left; }
table.score th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; }
table.score td.batter { font-weight: 600; }
.howout { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.innings-foot { padding: 10px 14px; color: var(--muted); font-size: .85rem; border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); background: var(--bg-soft); }

/* ---------- Commentary ---------- */
.comm-list { list-style: none; margin: 0; padding: 0; }
.comm-list li { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); margin-bottom: 8px; }
.comm-over { font-weight: 800; color: var(--gold); font-size: .85rem; margin-right: 10px; font-variant-numeric: tabular-nums; }
.comm-tag { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 20px; margin-right: 8px; letter-spacing: .5px; }
.comm-tag.FOUR, .comm-tag.SIX { background: rgba(34,197,94,.15); color: var(--green); border: 1px solid var(--green); }
.comm-tag.WICKET { background: rgba(230,57,70,.15); color: var(--red); border: 1px solid var(--red); }
.comm-tag.MAIDEN { background: rgba(122,167,255,.12); color: #7aa7ff; border: 1px solid #7aa7ff; }

/* ---------- Series page ---------- */
.points-table th:first-child, .points-table td:first-child { text-align: left; }
.fixture-list { list-style: none; margin: 10px 0 0; padding: 0; }
.fixture-list li { margin-bottom: 6px; }
.fixture-list a { color: var(--text); text-decoration: none; }
.fixture-list a:hover { color: var(--red); }

/* ---------- FAQ ---------- */
.faq { margin-top: 40px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 14px 16px; margin-bottom: 10px; }
.faq-item h3 { font-size: 1rem; margin-bottom: 6px; }
.faq-item p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ---------- States ---------- */
.empty { color: var(--muted); padding: 20px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }
.error { color: var(--red); padding: 16px; border: 1px solid var(--red); border-radius: var(--radius); background: rgba(230,57,70,.08); }
.loading { color: var(--muted); padding: 20px; text-align: center; }
.btn { display: inline-block; background: var(--red); color: #fff; text-decoration: none; font-weight: 700; padding: 10px 20px; border-radius: 10px; }
.btn:hover { filter: brightness(1.1); }
noscript .noscript-note { background: var(--gold); color: #111; padding: 12px 16px; border-radius: var(--radius); margin: 20px 0; }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  h1 { font-size: 2rem; }
  .cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .cards-2 .card { margin-bottom: 0; }
}
