/* ==========================================================================
   /football-today-live-scores-matches-predictions — the site's dark look for
   the fixtures and the analytics.

   Why a stylesheet and not new scripts
   ------------------------------------
   The matches are drawn by /static/football/football.js and the analytics
   cards by /static/football/stttvv.js, both as white, light-theme cards.
   Both script tags live inside a stored page block (football-today /
   today-s-football-predictions-betting-tip) and its translations, without a
   version, and static files are cached for a year. A rewritten script would
   reach returning visitors months late, next to this new stylesheet. So the
   scripts are left exactly as they are and their markup is restyled here,
   scoped to #leagues and #app-31, the two containers they draw into.

   Some of that markup carries Tailwind utilities, and an inline <style> in
   the template sets a few rules with !important (.chip, .card:hover,
   .section-title:before). Overriding those is the only reason !important
   appears below; every such rule is scoped to #leagues.

   New classes for the toolbar and the analytics header end in -36.
   ========================================================================== */

.fb-wrap-36,
#app-31 {
    --fb-purple-36: #a948f8;
    --fb-teal-36: #22e2b6;
    --fb-ink-36: #f5f3ff;
    --fb-text-36: #d6d4de;
    --fb-muted-36: #a3a1ae;
    --fb-faint-36: #77748a;
    --fb-line-36: rgba(255, 255, 255, 0.08);
    --fb-line-strong-36: rgba(255, 255, 255, 0.14);
    --fb-surface-36: linear-gradient(180deg, #1c1a22, #141218);
    --fb-grad-36: linear-gradient(90deg, #a948f8, #22e2b6);
    --fb-ease-36: cubic-bezier(.22, 1, .36, 1);
    font-family: 'Roboto', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* ==========================================================================
   1. Toolbar: the day picker and the filters
   ========================================================================== */

.fb-tools-36 {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--fb-line-36);
    background:
        radial-gradient(70% 120% at 0% 0%, rgba(169, 72, 248, 0.1), transparent 60%),
        rgba(255, 255, 255, 0.02);
}

.fb-day-36 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fb-nav-36 {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--fb-line-strong-36);
    background: rgba(255, 255, 255, 0.04);
    color: var(--fb-ink-36);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.fb-nav-36:hover:not(:disabled) {
    border-color: rgba(169, 72, 248, 0.6);
    background: rgba(169, 72, 248, 0.18);
}

.fb-nav-36:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.fb-nav-36 svg {
    width: 18px;
    height: 18px;
}

[dir="rtl"] .fb-nav-36 svg {
    transform: scaleX(-1);
}

.fb-date-36 {
    min-width: 220px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(169, 72, 248, 0.35);
    background: rgba(169, 72, 248, 0.12);
    color: var(--fb-ink-36);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.fb-picker-36,
.fb-select-36,
.fb-search-36 input {
    color-scheme: dark;
}

.fb-picker-36 {
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--fb-line-strong-36);
    background: rgba(255, 255, 255, 0.04);
    color: var(--fb-ink-36);
    font: 500 14px/1 inherit;
}

.fb-updated-36 {
    color: var(--fb-faint-36);
    font-size: 12px;
}

.fb-filters-36 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.fb-search-36 {
    position: relative;
    display: flex;
    flex: 1 1 260px;
    align-items: center;
    min-width: 0;
}

.fb-search-36 svg {
    position: absolute;
    inset-inline-start: 13px;
    width: 17px;
    height: 17px;
    color: var(--fb-muted-36);
    pointer-events: none;
}

.fb-search-36 input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    padding-inline-start: 38px;
    border-radius: 999px;
    border: 1px solid var(--fb-line-strong-36);
    background: rgba(255, 255, 255, 0.04);
    color: var(--fb-ink-36);
    font: 500 14px/1 inherit;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.fb-search-36 input::placeholder {
    color: var(--fb-faint-36);
}

.fb-search-36 input:focus,
.fb-select-36:focus,
.fb-picker-36:focus {
    border-color: rgba(169, 72, 248, 0.65);
    box-shadow: 0 0 0 3px rgba(169, 72, 248, 0.18);
    outline: none;
}

.fb-select-36 {
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--fb-line-strong-36);
    background-color: #17151c;
    color: var(--fb-ink-36);
    font: 500 14px/1 inherit;
    cursor: pointer;
}

