/* ── RESET & BASE ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --green:   #1a8a3c; --green2:  #22a84a;
  --gold:    #f0b429; --gold2:   #ffd166;
  --dark:    #0d1b0f; --dark2:   #132418;
  --card-bg: #182c1c; --text:    #e8f5e9;
  --muted:   #7aad84; --radius:  14px;
  --shadow:  0 8px 32px rgba(0,0,0,.45);
}
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--dark); color: var(--text); min-height: 100vh; }
.hidden { display: none !important; }

/* ── LOGIN ────────────────────────────────────────────────────── */
.login-page { background: radial-gradient(ellipse at 60% 0%, #1e4d2a 0%, var(--dark) 65%); }
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.login-card { background: var(--card-bg); border: 1px solid #2a4d30; border-radius: 20px; padding: 48px 40px 40px; width: 100%; max-width: 400px; box-shadow: var(--shadow); position: relative; z-index: 1; }
.login-trophy { font-size: 52px; text-align: center; line-height: 1; margin-bottom: 12px; filter: drop-shadow(0 0 16px #f0b42988); }
.login-title { text-align: center; font-size: 1.9rem; font-weight: 800; letter-spacing: -.5px; color: var(--gold); }
.login-subtitle { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 32px; }
.field-group { margin-bottom: 18px; }
.field-group label { display: block; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.field-group input { width: 100%; padding: 12px 14px; background: #0f2014; border: 1.5px solid #2a4d30; border-radius: 10px; color: var(--text); font-size: 1rem; transition: border-color .2s; outline: none; }
.field-group input:focus { border-color: var(--green2); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
#toggle-pw { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1rem; opacity: .6; padding: 0; }
#toggle-pw:hover { opacity: 1; }
.login-error { color: #ff6b6b; font-size: .85rem; margin-bottom: 12px; text-align: center; }
.btn-login { width: 100%; padding: 13px; background: linear-gradient(135deg, var(--green), var(--green2)); border: none; border-radius: 10px; color: #fff; font-size: 1rem; font-weight: 700; cursor: pointer; transition: opacity .2s, transform .1s; margin-top: 4px; }
.btn-login:hover { opacity: .9; }
.btn-login:active { transform: scale(.98); }
.login-balls { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.ball { position: absolute; font-size: 2.5rem; opacity: .08; animation: float 12s ease-in-out infinite; }
.b1{top:10%;left:5%;animation-delay:0s;animation-duration:14s}
.b2{top:70%;left:80%;animation-delay:3s;animation-duration:11s}
.b3{top:40%;left:90%;animation-delay:6s;animation-duration:16s}
.b4{top:85%;left:15%;animation-delay:9s;animation-duration:13s}
@keyframes float { 0%,100%{transform:translateY(0) rotate(0deg)} 50%{transform:translateY(-30px) rotate(180deg)} }

/* ── TOPBAR ───────────────────────────────────────────────────── */
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: var(--dark2); border-bottom: 1px solid #1e3d23; padding: 0 20px; height: 58px; position: sticky; top: 0; z-index: 100; }
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-center { display: flex; align-items: center; justify-content: center; }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.topbar-trophy { font-size: 1.3rem; }
.topbar-title { font-weight: 800; font-size: .9rem; color: var(--text); white-space: nowrap; }
.nav-greeting { font-size: 1rem; font-weight: 700; color: var(--gold); white-space: nowrap; }
.nav-username { font-size: .8rem; color: var(--muted); }
.btn-logout { background: transparent; border: 1.5px solid #2a4d30; border-radius: 8px; color: var(--muted); padding: 5px 12px; font-size: .78rem; cursor: pointer; transition: color .2s, border-color .2s; }
.btn-logout:hover { color: var(--text); border-color: var(--green2); }

/* ── MAIN ─────────────────────────────────────────────────────── */
.dash-main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; display: flex; flex-direction: column; gap: 16px; }

/* ── DESKTOP NAV ──────────────────────────────────────────────── */
.desktop-nav {
  display: flex;
  align-items: center;
  background: var(--dark2);
  border-bottom: 2px solid #1e3d23;
  padding: 0 20px;
  gap: 2px;
}

.dnav-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  padding: 11px 16px 9px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  margin-bottom: -2px;
}
.dnav-btn:hover { color: var(--text); }
.dnav-btn.active { color: var(--green2); border-bottom-color: var(--green2); }

/* ── HERO BANNER ──────────────────────────────────────────────── */
.hero-banner {
  background: linear-gradient(135deg, #0f3d1c 0%, #1a6032 50%, #0d2e17 100%);
  border: 1px solid #2a5a34;
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-trophy-img { position: absolute; right: 24px; bottom: 0; height: 95%; max-height: 210px; object-fit: contain; filter: drop-shadow(0 0 24px rgba(240,180,41,.35)); pointer-events: none; user-select: none; }
.hero-content { padding-right: 180px; }
.hero-heading { font-size: clamp(1.4rem, 2.8vw, 2.2rem); font-weight: 900; letter-spacing: -.5px; color: var(--gold); text-shadow: 0 0 40px #f0b42955; margin-bottom: 6px; }
.hero-sub { color: var(--muted); font-size: .88rem; margin-bottom: 22px; line-height: 1.5; }
.hero-countdown { display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.35); border: 1px solid #2a5a34; border-radius: 10px; padding: 12px 18px; }
.cd-block { display: flex; flex-direction: column; align-items: center; min-width: 42px; }
.cd-block span { font-size: 1.5rem; font-weight: 800; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.cd-block small { font-size: .62rem; color: var(--muted); margin-top: 2px; text-transform: uppercase; }
.cd-sep { font-size: 1.2rem; color: var(--green2); font-weight: 700; margin-bottom: 16px; }

/* ── PANELS ROW ───────────────────────────────────────────────── */
.panels-row { display: grid; grid-template-columns: 1fr 1.2fr 1.4fr; gap: 16px; align-items: start; }

/* ── RANKING ──────────────────────────────────────────────────── */
.ranking-panel { background: var(--card-bg); border: 1px solid #2a4d30; border-radius: var(--radius); overflow: hidden; }
.ranking-header { padding: 14px 18px 12px; border-bottom: 1px solid #1e3d23; }
.ranking-title { font-size: 1rem; font-weight: 800; color: var(--text); }
.ranking-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ranking-table thead tr { background: #0f2014; }
.ranking-table th { padding: 9px 14px; text-align: left; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); white-space: nowrap; }
.ranking-table th:nth-child(1) { width: 60px; text-align: center; }
.ranking-table th:nth-child(3) { text-align: center; }
.ranking-table tbody tr { border-top: 1px solid #1a3020; transition: background .15s; }
.ranking-table tbody tr:hover { background: #132418; }
.ranking-table td { padding: 10px 14px; color: var(--text); }
.ranking-table td:nth-child(1) { text-align: center; font-weight: 800; font-size: .95rem; }
.ranking-table td:nth-child(3) { text-align: center; font-weight: 800; font-size: 1.05rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.rank-1 td:nth-child(1) { color: #ffd700; }
.rank-2 td:nth-child(1) { color: #c0c0c0; }
.rank-3 td:nth-child(1) { color: #cd7f32; }
.ranking-table tbody tr.is-me { background: #1a3520; }
.ranking-table tbody tr.is-me td:nth-child(2) { color: var(--gold2); font-weight: 700; }

/* ── SPECIAL PANEL ────────────────────────────────────────────── */
.special-panel { background: var(--card-bg); border: 1px solid #2a4d30; border-radius: var(--radius); overflow: hidden; }

.special-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 12px; border-bottom: 1px solid #1e3d23; }
.special-title { font-size: 1rem; font-weight: 800; color: var(--text); }

.btn-save-special { background: linear-gradient(135deg, var(--green), var(--green2)); border: none; border-radius: 8px; color: #fff; font-size: .78rem; font-weight: 700; padding: 6px 16px; cursor: pointer; transition: opacity .2s; }
.btn-save-special:hover { opacity: .85; }
.btn-save-special:disabled { opacity: .35; cursor: not-allowed; }

.special-saved-note { font-size: .75rem; color: var(--green2); text-align: right; padding: 4px 18px 0; }

.special-list { padding: 6px 0; }

.special-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid #1a3020;
}
.special-row:last-child { border-bottom: none; }

.special-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.special-label { font-size: .83rem; font-weight: 600; color: var(--text); }
.special-pts { font-size: .7rem; font-weight: 700; color: var(--gold); background: #1e3010; border: 1px solid #3a5a20; border-radius: 20px; padding: 2px 8px; white-space: nowrap; }

.special-input-wrap { display: flex; align-items: center; gap: 8px; }

.special-input {
  background: #0f2014;
  border: 1.5px solid #2a4d30;
  border-radius: 8px;
  color: var(--text);
  font-size: .85rem;
  padding: 6px 10px;
  outline: none;
  transition: border-color .2s;
  width: 130px;
}
.special-input.num { width: 70px; text-align: center; -moz-appearance: textfield; }
.special-input.num::-webkit-inner-spin-button { -webkit-appearance: none; }
.special-input:focus { border-color: var(--green2); }
.special-input:disabled { opacity: .4; cursor: not-allowed; background: #0a160c; }

.special-deadline { font-size: .68rem; font-weight: 600; white-space: nowrap; color: var(--muted); }
.special-deadline.open   { color: var(--green2); }
.special-deadline.soon   { color: var(--gold); }
.special-deadline.locked { color: #555; }

.special-locked-val { font-size: .82rem; font-weight: 600; color: var(--gold); padding: 4px 0; }

.special-row { grid-template-columns: 1fr; }
.special-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 18px; }

/* ── STATS LIVE PANEL ─────────────────────────────────────────── */
.stats-live-panel { background: var(--card-bg); border: 1px solid #2a4d30; border-radius: var(--radius); overflow: hidden; }

.stats-live-header { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 0; border-bottom: 1px solid #1e3d23; padding-bottom: 0; }
.stats-live-title { font-size: 1rem; font-weight: 800; color: var(--text); }

.stats-tabs { display: flex; gap: 0; }
.stab { background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted); font-size: .78rem; font-weight: 600; padding: 7px 14px; cursor: pointer; transition: color .15s, border-color .15s; white-space: nowrap; }
.stab.active { color: var(--green2); border-bottom-color: var(--green2); }
.stab:hover:not(.active) { color: var(--text); }

.stab-panel { padding: 0; }

.stats-loading { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; padding: 20px 16px; justify-content: center; }
.stats-error { background: #2a1010; border: 1px solid #6b2020; border-radius: 8px; margin: 10px 14px; padding: 8px 12px; font-size: .78rem; color: #ff8080; text-align: center; }

/* scorers table */
.stats-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.stats-table thead tr { background: #0f2014; }
.stats-table th { padding: 7px 10px; text-align: left; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stats-table th:nth-child(1), .stats-table th:nth-child(4), .stats-table th:nth-child(5) { text-align: center; width: 36px; }
.stats-table tbody tr { border-top: 1px solid #1a3020; transition: background .12s; }
.stats-table tbody tr:hover { background: #132418; }
.stats-table td { padding: 8px 10px; color: var(--text); }
.stats-table td:nth-child(1) { text-align: center; color: var(--muted); font-size: .75rem; font-weight: 700; }
.stats-table td:nth-child(4), .stats-table td:nth-child(5) { text-align: center; font-weight: 800; }
.stats-table td:nth-child(4) { color: var(--gold); }
.stats-table td:nth-child(5) { color: var(--green2); font-size: .78rem; }
.scorer-flag { width: 18px; height: auto; border-radius: 2px; vertical-align: middle; margin-right: 4px; }

/* standings */
.standings-groups { padding: 10px 14px; display: flex; flex-direction: column; gap: 14px; max-height: 420px; overflow-y: auto; }
.standings-groups::-webkit-scrollbar { width: 4px; }
.standings-groups::-webkit-scrollbar-track { background: transparent; }
.standings-groups::-webkit-scrollbar-thumb { background: #2a4d30; border-radius: 4px; }

.group-block {}
.group-name { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--green2); margin-bottom: 4px; }
.group-table { width: 100%; border-collapse: collapse; font-size: .75rem; }
.group-table th { padding: 4px 6px; text-align: center; font-size: .62rem; font-weight: 700; text-transform: uppercase; color: var(--muted); background: #0f2014; }
.group-table th:nth-child(2) { text-align: left; }
.group-table td { padding: 5px 6px; text-align: center; border-top: 1px solid #1a3020; color: var(--text); }
.group-table td:nth-child(2) { text-align: left; font-weight: 600; }
.group-table tbody tr:first-child td, .group-table tbody tr:nth-child(2) td { background: rgba(34,168,74,.06); }
.group-table .pts { font-weight: 800; color: var(--gold); }
.group-flag { width: 16px; height: auto; border-radius: 2px; vertical-align: middle; margin-right: 4px; }

/* ── MATCHES SECTION ──────────────────────────────────────────── */
.matches-section { background: var(--card-bg); border: 1px solid #2a4d30; border-radius: var(--radius); padding: 20px; }
.section-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.section-title { font-size: 1rem; font-weight: 800; color: var(--text); }
.match-tabs { display: flex; gap: 3px; background: #0f2014; border-radius: 8px; padding: 3px; }
.tab-btn { background: none; border: none; color: var(--muted); font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.tab-btn.active { background: var(--green); color: #fff; }
.tab-btn:hover:not(.active) { color: var(--text); }
.live-dot { display: flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 700; color: #ff4444; letter-spacing: .06em; margin-left: auto; }
.dot-pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff4444; animation: pulse-dot 1.2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.6)} }
.btn-refresh { background: none; border: 1.5px solid #2a4d30; border-radius: 8px; color: var(--muted); width: 30px; height: 30px; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color .2s, border-color .2s; }
.btn-refresh:hover { color: var(--text); border-color: var(--green2); }
.btn-refresh.spinning { animation: spin .6s linear; }
@keyframes spin { to { transform: rotate(360deg); } }
.matches-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; padding: 28px 0; justify-content: center; }
.spinner { width: 16px; height: 16px; border: 2px solid #2a4d30; border-top-color: var(--green2); border-radius: 50%; animation: spin .7s linear infinite; }
.matches-error { background: #2a1010; border: 1px solid #6b2020; border-radius: 10px; padding: 10px 14px; font-size: .82rem; color: #ff8080; margin-bottom: 10px; text-align: center; }
.matches-empty { text-align: center; color: var(--muted); font-size: .85rem; padding: 28px 0; }
.matches-update-note { font-size: .68rem; color: #4a7a54; text-align: right; margin-top: 10px; }
.matches-list { display: flex; flex-direction: column; gap: 10px; }

/* ── MATCH CARD ───────────────────────────────────────────────── */
.match-card { background: #0f2014; border: 1px solid #1e3d23; border-radius: 12px; overflow: hidden; transition: border-color .2s; }
.match-card:hover { border-color: #2a5a34; }
.match-card.is-live { border-color: #5a1a1a; background: #150f0f; }
.match-card.is-finished { opacity: .82; }
.match-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.match-team { display: flex; align-items: center; gap: 8px; }
.match-team.home { justify-content: flex-end; text-align: right; }
.match-team.away { justify-content: flex-start; text-align: left; }
.flag-img { width: 30px; height: auto; border-radius: 3px; display: block; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.flag-fallback { font-size: 1rem; }
.team-flag { display: flex; align-items: center; }
.team-name { font-size: .88rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.team-short { font-size: .65rem; color: var(--muted); }
.match-center { text-align: center; min-width: 80px; }
.match-group { display: inline-block; font-size: .6rem; font-weight: 600; background: #1e3d23; color: var(--green2); border-radius: 4px; padding: 1px 6px; margin-bottom: 3px; text-transform: uppercase; }
.match-score { font-size: 1.5rem; font-weight: 900; color: var(--gold); letter-spacing: 2px; font-variant-numeric: tabular-nums; line-height: 1; }
.match-score.no-score { color: var(--muted); font-size: .9rem; font-weight: 400; }
.match-status { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }
.match-status.live { color: #ff5555; }
.match-status.sched { color: var(--muted); }
.match-status.fin   { color: #4a7a54; }
.match-status.ht    { color: #f0b429; }
.match-minute { display: inline-block; background: #3a0f0f; color: #ff7777; font-size: .63rem; font-weight: 700; border-radius: 4px; padding: 1px 4px; margin-top: 2px; }
.match-date { font-size: .68rem; color: var(--muted); margin-top: 2px; }

/* typ bar */
.typ-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px 12px; border-top: 1px solid #1e3d23; flex-wrap: wrap; }
.typ-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.typ-inputs { display: flex; align-items: center; gap: 5px; }
.typ-score-input { width: 38px; height: 34px; background: #182c1c; border: 1.5px solid #2a4d30; border-radius: 8px; color: var(--gold); font-size: 1rem; font-weight: 800; text-align: center; outline: none; transition: border-color .2s; -moz-appearance: textfield; }
.typ-score-input::-webkit-inner-spin-button, .typ-score-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.typ-score-input:focus { border-color: var(--green2); }
.typ-score-input:disabled { opacity: .4; cursor: not-allowed; background: #0f1a10; }
.typ-sep { color: var(--muted); font-weight: 700; font-size: .9rem; }
.typ-save-btn { background: linear-gradient(135deg, var(--green), var(--green2)); border: none; border-radius: 7px; color: #fff; font-size: .72rem; font-weight: 700; padding: 6px 12px; cursor: pointer; transition: opacity .2s; white-space: nowrap; }
.typ-save-btn:hover { opacity: .85; }
.typ-save-btn:disabled { opacity: .3; cursor: not-allowed; }
.typ-save-btn.saved { background: linear-gradient(135deg, #1a5c2a, #22703a); }
.typ-deadline { font-size: .7rem; font-weight: 600; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.typ-deadline.open   { color: var(--green2); }
.typ-deadline.soon   { color: var(--gold); }
.typ-deadline.urgent { color: #ff8800; }
.typ-deadline.locked { color: #555; }
.typ-deadline.live-now { color: #ff5555; }
.typ-result { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.typ-result .correct { color: var(--green2); font-weight: 700; }
.typ-result .wrong   { color: #ff6b6b; }
.typ-result .none    { color: #555; font-style: italic; }

/* ── RESPONSIVE ───────────────────────────────────────────────── */
/* ── VIEW SYSTEM ──────────────────────────────────────────────── */
.view { display: block; }
.view.hidden { display: none; }

.view-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 100px;
}

.view-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 20px;
}

/* ── MOBILE NAV ───────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--dark2);
  border-top: 1px solid #1e3d23;
  z-index: 200;
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
}

.mnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--muted);
  padding: 4px 2px;
  cursor: pointer;
  transition: color .15s;
  min-width: 0;
}

.mnav-btn.active { color: var(--green2); }
.mnav-icon { font-size: 1.3rem; line-height: 1; }
.mnav-label { font-size: .58rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }

/* ── MOJE TYPY ────────────────────────────────────────────────── */
.moje-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.moje-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.moje-stat {
  background: var(--card-bg);
  border: 1px solid #2a4d30;
  border-radius: 10px;
  padding: 8px 16px;
  text-align: center;
  min-width: 80px;
}
.moje-stat-num  { display: block; font-size: 1.3rem; font-weight: 900; color: var(--gold); line-height: 1; }
.moje-stat-lbl  { display: block; font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }

.moje-tabs {
  display: flex;
  gap: 4px;
  background: #0f2014;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.moje-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.moje-tab.active { background: var(--green); color: #fff; }
.moje-tab:hover:not(.active) { color: var(--text); }

.moje-list { display: flex; flex-direction: column; gap: 10px; }

/* Karta meczu w "moje typy" */
.moje-card {
  background: var(--card-bg);
  border: 1px solid #2a4d30;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s;
}
.moje-card:hover { border-color: #2a5a34; }
.moje-card.finished { border-left: 4px solid transparent; }
.moje-card.pts-3    { border-left-color: var(--green2); }
.moje-card.pts-1    { border-left-color: var(--gold); }
.moje-card.pts-0    { border-left-color: #555; }
.moje-card.pts-miss { border-left-color: #ff4444; }
.moje-card.live     { border-color: #5a1a1a; background: #150f0f; }

.moje-match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 8px;
}

.moje-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 12px;
  border-top: 1px solid #1e3d23;
  gap: 10px;
  flex-wrap: wrap;
}

.moje-pred {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
}

.moje-pred-label { color: var(--muted); font-size: .7rem; font-weight: 600; text-transform: uppercase; }
.moje-pred-score { font-weight: 800; color: var(--gold); font-size: 1rem; font-variant-numeric: tabular-nums; }
.moje-pred-score.correct { color: var(--green2); }
.moje-pred-score.partial { color: var(--gold); }
.moje-pred-score.wrong   { color: #ff6b6b; }
.moje-pred-score.missing { color: #555; font-style: italic; font-weight: 400; font-size: .82rem; }

.moje-pts-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .82rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.moje-pts-badge.p3  { background: #0d2e15; color: var(--green2); border: 1px solid var(--green); }
.moje-pts-badge.p1  { background: #2a2000; color: var(--gold);   border: 1px solid #5a4400; }
.moje-pts-badge.p0  { background: #1a1a1a; color: #666;          border: 1px solid #333; }
.moje-pts-badge.pm  { background: #2a0f0f; color: #ff6666;        border: 1px solid #5a2020; }
.moje-pts-badge.pending { background: #0f2014; color: var(--muted); border: 1px solid #2a4d30; }

/* ── ALL TYPY VIEW ────────────────────────────────────────────── */
.all-typy-section { margin-bottom: 28px; }
.all-typy-subtitle { font-size: .95rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }

.all-match-block {
  background: var(--card-bg);
  border: 1px solid #2a4d30;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.all-match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #0f2014;
  border-bottom: 1px solid #1e3d23;
}

.all-match-name { font-size: .85rem; font-weight: 700; color: var(--text); }
.all-match-result { font-size: .85rem; font-weight: 900; color: var(--gold); }

.all-typy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1px;
  background: #1a3020;
}

.all-typ-cell {
  background: var(--card-bg);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.all-typ-user { font-size: .68rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.all-typ-score { font-size: 1rem; font-weight: 800; color: var(--gold); }
.all-typ-score.correct { color: var(--green2); }
.all-typ-score.partial { color: var(--gold); }
.all-typ-score.wrong   { color: #ff6b6b; }
.all-typ-score.empty   { color: #444; font-size: .8rem; font-style: italic; font-weight: 400; }

/* special typy all grid */
.all-special-block {
  background: var(--card-bg);
  border: 1px solid #2a4d30;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.all-special-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #0f2014;
  border-bottom: 1px solid #1e3d23;
}

.all-special-label { font-size: .85rem; font-weight: 700; color: var(--text); }
.all-special-pts { font-size: .7rem; font-weight: 700; color: var(--gold); background: #1e3010; border: 1px solid #3a5a20; border-radius: 20px; padding: 2px 8px; }

/* ── BRACKET ──────────────────────────────────────────────────── */
.bracket-container { display: flex; flex-direction: column; gap: 24px; }

.bracket-section { background: var(--card-bg); border: 1px solid #2a4d30; border-radius: var(--radius); overflow: hidden; }

.bracket-round-header {
  padding: 12px 16px;
  background: #0f2014;
  border-bottom: 1px solid #1e3d23;
  font-size: .85rem;
  font-weight: 800;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bracket-matches { display: flex; flex-direction: column; gap: 8px; padding: 12px; }

.bracket-match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  background: #0f2014;
  border: 1px solid #1e3d23;
  border-radius: 10px;
  padding: 10px 14px;
}

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

.bracket-team.home { justify-content: flex-end; text-align: right; }
.bracket-team.away { justify-content: flex-start; text-align: left; }
.bracket-team.tbd  { color: var(--muted); font-style: italic; }

.bracket-team-name { font-size: .82rem; font-weight: 700; color: var(--text); }
.bracket-team-name.winner { color: var(--green2); }

.bracket-score-box { text-align: center; min-width: 64px; }
.bracket-score { font-size: 1.1rem; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.bracket-score.no-score { font-size: .75rem; color: #444; font-weight: 400; }
.bracket-date { font-size: .62rem; color: var(--muted); margin-top: 2px; }

/* group stage in bracket */
.bracket-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  padding: 12px;
}

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .panels-row { grid-template-columns: 1fr 1fr; }
  .stats-live-panel { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  /* Pokaż mobile nav, ukryj desktop nav */
  .mobile-nav  { display: flex; }
  .desktop-nav { display: none; }

  /* Ukryj statystyki i specjalne na home mobile (są w zakładkach) */
  #view-home .stats-live-panel  { display: none; }
  #view-home .special-panel     { display: none; }

  /* Padding pod mobile nav */
  #view-home .dash-main { padding-bottom: 90px; }
  .view-content { padding-bottom: 100px; }

  /* ── HERO MOBILE ── */
  .hero-banner {
    padding: 16px 14px;
    min-height: unset;
    align-items: flex-start;
  }

  /* Puchar: mały, prawy górny róg, nie zasłania tekstu */
  .hero-trophy-img {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: auto;
    height: auto;
    max-height: 90px;
    width: 56px;
    object-fit: contain;
  }

  /* Tekst: odsunięty od pucharu tylko z prawej */
  .hero-content {
    padding-right: 72px;
    padding-top: 0;
  }

  .hero-heading { font-size: 1.05rem; margin-bottom: 2px; }
  .hero-sub     { font-size: .72rem; margin-bottom: 10px; line-height: 1.3; }

  /* Kompaktowy licznik */
  .hero-countdown {
    padding: 6px 10px;
    gap: 3px;
    border-radius: 8px;
  }
  .cd-block { min-width: 30px; }
  .cd-block span { font-size: .95rem; }
  .cd-block small { font-size: .5rem; margin-top: 1px; }
  .cd-sep { font-size: .85rem; margin-bottom: 12px; }
}

@media (max-width: 700px) {
  .panels-row { grid-template-columns: 1fr; }
  .all-typy-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .topbar { grid-template-columns: auto 1fr auto; }
  .topbar-title { display: none; }
  .nav-greeting { font-size: .85rem; }
  .match-main { gap: 6px; padding: 12px 10px 8px; }
  .team-name { font-size: .76rem; }
  .flag-img { width: 24px; }
  .match-center { min-width: 60px; }
  .all-typy-grid { grid-template-columns: repeat(2, 1fr); }
  .bracket-match { grid-template-columns: 1fr auto 1fr; gap: 4px; padding: 8px; }
  .bracket-team-name { font-size: .72rem; }
}
