/* NVtips 2026 — modern stylesheet */
:root {
    --bg: #0f1115;
    --bg-elev: #161a22;
    --bg-elev-2: #1d222c;
    --border: #262c38;
    --text: #e7ecf3;
    --text-muted: #98a2b3;
    --text-dim: #6b7280;
    --accent: #2563eb;
    --accent-2: #0f766e;
    --home: #2563eb;
    --draw: #64748b;
    --away: #0f766e;
    --good: #16a34a;
    --bad: #dc2626;
    --warn: #b45309;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .18);
    --radius: 12px;
    --radius-sm: 8px;
    --gap: 16px;
    --maxw: 1280px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f7f8fb;
        --bg-elev: #ffffff;
        --bg-elev-2: #f1f3f8;
        --border: #e3e7ef;
        --text: #15202b;
        --text-muted: #4b5563;
        --text-dim: #6b7280;
        --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 8px 24px rgba(20, 30, 50, .07);
    }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; color: var(--text-muted); }
ul { padding-left: 1.1rem; color: var(--text-muted); }
code, kbd { background: var(--bg-elev-2); padding: 2px 6px; border-radius: 4px; font-size: .9em; }

/* Layout */
.nv-container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 24px 20px 64px;
}
.nv-hero {
    margin: 8px 0 24px;
}
.nv-hero h1 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    margin-bottom: 4px;
}
.nv-hero .nv-sub {
    color: var(--text-muted);
    margin: 0;
}

/* Toolbar */
.nv-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 12px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.nv-day-nav { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.nv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elev-2);
    color: var(--text);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, transform .05s;
}
.nv-btn:hover { background: var(--border); text-decoration: none; }
.nv-btn:active { transform: translateY(1px); }
.nv-btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border-color: transparent;
}
.nv-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
}
.nv-btn .nv-btn-sub {
    font-weight: 500;
    color: var(--text-dim);
    font-size: .78rem;
}
.nv-btn.active .nv-btn-sub { color: rgba(255,255,255,.85); }

.nv-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nv-controls .nv-control:first-child { flex: 1 1 260px; }
.nv-control {
    display: inline-flex;
    align-items: center;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    gap: 6px;
}
.nv-control input,
.nv-control select {
    background: transparent;
    border: none;
    color: var(--text);
    font: inherit;
    outline: none;
    min-width: 0;
}
.nv-control input[type="search"] { width: 100%; }
.nv-control input::placeholder { color: var(--text-dim); }
.nv-control svg { width: 16px; height: 16px; color: var(--text-dim); flex: none; }
.nv-date-control input { min-width: 132px; }

@media (max-width: 800px) {
    .nv-toolbar { grid-template-columns: 1fr; }
    .nv-controls { justify-content: stretch; }
    .nv-controls > * { flex: 1; }
}

/* Date title bar */
.nv-date-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 4px 12px;
    gap: 12px;
    flex-wrap: wrap;
}
.nv-date-title h2 { margin: 0; font-size: 1.1rem; }
.nv-count {
    color: var(--text-muted);
    font-size: .9rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    padding: 2px 10px;
    border-radius: 999px;
}

.nv-content-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.nv-side-menu {
    position: sticky;
    top: 16px;
    display: grid;
    gap: 10px;
}
.nv-side-menu .nv-day-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.nv-side-menu .nv-btn {
    width: 100%;
    justify-content: space-between;
}
.nv-results-panel { min-width: 0; }