.fb-odds-36 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fb-muted-36);
    font-size: 13px;
    font-weight: 600;
}

.fb-toggles-36 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* A checkbox drawn as a pill; the real box stays for keyboards and readers. */
.fb-toggle-36 {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid var(--fb-line-strong-36);
    background: rgba(255, 255, 255, 0.03);
    color: var(--fb-muted-36);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.fb-toggle-36 input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.fb-toggle-36 svg {
    width: 15px;
    height: 15px;
}

.fb-dot-36 {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.fb-toggle-36:hover {
    color: #fff;
}

.fb-toggle-36:has(input:checked) {
    border-color: rgba(34, 226, 182, 0.5);
    background: rgba(34, 226, 182, 0.12);
    color: #fff;
}

.fb-toggle-36:has(input:checked) .fb-dot-36 {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.fb-toggle-36:has(input:checked) svg {
    color: var(--fb-teal-36);
    fill: currentColor;
}

.fb-toggle-36:has(input:focus-visible) {
    outline: 2px solid var(--fb-teal-36);
    outline-offset: 2px;
}

/* Hidden by the script's .hidden class; no display set here on purpose. */
.fb-empty-36 {
    padding: 48px 16px;
    border-radius: 18px;
    border: 1px dashed var(--fb-line-strong-36);
    color: var(--fb-muted-36);
    text-align: center;
}

/* ==========================================================================
   2. Matches (markup from football.js)
   ========================================================================== */

#leagues {
    color: var(--fb-text-36);
}

/* A league: its title with the site's gradient bar, and a match count. */
#leagues > section > div:first-child {
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--fb-line-36);
}

#leagues .section-title {
    padding-inline-start: 14px !important;
    color: var(--fb-ink-36);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.005em;
}

#leagues .section-title::before {
    width: 4px !important;
    background: var(--fb-grad-36) !important;
}

#leagues > section > div:first-child > span {
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--fb-muted-36);
    font-size: 12px;
    font-weight: 600;
}

#leagues .grid {
    gap: 14px;
}

/* --- The card ------------------------------------------------------------ */

#leagues article {
    position: relative;
    border-radius: 18px;
    border: 1px solid var(--fb-line-36);
    background:
        radial-gradient(90% 60% at 0% 0%, rgba(169, 72, 248, 0.1), transparent 60%),
        var(--fb-surface-36);
    box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.95);
    color: var(--fb-text-36);
}

#leagues article.card:hover {
    transform: translateY(-3px) !important;
    border-color: rgba(169, 72, 248, 0.4);
    box-shadow: 0 22px 44px -28px rgba(0, 0, 0, 0.95), 0 12px 30px -24px rgba(169, 72, 248, 0.5) !important;
}

/* A match in play stands out. */
#leagues article:has(.live-dot) {
    border-color: rgba(239, 68, 68, 0.45);
    background:
        radial-gradient(90% 60% at 0% 0%, rgba(239, 68, 68, 0.12), transparent 60%),
        var(--fb-surface-36);
}

#leagues article hr {
    border-color: var(--fb-line-36);
}

#leagues article time {
    color: var(--fb-muted-36);
    font-variant-numeric: tabular-nums;
}

/* --- Status (the chip in the card's top row) ----------------------------- */

#leagues article > div:first-child .chip {
    padding: 4px 10px !important;
    border-radius: 999px !important;
    border: 1px solid var(--fb-line-strong-36) !important;
    background: rgba(255, 255, 255, 0.05);
    color: var(--fb-text-36);
    font-size: 11.5px !important;
    font-weight: 800 !important;
    letter-spacing: .03em;
}

