:root {
  --ink: #102c27;
  --muted: #74847f;
  --line: #e6ece9;
  --paper: #f8faf8;
  --white: #ffffff;
  --green: #17483c;
  --green-2: #246653;
  --control-ink: #17483c;
  --score-ink: #17483c;
  --lime: #c6f05b;
  --orange: #ff754d;
  --cream: #fff8e9;
  --shadow: 0 18px 45px rgba(16, 44, 39, .08);
  --topbar-bg: rgba(248,250,248,.9);
  --nav-bg: rgba(255,255,255,.88);
  --nav-border: rgba(255,255,255,.8);
  --control-hover: rgba(18,56,47,.08);
  --control-outline: rgba(18,56,47,.22);
  --quick-one: #eff8d8;
  --quick-two: #fff0e5;
  --quick-three: #e9f0ff;
  --table-head: #fcfdfc;
  --table-first: #fbfff0;
  --status-bg: #e7f7dd;
  --status-color: #458034;
  --status-upcoming-bg: #fff1de;
  --status-upcoming-color: #ae6a2d;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7f0ec;
  --muted: #a0b1ab;
  --line: #30463e;
  --paper: #101b17;
  --white: #1a2923;
  --green: #214d40;
  --green-2: #83bea8;
  --control-ink: #a8ddc7;
  --score-ink: #b8e5d4;
  --cream: #354238;
  --shadow: 0 18px 45px rgba(0,0,0,.28);
  --topbar-bg: rgba(16,27,23,.92);
  --nav-bg: rgba(26,41,35,.94);
  --nav-border: rgba(180,210,196,.18);
  --control-hover: rgba(180,220,200,.1);
  --control-outline: rgba(180,220,200,.32);
  --quick-one: #2b3a27;
  --quick-two: #3d3028;
  --quick-three: #293346;
  --table-head: #202f29;
  --table-first: #293525;
  --status-bg: #2b432c;
  --status-color: #a8db83;
  --status-upcoming-bg: #49382a;
  --status-upcoming-color: #f0bd82;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; max-width: 1440px; margin: 0 auto; }
.topbar { height: 82px; padding: 0 6vw; display: flex; align-items: center; justify-content: space-between; background: var(--topbar-bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 24px "Space Grotesk", sans-serif; letter-spacing: -1.2px; }
.brand-dot { color: var(--orange); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px 11px 11px 3px; background: var(--green); transform: rotate(-8deg); }
.brand-mark:before, .brand-mark:after, .brand-mark span { content: ""; display: block; position: absolute; width: 3px; height: 18px; background: var(--lime); border-radius: 3px; transform: rotate(42deg); }
.brand-mark:before { transform: rotate(-42deg); }
.brand-mark:after { height: 10px; transform: rotate(90deg); }
.brand-mark span { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.language-control { display: flex; align-items: center; gap: 5px; padding: 0 9px; height: 36px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); color: var(--control-ink); }
.language-globe { font-size: 15px; line-height: 1; }
.language-control select { max-width: 76px; border: 0; outline: 0; color: var(--control-ink); background: transparent; font: 700 11px "DM Sans", sans-serif; cursor: pointer; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; background: transparent; position: relative; color: var(--control-ink); border-radius: 12px; cursor: pointer; touch-action: manipulation; }
.icon-button:hover, .icon-button:focus-visible { background: var(--control-hover); outline: 2px solid var(--control-outline); outline-offset: 2px; }
.bell-icon { width: 24px; height: 24px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }
.notification-dot { width: 7px; height: 7px; position: absolute; top: 7px; right: 6px; border-radius: 50%; background: var(--orange); border: 2px solid var(--paper); }
.notification-button[data-push-state="active"] .notification-dot { width: 9px; height: 9px; background: #20a45a; box-shadow: 0 0 0 2px var(--paper); }
.notification-button[aria-busy="true"] .bell-icon { animation: bell-pulse .8s ease-in-out infinite alternate; }
@keyframes bell-pulse { to { transform: scale(.86); opacity: .55; } }

.main-content { padding: 48px 6vw 120px; }
.realtime-status { position: fixed; right: 14px; bottom: 92px; z-index: 9; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--muted); box-shadow: var(--shadow); font-size: 11px; }
.realtime-status[data-state="connected"] { color: var(--status-color); }
.empty-state { padding: 20px 24px; margin: 0; color: var(--muted); }
.match-card-score { display: block; margin-top: 16px; color: var(--score-ink); font: 600 18px "Space Grotesk"; }
.eyebrow { color: var(--orange); font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; }
.page-heading { max-width: 740px; margin: 10px 0 8px; font: 600 clamp(38px, 5vw, 68px)/.98 "Space Grotesk", sans-serif; letter-spacing: -3px; }
.page-heading em { color: var(--green-2); font-style: normal; }
.page-subtitle { color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 520px; margin: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin: 50px 0 18px; }
.section-head h2 { margin: 0; font: 600 25px "Space Grotesk", sans-serif; letter-spacing: -.8px; }
.section-head a, .text-button { color: var(--green-2); background: transparent; font-size: 13px; font-weight: 700; }

.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 24px; align-items: stretch; }
.hero-card { min-height: 338px; padding: 34px; position: relative; overflow: hidden; color: white; border-radius: 27px; background: var(--green); box-shadow: var(--shadow); }
.hero-card:before { content: ""; width: 400px; height: 400px; position: absolute; right: -155px; bottom: -250px; border: 1px solid rgba(198,240,91,.45); border-radius: 50%; box-shadow: 0 0 0 32px rgba(198,240,91,.08), 0 0 0 64px rgba(198,240,91,.05); }
.hero-card:after { content: ""; width: 130px; height: 130px; position: absolute; top: -52px; right: 12%; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.hero-kicker { display: flex; align-items: center; gap: 8px; color: var(--lime); font-size: 12px; font-weight: 700; letter-spacing: .4px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(198,240,91,.12); }
.hero-card h2 { max-width: 550px; margin: 22px 0 10px; font: 600 clamp(30px, 4vw, 50px)/1.02 "Space Grotesk", sans-serif; letter-spacing: -2.5px; }
.hero-card p { margin: 0; color: #bad0c9; font-size: 14px; }
.match-hero { display: flex; align-items: center; gap: 24px; margin-top: 30px; position: relative; z-index: 1; }
.team-hero { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.team-badge { display: grid; place-items: center; width: 45px; height: 45px; color: var(--green); border-radius: 14px; background: var(--lime); font: 700 15px "Space Grotesk"; }
.team-badge.orange { background: var(--orange); color: white; }
.hero-vs { color: #83aa9e; font-size: 11px; letter-spacing: 1px; }
.hero-score { display: flex; align-items: center; gap: 16px; margin-top: 26px; position: relative; z-index: 1; }
.hero-score strong { font: 600 25px "Space Grotesk"; }
.hero-score span { color: #91b1a7; font-size: 12px; }
.hero-score .live-odds { color: #d7e5df; font-weight: 600; }
.watch-button { padding: 12px 17px; border-radius: 12px; color: var(--ink); background: var(--lime); font-weight: 700; font-size: 13px; }
.match-time-card { padding: 31px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 27px; background: var(--white); }
.match-time-card h3 { margin: 10px 0 4px; font: 600 26px "Space Grotesk"; letter-spacing: -1px; }
.match-time-card p { margin: 0; color: var(--muted); font-size: 13px; }
.countdown { display: flex; gap: 12px; margin-top: 26px; }
.countdown div { min-width: 54px; padding: 11px 7px; border-radius: 12px; background: var(--paper); text-align: center; }
.countdown b { display: block; font: 700 20px "Space Grotesk"; }
.countdown small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .8px; }
.venue-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.quick-card { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); transition: transform .2s, box-shadow .2s; }
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.quick-icon { width: 37px; height: 37px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 12px; background: var(--quick-one); color: var(--green); font-size: 19px; }
.quick-card:nth-child(2) .quick-icon { background: var(--quick-two); color: var(--orange); }
.quick-card:nth-child(3) .quick-icon { background: var(--quick-three); color: #5472c4; }
:root[data-theme="dark"] .quick-card:first-child .quick-icon { color: #d4f58a; }
.quick-card h3 { margin: 0 0 6px; font: 600 16px "Space Grotesk"; }
.quick-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 24px; }
.panel { border: 1px solid var(--line); border-radius: 23px; background: var(--white); overflow: hidden; }
.panel-title { padding: 22px 24px 14px; display: flex; justify-content: space-between; align-items: center; }
.panel-title h3 { margin: 0; font: 600 19px "Space Grotesk"; letter-spacing: -.5px; }
.panel-title span { color: var(--muted); font-size: 11px; }
.fixture { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 24px; border-top: 1px solid var(--line); }
.fixture-date { width: 55px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.fixture-teams { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.fixture-teams .team-badge { width: 30px; height: 30px; border-radius: 9px; font-size: 10px; }
.fixture-score { color: var(--score-ink); font: 600 14px "Space Grotesk"; }
.status { padding: 6px 9px; border-radius: 20px; background: var(--status-bg); color: var(--status-color); font-size: 10px; font-weight: 700; }
.status.upcoming { background: var(--status-upcoming-bg); color: var(--status-upcoming-color); }
.news-card { padding: 10px 24px 21px; }
.news-item { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.news-item:first-child { border-top: 0; }
.news-tag { flex: 0 0 37px; height: 37px; display: grid; place-items: center; border-radius: 12px; background: var(--green); color: var(--lime); font-size: 12px; font-weight: 700; }
.news-item h4 { margin: 0 0 4px; font-size: 13px; line-height: 1.4; }
.news-item p { margin: 0; color: var(--muted); font-size: 11px; }

.view-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 34px; }
.view-heading .page-heading { margin-bottom: 0; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { padding: 10px 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); color: var(--muted); font-size: 12px; font-weight: 700; }
.filter.active { color: var(--white); border-color: var(--green); background: var(--green); }
.match-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.match-card { padding: 24px; border: 1px solid var(--line); border-radius: 21px; background: var(--white); }
.match-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: var(--muted); font-size: 11px; }
.league-label { color: var(--orange); font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.match-card-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 9px; text-align: center; }
.match-card-team { display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; }
.match-card-team .team-badge { width: 51px; height: 51px; border-radius: 16px; }
.match-card-vs { color: var(--muted); font-size: 10px; }
.match-card-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.detail-button { color: var(--green-2); background: transparent; font-size: 11px; font-weight: 700; }

.table-wrap { border: 1px solid var(--line); border-radius: 22px; background: var(--white); overflow: auto; }
.standings { width: 100%; min-width: 650px; border-collapse: collapse; text-align: left; }
.standings th { padding: 17px 20px; color: var(--muted); background: var(--table-head); font-size: 10px; text-transform: uppercase; letter-spacing: .8px; }
.standings td { padding: 18px 20px; border-top: 1px solid var(--line); font-size: 13px; }
.standings tr:first-child td { background: var(--table-first); }
.standings td:first-child { width: 65px; color: var(--muted); font-weight: 700; }
.standing-team { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.standing-team .team-badge { width: 32px; height: 32px; border-radius: 10px; font-size: 10px; }
.form-dots { display: flex; gap: 4px; }
.form-dots i { width: 6px; height: 6px; display: block; border-radius: 50%; background: var(--lime); }
.form-dots i.loss { background: #ffb6a2; }
.table-note { color: var(--muted); font-size: 11px; margin-top: 14px; }

.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.game-board { padding: 34px; color: white; border-radius: 27px; background: var(--green); position: relative; overflow: hidden; }
.game-board:after { content: ""; position: absolute; width: 360px; height: 360px; right: -160px; bottom: -225px; border-radius: 50%; border: 1px solid rgba(198,240,91,.3); box-shadow: 0 0 0 28px rgba(198,240,91,.08); }
.game-board h2 { position: relative; z-index: 1; max-width: 400px; margin: 12px 0 6px; font: 600 35px/1.05 "Space Grotesk"; letter-spacing: -1.5px; }
.game-board > p { color: #a9c7be; font-size: 13px; }
.score-strip { display: flex; align-items: end; gap: 27px; margin: 30px 0; position: relative; z-index: 1; }
.score-strip strong { display: block; font: 600 48px/.9 "Space Grotesk"; color: var(--lime); }
.score-strip span { display: block; color: #a9c7be; font-size: 11px; margin-top: 6px; }
.balls { display: flex; gap: 7px; margin: 20px 0 29px; position: relative; z-index: 1; }
.ball { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); color: #9cbbb1; font-size: 10px; }
.ball.active { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.ball.wicket { color: white; background: var(--orange); border-color: var(--orange); }
.shot-label { color: #a9c7be; font-size: 11px; position: relative; z-index: 1; }
.shot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 10px; position: relative; z-index: 1; }
.shot-button { padding: 14px 6px; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; color: white; background: rgba(255,255,255,.08); font-size: 12px; font-weight: 700; transition: background .2s; }
.shot-button:hover { background: rgba(255,255,255,.18); }
.shot-button:disabled { opacity: .45; cursor: not-allowed; }
.leader-card { padding: 25px; border-radius: 23px; border: 1px solid var(--line); background: var(--white); }
.leader-card h3 { margin: 0 0 20px; font: 600 19px "Space Grotesk"; }
.leader-person { display: flex; align-items: center; gap: 13px; padding: 14px 0; border-top: 1px solid var(--line); }
.leader-number { color: var(--muted); font: 700 11px "Space Grotesk"; }
.leader-avatar { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 12px; background: var(--cream); color: #ae6a2d; font-size: 12px; font-weight: 700; }
.leader-person h4 { margin: 0 0 3px; font-size: 13px; }
.leader-person p { margin: 0; color: var(--muted); font-size: 11px; }
.leader-runs { margin-left: auto; font: 600 16px "Space Grotesk"; }
.leader-runs small { display: block; color: var(--muted); font: 400 10px "DM Sans"; text-align: right; }

.bottom-nav { display: flex; justify-content: center; gap: 10px; width: fit-content; padding: 10px 12px; position: fixed; bottom: 22px; left: 50%; z-index: 20; transform: translateX(-50%); border: 1px solid var(--nav-border); border-radius: 18px; background: var(--nav-bg); box-shadow: 0 12px 40px rgba(16,44,39,.15); backdrop-filter: blur(18px); }
.nav-item { min-width: 73px; padding: 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; border-radius: 12px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 700; }
.nav-icon { font-size: 19px; line-height: 1; }
.nav-item.active { color: var(--ink); background: var(--lime); }
.toast { position: fixed; left: 50%; bottom: 106px; z-index: 30; padding: 12px 18px; color: white; background: var(--ink); border-radius: 12px; font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
[dir="rtl"] .main-content { text-align: right; }
[dir="rtl"] .section-head, [dir="rtl"] .panel-title, [dir="rtl"] .fixture, [dir="rtl"] .match-card-top, [dir="rtl"] .match-card-bottom, [dir="rtl"] .view-heading { direction: rtl; }
[dir="rtl"] .content-grid, [dir="rtl"] .hero-grid, [dir="rtl"] .game-layout { direction: rtl; }
[dir="rtl"] .match-card-teams, [dir="rtl"] .match-hero { direction: rtl; }
[dir="rtl"] .news-item, [dir="rtl"] .leader-person { direction: rtl; }
[dir="rtl"] .leader-runs { margin-left: 0; margin-right: auto; }
[dir="rtl"] .leader-runs small { text-align: left; }
[dir="rtl"] .fixture-teams, [dir="rtl"] .standing-team { direction: rtl; }
[dir="rtl"] .standings { text-align: right; }

@media (max-width: 800px) {
  .topbar { height: 70px; padding: 0 22px; }
  .main-content { padding: 34px 22px 120px; }
  .hero-grid, .content-grid, .game-layout { grid-template-columns: 1fr; }
  .hero-card { min-height: 310px; }
  .match-list { grid-template-columns: 1fr; }
  .section-head { margin-top: 38px; }
}
@media (max-width: 520px) {
  .topbar-actions { gap: 8px; }
  .language-control { height: 33px; padding: 0 7px; }
  .page-heading { letter-spacing: -2px; font-size: 43px; }
  .hero-card, .match-time-card, .game-board { padding: 25px; border-radius: 22px; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-card { display: grid; grid-template-columns: 45px 1fr; column-gap: 13px; align-items: center; padding: 16px; }
  .quick-icon { grid-row: span 2; margin: 0; }
  .quick-card h3 { align-self: end; }
  .quick-card p { align-self: start; }
  .fixture { padding: 15px 14px; }
  .fixture-date { width: 43px; }
  .fixture-teams { font-size: 11px; }
  .fixture-score { font-size: 12px; }
  .bottom-nav { bottom: 12px; width: calc(100% - 24px); justify-content: space-around; }
  .nav-item { flex: 1; }
  .view-heading { display: block; }
  .view-heading .filter-row { margin-top: 20px; }
  .match-card { padding: 19px; }
}
