/* ==========================================================================
   Score Board — floodlit cricket scoreboard, adapted for matka results.
   Motion is disabled under prefers-reduced-motion at the bottom.
   ========================================================================== */

:root {
    --field: #06301f;
    --field2: #041b12;
    --board: #0a1424;
    --board2: #0f1d33;
    --line: rgba(255, 255, 255, .12);
    --text: #eaf2ec;
    --dim: #93a7a0;
    --led: #ffd54a;
    --led-dim: #6b5a17;
    --live: #ff4d4d;
    --run: #22c55e;
    --clay: #b4542a;
    --clay-2: #8a3b1b;
    --clay-3: #d97742;
    --wa: #25d366;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background:
        radial-gradient(90% 60% at 50% -10%, rgba(34, 197, 94, .16), transparent 60%),
        linear-gradient(180deg, var(--field2) 0%, #03150e 45%, var(--board) 100%);
    background-attachment: fixed;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--led); text-decoration: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------------------------------------------------------------- header */

.top {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    background: rgba(4, 21, 14, .86);
    border-bottom: 2px solid var(--led);
    backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; letter-spacing: .3px; }

/* Small stumps mark instead of a generic logo. */
.stumps { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; }
.stumps i { display: block; width: 3px; height: 100%; background: var(--led); border-radius: 2px; }
.stumps i:nth-child(2) { height: 88%; }

.tabs { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: 6px; color: var(--dim); font-size: 13px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; transition: background .2s, color .2s; }
.tabs a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.tabs a.active { background: var(--led); color: #241d00; }

/* ------------------------------------------------------------ main board */

.board {
    position: relative;
    margin: 18px auto 26px;
    max-width: 1080px;
    padding: 0 16px;
}

.board-in {
    position: relative;
    padding: 22px 20px 24px;
    background: linear-gradient(180deg, var(--board2), var(--board));
    border: 2px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
    overflow: hidden;
}

/* Scan line drifting across the board like a lit panel. */
.board-in::after {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 213, 74, .07), transparent);
    animation: scan 7s linear infinite;
    pointer-events: none;
}

@keyframes scan { to { left: 120%; } }