#leagues article > div:first-child .chip.bg-green-50 {
    border-color: rgba(34, 226, 182, 0.45) !important;
    background: rgba(34, 226, 182, 0.1);
    color: var(--fb-teal-36);
}

#leagues article > div:first-child .chip.bg-yellow-50 {
    padding-inline-start: 22px !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

#leagues article > div:first-child .chip.live-dot::before {
    left: 9px !important;
}

#leagues article > div:first-child .chip.bg-red-50 {
    border-color: rgba(251, 191, 36, 0.45) !important;
    background: rgba(251, 191, 36, 0.1);
    color: #fcd34d;
}

#leagues article > div:first-child .text-gray-500 {
    color: var(--fb-faint-36);
}

/* --- Favourite star ---------------------------------------------------------- */

#leagues .fav-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-color: var(--fb-line-strong-36);
    background: rgba(255, 255, 255, 0.04);
    color: var(--fb-faint-36);
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

#leagues .fav-btn:hover {
    color: #fbbf24;
}

#leagues .fav-btn[aria-pressed="true"] {
    border-color: rgba(251, 191, 36, 0.55);
    background: rgba(251, 191, 36, 0.14);
    color: #fbbf24;
}

#leagues .fav-btn svg {
    width: 17px;
    height: 17px;
}

/* --- Scoreboard ---------------------------------------------------------------- */

#leagues article .mt-4 > div {
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--fb-line-36);
    background: rgba(0, 0, 0, 0.22);
}

#leagues article .mt-4 .text-gray-900 {
    color: var(--fb-ink-36);
}

#leagues article .mt-4 .font-semibold {
    font-size: 14.5px;
    font-weight: 700;
}

/* Crests are drawn for a light page; a white disc keeps their dark parts. */
#leagues article .mt-4 img {
    width: 34px;
    height: 34px;
    padding: 3px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.6);
}

#leagues article .mt-4 .tnum {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: .02em;
}

#leagues article .mt-4 .text-gray-400 {
    color: var(--fb-faint-36);
}

/* --- Odds ------------------------------------------------------------------------ */

#leagues article .grid {
    gap: 8px;
}

#leagues article .space-x-2 {
    gap: 6px;
}

/* The chips wrap; Tailwind's space-x margin would indent every wrapped row. */
#leagues article .space-x-2 > * {
    margin: 0 !important;
}

#leagues article .grid .chip {
    padding: 4px 9px !important;
    border-radius: 9px !important;
    border: 1px solid var(--fb-line-36) !important;
    background: rgba(255, 255, 255, 0.04);
    color: var(--fb-muted-36);
    font-size: 12px !important;
    font-weight: 600 !important;
    font-variant-numeric: tabular-nums;
}

#leagues article .grid .chip strong {
    color: var(--fb-ink-36);
    font-weight: 800;
}

#leagues article .grid .chip > span {
    color: var(--fb-faint-36);
}

/* The total line, tinted by how many goals the market expects. */
#leagues article .grid .chip.bg-blue-50 {
    border-color: rgba(96, 165, 250, 0.45) !important;
    background: rgba(96, 165, 250, 0.1);
    color: #93c5fd;
}

#leagues article .grid .chip.bg-indigo-50 {
    border-color: rgba(169, 72, 248, 0.45) !important;
    background: rgba(169, 72, 248, 0.12);
    color: #d8b4fe;
}

#leagues article .grid .chip.bg-yellow-50 {
    border-color: rgba(250, 204, 21, 0.45) !important;
    background: rgba(250, 204, 21, 0.1);
    color: #fde68a;
}

#leagues article .grid .chip.bg-red-50 {
    border-color: rgba(248, 113, 113, 0.45) !important;
    background: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
}

#leagues article .text-xs.text-gray-500 {
    color: var(--fb-faint-36);
}

/* --- While loading, and if loading fails ------------------------------------ */