.nv-ad-section {
    min-height: 110px;
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.nv-ad-section .adsbygoogle {
    width: 100%;
    min-height: 90px;
}

/* Matches table — semantic grid */
.nv-matches {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.nv-row-head, .nv-row {
    display: grid;
    grid-template-columns:
        60px           /* time */
        minmax(110px, 1.1fr)  /* league */
        minmax(180px, 2.2fr)  /* match */
        76px           /* 1X2 */
        minmax(150px, 1.3fr)  /* probability */
        120px          /* O/U 2.5 */
        96px           /* BTTS */
        86px;          /* result */
    gap: 8px;
    padding: 10px 14px;
    align-items: center;
}
.nv-row-head {
    background: var(--bg-elev-2);
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    position: static;
    z-index: 1;
}
.nv-row {
    border-bottom: 1px solid var(--border);
    cursor: default;
    transition: background .12s;
}
.nv-row:last-child { border-bottom: none; }
.nv-row:hover { background: var(--bg-elev-2); }

.nv-cell-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.nv-cell-league .nv-country { color: var(--text-dim); font-size: .78rem; }
.nv-cell-league .nv-league { font-size: .9rem; }
.nv-cell-match {
    display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.nv-team { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nv-team-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-vs { color: var(--text-dim); font-size: .7rem; padding: 0 4px; }

/* Tip pill */
.nv-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    font-size: .85rem;
    min-width: 36px;
}
.nv-tip .nv-odds { color: var(--text-muted); font-weight: 500; font-size: .78rem; }
.nv-tip.t-1 { color: var(--home); border-color: rgba(37,99,235,.35); }
.nv-tip.t-X { color: var(--draw); border-color: rgba(100,116,139,.4); }
.nv-tip.t-2 { color: var(--away); border-color: rgba(15,118,110,.35); }
.nv-tip.is-right { background: rgba(22,163,74,.13); border-color: rgba(22,163,74,.55); color: var(--good); }
.nv-tip.is-wrong { background: rgba(220,38,38,.12); border-color: rgba(220,38,38,.5); color: var(--bad); }

/* Probability bar */
.nv-pbar {
    --h: 26px;
    position: relative;
    display: block;
    height: var(--h);
    width: 100%;
    min-width: 0;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    font-size: .75rem;
    font-weight: 700;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
}
.nv-pfill {
    display: flex;
    align-items: stretch;
    height: 100%;
    width: 100%;
    gap: 1px;
    background: rgba(255, 255, 255, .15);
}
.nv-pseg {
    display: block;
    min-width: 0;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
    transition: filter .15s, opacity .15s;
}
.nv-pseg.s-1 { background: var(--home); }
.nv-pseg.s-X { background: var(--draw); }
.nv-pseg.s-2 { background: var(--away); }
.nv-pseg.s-empty { background: var(--bg-elev-2); color: var(--text-dim); }
.nv-pseg:hover { filter: brightness(1.1); }
.nv-plabels {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    pointer-events: none;
    padding: 0 4px;
}
.nv-plabels span {
    justify-self: center;
    color: #fff;
    line-height: 1;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .65), 0 0 1px rgba(0, 0, 0, .4);
}
.nv-pbar.is-empty .nv-plabels { grid-template-columns: 1fr; }
.nv-pbar.is-empty .nv-plabels span { color: var(--text-muted); text-shadow: none; }

/* Badge / meter cluster (BTTS / O-U) */
.nv-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.nv-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    white-space: nowrap;
}
.nv-badge.is-right { color: var(--good); background: rgba(22,163,74,.12); border-color: rgba(22,163,74,.42); }
.nv-badge.is-wrong { color: var(--bad); background: rgba(220,38,38,.1); border-color: rgba(220,38,38,.4); }

.nv-meter {
    display: grid;
    grid-template-rows: 8px auto;
    gap: 4px;
    width: 100%;
    min-width: 0;
    color: var(--text-muted);
    font-size: .7rem;
    font-weight: 700;
}
.nv-meter-track {
    position: relative;
    display: block;
    height: 8px;
    border-radius: 999px;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    overflow: hidden;
}
.nv-meter-fill {
    display: block;
    width: var(--value);
    height: 100%;
    background: linear-gradient(90deg, var(--draw), var(--accent-2));
}
.nv-meter-thumb {
    position: absolute;
    top: 50%;
    left: var(--value);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text);
    border: 1px solid var(--bg-elev);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .2);
}
.nv-meter-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
.nv-meter.is-right .nv-meter-fill { background: var(--good); }
.nv-meter.is-wrong .nv-meter-fill { background: var(--bad); }
.nv-meter.is-right .nv-meter-label { color: var(--good); }
.nv-meter.is-wrong .nv-meter-label { color: var(--bad); }

/* Result */
.nv-result {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: center;
    background: var(--bg-elev-2);
    border-radius: 6px;
    padding: 4px 8px;
    color: var(--text-muted);
}
.nv-result.has-score { color: var(--text); }

