/* EveryScore - premium dark sports theme (working brand name in config/brand.json) */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Header */
.site-header { background: var(--panel2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 1.25rem; letter-spacing: .2px; }
.brand:hover { text-decoration: none; }
.brand-mark { background: var(--accent); color: #141414; border-radius: 8px; padding: 3px 8px; font-size: .95rem; font-weight: 600; }
.main-nav { display: flex; gap: 16px; margin-left: auto; }
.main-nav a { color: var(--text); font-weight: 600; font-size: .98rem; }
.main-nav a:hover { color: var(--accent); text-decoration: none; }
.lang-switch { display: flex; gap: 4px; }
.lang-link { color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: .8rem; font-weight: 700; }
.lang-link.active { color: #141414; background: var(--accent); border-color: var(--accent); }
.lang-link:hover { text-decoration: none; }
.sport-strip { border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.sport-strip::-webkit-scrollbar { display: none; }
.sport-strip-inner { max-width: 1180px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 8px; white-space: nowrap; }
.sport-link { color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 600; }
.sport-link.active { color: #141414; background: var(--accent); border-color: var(--accent); }
.sport-link:hover { text-decoration: none; color: var(--accent); }
.sport-link.active:hover { color: #141414; }

/* Layout */
.page { max-width: 1180px; margin: 0 auto; padding: 18px 16px 40px; }
.layout-grid { display: grid; grid-template-columns: 1fr; gap: 8px 28px; }
@media (min-width: 960px) { .layout-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
.page-title { font-size: 1.7rem; margin: 6px 0 4px; font-weight: 600; }
.page-sub { color: var(--muted); margin: 0 0 8px; }
.section-title { font-size: 1.12rem; font-weight: 600; margin: 26px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--line); display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); display: inline-block; }
.empty { color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 14px; }
.more-link { margin: 10px 0 0; font-weight: 700; }

/* Ads */
.ad { border-radius: 12px; margin: 14px 0; overflow: hidden; background: var(--ad-bg, var(--panel)); color: var(--ad-fg, var(--text)); border: 1px solid var(--line); }
.ad-label { display: block; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; opacity: .65; padding: 6px 12px 0; }
.ad-body { display: flex; flex-direction: column; gap: 2px; padding: 4px 14px 12px; color: inherit; }
.ad-body:hover { text-decoration: none; }
.ad-brand { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ad-accent, var(--accent)); }
.ad-headline { font-size: 1.12rem; font-weight: 600; line-height: 1.25; }
.ad-text { font-size: .88rem; opacity: .85; }
.ad-cta { margin-top: 6px; align-self: flex-start; background: var(--ad-accent, var(--accent)); color: #141414; font-weight: 600; font-size: .82rem; border-radius: 999px; padding: 5px 14px; }
.ad-sidebar .ad-headline { font-size: 1rem; }

/* Event rows */
.ev-list { display: flex; flex-direction: column; gap: 8px; }
.ev-row { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; color: var(--text); }
.ev-row:hover { border-color: var(--accent); text-decoration: none; }
.ev-league { font-size: .78rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.ev-league a { color: var(--muted); }
.ev-main { display: flex; align-items: center; gap: 10px; }
.ev-team { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.ev-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-home { justify-content: flex-end; text-align: right; flex-direction: row-reverse; }
.ev-away { justify-content: flex-start; }
.ev-score { font-weight: 600; font-size: 1.05rem; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; min-width: 74px; text-align: center; }
.ev-score.live { color: var(--live); border-color: var(--live); }
.ev-event-name { font-weight: 700; }
.ev-result { color: var(--muted); font-size: .9rem; }
.ev-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ev-date { color: var(--muted); font-size: .82rem; }
.badge { width: 26px; height: 26px; object-fit: contain; flex: none; }
.badge-sm { width: 20px; height: 20px; vertical-align: -5px; margin-right: 6px; }
.badge-lg { width: 54px; height: 54px; }
.badge-empty { display: inline-block; background: var(--panel2); border-radius: 50%; }

.chip { font-size: .75rem; font-weight: 600; border-radius: 999px; padding: 2px 10px; border: 1px solid var(--line); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.chip-live { color: #fff; background: rgba(255, 69, 69, .16); border-color: var(--live); color: var(--live); }
.chip-final { color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: inline-block; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }

/* League and team cards */
.league-grid, .team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.league-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.league-card:hover { border-color: var(--accent); text-decoration: none; }
.league-card-sport { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.league-card-name { font-weight: 700; }
.league-card-meta { color: var(--muted); font-size: .82rem; }
.team-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text); text-align: center; font-weight: 600; }
.team-card:hover { border-color: var(--accent); text-decoration: none; }
.team-card small { color: var(--muted); font-weight: 400; }
.region-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.region-chip { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: .9rem; }
.region-chip span { color: var(--accent); font-weight: 600; }
.region-chip:hover { text-decoration: none; border-color: var(--accent); }

/* League page */
.league-head { display: flex; gap: 16px; align-items: center; margin-top: 6px; }
.league-badge { width: 74px; height: 74px; object-fit: contain; }
.league-desc { color: var(--muted); max-width: 75ch; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
table.standings { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.standings th, table.standings td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.standings th { color: var(--muted); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
table.standings td.left, table.standings th.left { text-align: left; }
table.standings td.pts { font-weight: 600; color: var(--accent); }
.team-link { color: var(--text); font-weight: 600; display: inline-flex; align-items: center; }
.table-note { color: var(--muted); font-size: .82rem; margin: 8px 2px 0; }
.form-badges { display: inline-flex; gap: 3px; }
.fb { width: 18px; height: 18px; border-radius: 4px; font-size: .66rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; color: #10131a; }
.fb-w { background: var(--win); }
.fb-d { background: #9aa7ba; }
.fb-l { background: var(--live); color: #fff; }
@media (max-width: 640px) { .hide-sm { display: none !important; } }

/* Team page */
.team-banner { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 14px; }
.team-banner img { width: 100%; display: block; max-height: 240px; object-fit: cover; }
.fact-grid, .track-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.fact span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.fact strong { font-size: 1.05rem; }
.track-grid .fact strong { font-size: 1.5rem; color: var(--accent); }

/* Match page */
.match-head { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 16px; margin-top: 10px; }
.match-team { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text); font-weight: 700; text-align: center; }
.match-team:hover { text-decoration: none; color: var(--accent); }
.match-score { font-size: 2rem; font-weight: 600; text-align: center; }
.match-status { font-size: .85rem; color: var(--muted); font-weight: 600; margin-top: 4px; }
.match-venue { color: var(--muted); }
.timeline { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; }
.tl-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.tl-row:last-child { border-bottom: 0; }
.tl-min { font-weight: 600; color: var(--accent); min-width: 42px; }
.tl-type { color: var(--muted); min-width: 130px; font-size: .88rem; }
.tl-player { font-weight: 700; }
.tl-team { color: var(--muted); margin-left: auto; font-size: .88rem; }

/* Predictions */
.pred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pred-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.pred-league { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; color: var(--muted); font-weight: 700; }
.pred-league a { color: var(--muted); }
.pred-when { color: var(--muted); font-weight: 600; }
.pred-match { display: block; color: var(--text); font-weight: 600; font-size: 1.05rem; margin: 8px 0 12px; }
.pred-match .vs { color: var(--muted); font-weight: 600; font-size: .85rem; }
.pred-bars { display: flex; flex-direction: column; gap: 7px; }
.pred-bar { display: grid; grid-template-columns: 1fr 90px 40px; align-items: center; gap: 8px; font-size: .85rem; }
.pb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.pred-bar.picked .pb-label { color: var(--text); font-weight: 600; }
.pb-track { background: var(--panel2); border-radius: 999px; height: 8px; overflow: hidden; display: block; }
.pb-fill { display: block; height: 100%; background: var(--muted); border-radius: 999px; }
.pred-bar.picked .pb-fill { background: var(--accent); }
.pb-val { font-weight: 600; text-align: right; }
.pred-pick { margin-top: 12px; font-size: .92rem; }
.pred-pick strong { color: var(--accent); }
.pred-why { color: var(--muted); font-size: .86rem; margin: 8px 0 0; }
.pred-result { margin-top: 10px; font-weight: 700; }
.pred-result .hit { color: var(--win); }
.pred-result .miss { color: var(--live); }

/* Search and login */
.search-form { display: flex; gap: 8px; margin: 14px 0 6px; }
.search-form input { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 11px 14px; font-size: 1rem; }
.search-form button, .login-form button { background: var(--accent); color: #141414; border: 0; border-radius: 10px; font-weight: 600; padding: 11px 18px; cursor: pointer; }
.login-form { display: flex; flex-direction: column; gap: 12px; max-width: 360px; margin-top: 14px; }
.login-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; color: var(--muted); }
.login-form input { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 11px 14px; font-size: 1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--panel2); margin-top: 30px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 22px 16px 30px; }
.footer-brand { font-weight: 600; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); font-weight: 600; font-size: .9rem; }