#leagues article.bg-white:not(.card) .bg-gray-100,
#leagues > section > .bg-gray-800 {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: fb-shimmer-36 1.4s linear infinite;
}

@keyframes fb-shimmer-36 {
    to { background-position: -200% 0; }
}

#leagues > .text-red-400 {
    padding: 32px 16px;
    border-radius: 18px;
    border: 1px dashed rgba(248, 113, 113, 0.4);
}

/* ==========================================================================
   3. Analytics header (template)
   ========================================================================== */

.fb-an-head-36 {
    margin-bottom: 20px;
}

.fb-an-title-36 {
    position: relative;
    margin: 0 0 14px;
    padding-bottom: 10px;
    color: var(--fb-ink-36);
    font-size: clamp(22px, 1.2rem + 1vw, 30px);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.fb-an-title-36::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 52px;
    height: 3px;
    border-radius: 3px;
    background: var(--fb-grad-36);
}

.fb-an-title-36 span {
    color: var(--fb-faint-36);
}

.fb-an-note-36 {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--fb-line-36);
    border-inline-start: 3px solid var(--fb-purple-36);
    background: rgba(255, 255, 255, 0.03);
    color: var(--fb-text-36);
    font-size: 14px;
    line-height: 1.6;
}

.fb-an-note-36 p {
    margin: 0;
}

/* Shown by the script once the data says which dates it covers. */
.fb-an-range-36 {
    margin-top: 10px;
    color: var(--fb-muted-36);
    font-size: 13px;
    font-weight: 600;
}

.fb-an-bar-36 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: var(--fb-faint-36);
    font-size: 12px;
}

.fb-an-status-36 {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--fb-line-strong-36);
    background: rgba(255, 255, 255, 0.04);
    color: var(--fb-muted-36);
    font-weight: 600;
}

.fb-an-updated-36 {
    margin-inline-start: auto;
}

.fb-an-error-36 {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.08);
    color: #fca5a5;
}

/* ==========================================================================
   4. Analytics cards (markup from stttvv.js, its own -31 classes)
   ========================================================================== */

#app-31 .btn-31 {
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(169, 72, 248, 0.45);
    background: rgba(169, 72, 248, 0.14);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

#app-31 .btn-31:hover {
    background: rgba(169, 72, 248, 0.28);
    transform: translateY(-1px);
    box-shadow: none;
}

#app-31 #cards-31 {
    gap: 16px;
}

#app-31 .card-31 {
    border-radius: 18px;
    border: 1px solid var(--fb-line-36);
    background: var(--fb-surface-36);
    box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.95);
    color: var(--fb-text-36);
    overflow: hidden;
}

#app-31 .header-31 {
    border-bottom: 1px solid var(--fb-line-36);
    color: var(--fb-ink-36);
}

#app-31 .header-31 h3 {
    color: var(--fb-ink-36);
}

#app-31 .header-31 img {
    border-radius: 8px;
}

/* The header moods, toned for a dark card: a tint, not a light wash. */
#app-31 .flame-31 { background: linear-gradient(90deg, rgba(249, 115, 22, 0.16), transparent 70%); box-shadow: none; }
#app-31 .crack-31 { background: linear-gradient(90deg, rgba(239, 68, 68, 0.14), transparent 70%); }
#app-31 .wave-31 { background: linear-gradient(90deg, rgba(34, 211, 238, 0.14), transparent 70%); }
#app-31 .sparkle-31 { background: linear-gradient(90deg, rgba(169, 72, 248, 0.18), transparent 70%); }
#app-31 .frost-31 { background: linear-gradient(90deg, rgba(96, 165, 250, 0.16), transparent 70%); }
#app-31 .ripple-31 { background: linear-gradient(90deg, rgba(248, 113, 113, 0.14), transparent 70%); }

#app-31 .header-31::before,
#app-31 .header-31::after {
    opacity: .35;
}

#app-31 .chip-31 {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--fb-line-strong-36);
    background: rgba(255, 255, 255, 0.04);
    color: var(--fb-muted-36);
    font-size: 11.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