/* Responsive — collapse table into cards */
@media (max-width: 980px) {
    .nv-content-layout { display: block; }
    .nv-side-menu {
        display: block;
        position: static;
        margin-bottom: 12px;
    }
    .nv-side-menu .nv-day-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nv-side-menu .nv-btn {
        flex-direction: column;
        gap: 2px;
        justify-content: center;
        padding: 8px 6px;
    }
    .nv-side-menu .nv-calendar,
    .nv-side-menu .nv-cal-nav { display: none; }
    .nv-row-head { display: none; }
    .nv-row {
        grid-template-columns: minmax(56px, auto) repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "time league league"
            "match match match"
            "tip tip tip"
            "prob prob prob"
            "ou btts result";
        gap: 8px 10px;
        padding: 14px;
    }
    .nv-cell-time { grid-area: time; display: inline-flex; align-items: center; gap: 8px; }
    .nv-cell-time::after {
        content: none;
    }
    .nv-cell-league {
        grid-area: league;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: .82rem;
        color: var(--text-muted);
        min-width: 0;
        margin: 0;
    }
    .nv-cell-league .nv-country::after { content: ' · '; color: var(--text-dim); }
    .nv-cell-match { grid-area: match; font-size: 1rem; font-weight: 600; }
    .nv-cell-tip { grid-area: tip; }
    .nv-cell-prob { grid-area: prob; }
    .nv-cell-ou { grid-area: ou; }
    .nv-cell-btts { grid-area: btts; }
    .nv-cell-result { grid-area: result; }
    .nv-cell-tip,
    .nv-cell-prob,
    .nv-cell-ou,
    .nv-cell-btts,
    .nv-cell-result {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 30px;
    }
    .nv-cell-ou,
    .nv-cell-btts,
    .nv-cell-result {
        justify-content: center;
        min-width: 0;
    }
    .nv-cell-ou .nv-badge,
    .nv-cell-btts .nv-badge,
    .nv-cell-ou .nv-meter,
    .nv-cell-btts .nv-meter,
    .nv-cell-result .nv-result {
        max-width: 100%;
    }
    .nv-cell-tip::before,
    .nv-cell-prob::before,
    .nv-cell-ou::before,
    .nv-cell-btts::before,
    .nv-cell-result::before {
        color: var(--text-dim);
        font-size: .68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
    }
    .nv-cell-tip::before { content: '1X2'; }
    .nv-cell-prob::before { content: 'Probability'; }
    .nv-cell-ou::before { content: none; }
    .nv-cell-btts::before { content: none; }
    .nv-cell-result::before { content: 'FT'; }
    .nv-cell-prob {
        display: grid;
        grid-template-columns: 1fr;
        gap: 5px;
        align-items: stretch;
    }
    .nv-cell-prob::before { justify-self: start; }
}
@media (max-width: 480px) {
    .nv-container { padding: 16px 12px 48px; }
    .nv-team-name { font-size: .95rem; }
    .nv-date-control input { min-width: 0; width: 100%; }
}

/* Footer / static content */
.nv-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: .85rem;
}
.nv-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.nv-footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elev);
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.nv-footer-btn:hover {
    background: var(--bg-elev-2);
    border-color: var(--accent);
    color: var(--text);
    text-decoration: none;
}
.nv-footer-btn:active { transform: translateY(1px); }

@media (max-width: 480px) {
    .nv-footer-links { align-items: stretch; }
    .nv-footer-btn { flex: 1 1 100%; }
}

.nv-section {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-top: 24px;
}
.nv-section h2, .nv-section h3 { color: var(--text); }
.nv-section ul li { margin: 4px 0; }

/* Back-compat helpers used by legacy inline body text */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; } }
.col-6, .col-12-small { min-width: 0; }
.image.fit { display: block; margin: 12px 0; }
.image.fit img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

/* Calendar (compact) */
.nv-calendar {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
}
.nv-calendar h4 {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-dim);
    margin: 0 0 8px;
}
.nv-calendar table { width: 100%; border-collapse: collapse; }
.nv-calendar th { color: var(--text-dim); font-size: .7rem; padding: 4px; font-weight: 600; }
.nv-calendar td { text-align: center; padding: 0; }
.nv-calendar td a {
    display: block;
    padding: 6px 0;
    color: var(--text);
    border-radius: 6px;
    font-size: .82rem;
}
.nv-calendar td a:hover { background: var(--bg-elev-2); text-decoration: none; }
.nv-calendar td.today a { background: var(--accent); color: #fff; font-weight: 700; }
.nv-calendar td.selected a { outline: 2px solid var(--accent); }
.nv-calendar td.not-month { color: var(--text-dim); }
.nv-cal-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    font-size: .82rem;
}
.nv-cal-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elev);
    color: var(--text-muted);
    font-weight: 650;
    text-align: center;
    transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.nv-cal-nav a:hover {
    background: var(--bg-elev-2);
    color: var(--text);
    text-decoration: none;
}
.nv-cal-nav a:active { transform: translateY(1px); }

/* Empty state */
.nv-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.nv-empty .nv-empty-icon { font-size: 2.5rem; opacity: .4; margin-bottom: 8px; }

/* Hidden filter helper */
.is-hidden { display: none !important; }