.board-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    background: var(--live);
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.live-tag i { width: 7px; height: 7px; background: #fff; border-radius: 50%; animation: blink 1.1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .2; } }

.board-date { margin-left: auto; color: var(--dim); font-size: 13px; font-weight: 600; }

.board-main { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }

.board-team { flex: 1 1 220px; min-width: 0; }
.board-team .label { color: var(--dim); font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.board-team .name { font-size: 27px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; word-break: break-word; }
.board-team .sub { color: var(--dim); font-size: 13px; font-weight: 600; }

/* ------------------------------------------------------- odometer digits */

.score { display: flex; align-items: center; gap: 6px; }

.odo {
    display: inline-block;
    height: 76px;
    padding: 0 4px;
    background: #050d06;
    border: 2px solid rgba(255, 213, 74, .35);
    border-radius: 8px;
    box-shadow: inset 0 0 22px rgba(255, 213, 74, .18);
    overflow: hidden;
    vertical-align: top;
}

/* The strip of 0-9 slides up to land on the right digit. */
.odo-strip {
    display: block;
    transform: translateY(0);
    animation: rollIn 1.5s cubic-bezier(.16, .84, .3, 1) forwards;
}

.odo-strip b {
    display: block;
    width: 46px;
    height: 76px;
    color: var(--led);
    font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
    font-size: 58px;
    font-weight: 700;
    line-height: 76px;
    text-align: center;
    text-shadow: 0 0 14px rgba(255, 213, 74, .8);
}

/* Spins through two full sets before settling on --d. */
@keyframes rollIn {
    from { transform: translateY(0); }
    to   { transform: translateY(calc(var(--d) * -76px - 1520px)); }
}

.score-wait {
    padding: 16px 24px;
    background: #050d06;
    border: 2px solid rgba(255, 77, 77, .5);
    border-radius: 8px;
    color: var(--live);
    font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 3px;
    text-shadow: 0 0 14px rgba(255, 77, 77, .7);
    animation: blink 1.4s ease-in-out infinite;
}

/* -------------------------------------------------------------- next bar */

.next-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.next-bar .k { color: var(--dim); font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.next-bar .v { font-size: 15px; font-weight: 700; }
.next-bar .cd { margin-left: auto; font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 20px; font-weight: 700; color: var(--led); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Side matka — numbers keep popping out of the pot
   ========================================================================== */

.side-pot {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 30;
    width: 118px;
    height: 170px;
    pointer-events: none;
}

.sp-pot { position: absolute; left: 50%; bottom: 0; width: 96px; height: 92px; margin-left: -48px; }

.sp-body {
    position: absolute;
    inset: 16px 0 0;
    background:
        radial-gradient(60% 45% at 32% 26%, rgba(255, 255, 255, .28), transparent 60%),
        linear-gradient(100deg, var(--clay-3), var(--clay) 45%, var(--clay-2));
    border-radius: 46% 46% 44% 44% / 34% 34% 58% 58%;
    box-shadow: inset -8px -6px 18px rgba(0, 0, 0, .45), 0 12px 22px rgba(0, 0, 0, .5);
    animation: potWobble 3.2s ease-in-out infinite;
}

@keyframes potWobble {
    0%, 100% { transform: rotate(-2deg); }
    50%      { transform: rotate(2deg); }
}

.sp-neck { position: absolute; top: 8px; left: 50%; width: 58px; height: 20px; margin-left: -29px; background: linear-gradient(100deg, var(--clay-3), var(--clay-2)); border-radius: 50% 50% 26% 26% / 46% 46% 22% 22%; }
.sp-mouth { position: absolute; top: 6px; left: 50%; width: 50px; height: 15px; margin-left: -25px; background: radial-gradient(60% 80% at 50% 40%, #170b05, #2c1509); border-radius: 50%; box-shadow: inset 0 4px 8px rgba(0, 0, 0, .85); }
.sp-band { position: absolute; left: 6px; right: 6px; top: 48px; height: 5px; background: linear-gradient(90deg, transparent, rgba(255, 213, 74, .8), transparent); }

/* Numbers drifting up out of the mouth, forever. */
.sp-num {
    position: absolute;
    left: 50%;
    bottom: 78px;
    width: 34px;
    height: 34px;
    margin-left: -17px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(60% 60% at 34% 28%, #fff, var(--led) 55%, #e0a800);
    border-radius: 50%;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .5);
    color: #3d2f00;
    font-size: 15px;
    font-weight: 800;
    opacity: 0;
    animation: numOut 4.2s ease-out infinite;
}

@keyframes numOut {
    0%   { transform: translate(0, 0) scale(.3) rotate(0deg); opacity: 0; }
    12%  { opacity: 1; }
    100% { transform: translate(var(--nx), -104px) scale(1) rotate(var(--nr)); opacity: 0; }
}

.sp-label { position: absolute; bottom: -2px; left: 0; right: 0; color: var(--dim); font-size: 10px; font-weight: 700; letter-spacing: .5px; text-align: center; }

/* Leave room for it on wide screens, hide it on small ones. */
@media (min-width: 1260px) { .wrap, .board { padding-left: 150px; } }
@media (max-width: 900px)  { .side-pot { display: none; } }

/* ==========================================================================
   Scorecard table
   ========================================================================== */

.card { margin-bottom: 26px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }

.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(255, 255, 255, .05); border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 15px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.card-head .hint { margin-left: auto; color: var(--dim); font-size: 12px; }

.sc-scroll { overflow-x: auto; }
.sc { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }

.sc thead th {
    padding: 10px 12px;
    background: rgba(0, 0, 0, .35);
    border-bottom: 1px solid var(--line);
    color: var(--dim);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.sc tbody td { padding: 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); vertical-align: middle; }
.sc tbody tr { transition: background .2s; }
.sc tbody tr:hover { background: rgba(255, 213, 74, .06); }
.sc tbody tr:last-child td { border-bottom: 0; }

/* Batsman-style name cell. */
.p-name { font-size: 19px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.p-sub { color: var(--dim); font-size: 12px; font-weight: 600; }

.num-cell { font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 19px; font-weight: 700; text-align: center; }
.num-prev { color: var(--text); }
.num-today { color: var(--led); text-shadow: 0 0 10px rgba(255, 213, 74, .55); }

.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .6px; white-space: nowrap; }
.status.out { background: rgba(34, 197, 94, .16); color: #7ee2a8; }
.status.bat { background: rgba(255, 213, 74, .16); color: var(--led); }
.status.bat i { width: 6px; height: 6px; background: var(--led); border-radius: 50%; animation: blink 1.1s ease-in-out infinite; }

/* Pending marker — a bat-and-ball rather than the word, repeated per row. */
.wait-ico { display: inline-flex; color: var(--led); animation: swing 2.2s ease-in-out infinite; transform-origin: 70% 30%; }
@keyframes swing { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }

.chart-link { color: var(--dim); font-size: 12px; font-weight: 700; }
.chart-link:hover { color: var(--led); }

/* -------------------------------------------------------- form (balls) */

.form-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.form-row:last-child { border-bottom: 0; }
.form-name { flex: 0 0 150px; font-size: 15px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.balls { display: flex; gap: 7px; flex-wrap: wrap; }

/* Each "ball" is one day's result, oldest to newest. */
.ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    animation: ballIn .45s cubic-bezier(.2, 1.4, .4, 1) forwards;
    animation-delay: calc(var(--b, 0) * 60ms);
}

@keyframes ballIn {
    from { transform: scale(.2) translateY(10px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

.ball.has { background: rgba(34, 197, 94, .18); border: 1px solid rgba(34, 197, 94, .5); color: #9df0bd; }
.ball.none { background: rgba(255, 255, 255, .04); border: 1px dashed var(--line); color: #5d6d68; }
.ball.today { background: rgba(255, 213, 74, .2); border: 1px solid var(--led); color: var(--led); box-shadow: 0 0 12px rgba(255, 213, 74, .4); }

/* ------------------------------------------------------------ commentary */

.comm { list-style: none; }
.comm li { display: flex; gap: 12px; padding: 11px 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 14px; }
.comm li:last-child { border-bottom: 0; }
.comm .when { flex: 0 0 96px; color: var(--dim); font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.comm .what b { color: var(--led); }

/* ---------------------------------------------------------------- panel */

.panel { padding: 24px 20px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 14px; text-align: center; }
.panel h3 { margin-bottom: 4px; font-size: 18px; font-weight: 800; letter-spacing: .8px; color: var(--led); }
.panel .rate { margin-bottom: 14px; color: var(--run); font-size: 13px; font-weight: 700; }
.panel-list { list-style: none; max-width: 360px; margin: 0 auto; }
.panel-list li { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-size: 14px; font-weight: 600; }
.panel-list li i { flex: 1; border-bottom: 1px dashed var(--line); }
.panel-list li span:last-child { color: var(--led); }
.panel .note { margin-top: 14px; color: var(--dim); font-size: 12px; }

.cta { display: inline-block; margin-top: 16px; padding: 12px 28px; background: var(--wa); border-radius: 6px; color: #fff; font-size: 15px; font-weight: 800; transition: transform .2s ease; }
.cta:hover { transform: translateY(-2px); }
.cta.tg { background: #29a9eb; margin-left: 8px; }

/* ------------------------------------------------------------------ faq */

.faq-item { margin-bottom: 8px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; background: none; border: 0; color: var(--text); font-family: inherit; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
.faq-q:hover { background: rgba(255, 255, 255, .05); }
.faq-ico { color: var(--led); font-size: 20px; font-style: normal; transition: transform .3s ease; }
.faq-item.open .faq-ico { transform: rotate(135deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { padding: 0 16px 14px; color: var(--dim); font-size: 14px; }

/* ------------------------------------------------- Hindi info sections */

.info-wrap { max-width: 1080px; margin: 0 auto 44px; padding: 0 16px; }
.info-h { margin-bottom: 16px; font-size: 22px; font-weight: 800; text-align: center; }

.recent-scroll { overflow-x: auto; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 14px; }
.recent-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.recent-table th, .recent-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); text-align: center; white-space: nowrap; }
.recent-table thead th { background: rgba(0, 0, 0, .35); color: var(--led); font-size: 11px; letter-spacing: 1px; }
.recent-table tbody tr:hover { background: rgba(255, 213, 74, .06); }
.rt-date { color: var(--run); font-weight: 800; }
.rt-dash { color: #5d6d68; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 20px 0; }
.step { padding: 18px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 12px; text-align: center; transition: transform .25s ease, border-color .25s ease; }
.step:hover { transform: translateY(-4px); border-color: rgba(255, 213, 74, .5); }
.step-ico { display: block; font-size: 26px; }
.step b { display: block; margin: 6px 0 3px; font-size: 15px; color: var(--led); }
.step span { color: var(--dim); font-size: 13px; }

.info-block { margin-bottom: 12px; padding: 20px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 14px; }
.info-block h3 { margin-bottom: 10px; font-size: 17px; font-weight: 800; color: var(--led); }
.info-block p { margin-bottom: 10px; color: var(--dim); font-size: 14px; }
.info-block p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- footer */

.footer { padding: 32px 16px; border-top: 2px solid var(--led); text-align: center; }
.footer-name { margin-bottom: 8px; font-size: 20px; font-weight: 800; color: var(--led); }
.footer p { max-width: 760px; margin: 0 auto 8px; color: var(--dim); font-size: 13px; word-break: break-word; }
.footer .legal { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; }

.fab { position: fixed; right: 18px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; background: var(--wa); border-radius: 50%; box-shadow: 0 8px 24px rgba(37, 211, 102, .45); color: #fff; }

/* ------------------------------------------------------------ chart page */

.chart-wrap { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 16px; padding: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 14px; }
.filters select, .filters input { padding: 10px 12px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-family: inherit; font-size: 14px; }
.btn { display: inline-block; padding: 10px 20px; background: var(--led); border: 0; border-radius: 8px; color: #241d00; font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.btn.ghost { background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--text); }

.table-scroll { overflow-x: auto; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 14px; }
.chart-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.chart-table th, .chart-table td { padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); text-align: center; white-space: nowrap; }
.chart-table thead th { background: rgba(0, 0, 0, .35); color: var(--led); font-size: 11px; letter-spacing: 1px; }
.chart-table .date-col { color: var(--run); font-weight: 800; }
.chart-table tbody tr:hover { background: rgba(255, 213, 74, .06); }

/* ----------------------------------------------------------- responsive */

@media (max-width: 640px) {
    .board-team .name { font-size: 21px; }
    .odo { height: 58px; }
    .odo-strip b { width: 34px; height: 58px; font-size: 42px; line-height: 58px; }
    @keyframes rollIn { from { transform: translateY(0); } to { transform: translateY(calc(var(--d) * -58px - 1160px)); } }
    .score-wait { padding: 12px 18px; font-size: 26px; }
    .form-name { flex: 0 0 100%; }
    .next-bar .cd { margin-left: 0; }
    .top { flex-wrap: wrap; }
    .tabs { width: 100%; margin-left: 0; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .ball { opacity: 1; }
    /* Without the roll the strip must already sit on the right digit. */
    .odo-strip { transform: translateY(calc(var(--d) * -76px)); }
    .sp-num { display: none; }
}