#app-31 .header-31 .chip-31 {
    border-color: rgba(169, 72, 248, 0.45);
    background: rgba(169, 72, 248, 0.14);
    color: #e9d5ff;
}

#app-31 .gd-pos-31 {
    border-color: rgba(34, 226, 182, 0.45);
    color: var(--fb-teal-36);
}

#app-31 .gd-neg-31 {
    border-color: rgba(248, 113, 113, 0.45);
    color: #fca5a5;
}

#app-31 .row-31 {
    border-bottom: 1px solid var(--fb-line-36);
}

#app-31 .row-31:last-child {
    border-bottom: 0;
}

#app-31 .row-31 .text-gray-800 {
    color: var(--fb-ink-36);
}

#app-31 .row-31 .text-gray-400,
#app-31 .row-31 .text-gray-500,
#app-31 .card-31 .text-gray-500 {
    color: var(--fb-faint-36);
}

/* Crests drawn for a light page keep their dark parts on a white disc. */
#app-31 .logo-31 {
    flex: none;
    width: 34px;
    height: 34px;
    padding: 3px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
}

#app-31 .badge-sub-31 {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(34, 226, 182, 0.35);
    background: rgba(34, 226, 182, 0.08);
    color: #99f6e4;
    font-size: 11.5px;
    line-height: 1.3;
    white-space: normal;
}

#app-31 .tip-31 {
    margin: 4px 12px 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--fb-line-36);
    border-inline-start: 3px solid var(--fb-teal-36);
    background: rgba(255, 255, 255, 0.03);
    color: var(--fb-text-36);
    font-size: 13px;
    line-height: 1.55;
}

#app-31 .tip-31 strong {
    color: var(--fb-ink-36);
}

#app-31 .tip-31 ul {
    margin: 0;
    padding-inline-start: 18px;
    list-style: disc;
}

#app-31 .tip-31 li + li {
    margin-top: 4px;
}

#app-31 .tip-31 .tip-others-31 {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--fb-line-36);
}

#app-31 .tip-31 .tip-h-31 {
    margin-bottom: 4px;
    color: var(--fb-muted-36);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

#app-31 .skeleton-31 {
    background: rgba(255, 255, 255, 0.06);
}

#app-31 .skeleton-31::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

/* "No sections available" message the script can add. */
#app-31 #cards-31 > div {
    border-color: var(--fb-line-36);
    background: rgba(255, 255, 255, 0.03);
    color: var(--fb-muted-36);
}

/* ==========================================================================
   5. Phones
   ========================================================================== */

@media (max-width: 639.98px) {
    .fb-tools-36 {
        padding: 12px;
        border-radius: 16px;
    }

    .fb-date-36 {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 14px;
    }

    /* The arrows step through the days; the calendar field is a desktop
       extra, as it was. */
    .fb-picker-36 {
        display: none;
    }

    .fb-updated-36 {
        flex-basis: 100%;
        text-align: center;
    }

    .fb-search-36 {
        flex-basis: 100%;
    }

    /* Status and odds share one row. */
    .fb-filters-36 > .fb-select-36,
    .fb-odds-36 {
        flex: 1 1 0;
        min-width: 0;
    }

    .fb-odds-36 .fb-select-36 {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }

    .fb-toggles-36 {
        flex-basis: 100%;
    }

    .fb-toggle-36 {
        flex: 1 1 auto;
        justify-content: center;
        padding: 0 10px;
        font-size: 12px;
    }

    #leagues article .mt-4 > div {
        padding: 10px 8px;
    }

    #leagues article .mt-4 .font-semibold {
        font-size: 13px;
    }

    #leagues article .mt-4 img {
        width: 28px;
        height: 28px;
    }

    #leagues article .mt-4 .tnum {
        font-size: 22px;
    }

    #app-31 .tip-31 {
        margin: 4px 10px 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #leagues *,
    #app-31 * {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
