/* GOAT LEAGUE mobitel — samo gledanje. Crveno-crno, veliko i citljivo, od 320 px sirine. */
@font-face { font-family: "Bebas"; src: url("/fonts/BebasNeue-Regular.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --poz: #0b0b0d; --kartica: #151518; --kartica-2: #1d1d22; --rub: #2a2a31;
  --crvena: #e0161e; --crvena-tamna: #7a0b10; --zuta: #f2c200; --zelena: #3ecf7a;
  --tekst: #f1f1f4; --siva: #9a9aa6; --siva-2: #6c6c78;
  --naslov: "Bebas", Impact, sans-serif; --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --dno: calc(64px + env(safe-area-inset-bottom));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--poz); color: var(--tekst); font-family: var(--sans); font-size: 16px; line-height: 1.4; overflow-x: hidden; }
body { padding-bottom: var(--dno); min-height: 100vh; background: radial-gradient(ellipse 120% 50% at 50% 0%, #3a0507 0%, var(--poz) 60%) fixed; }
button { font: inherit; color: inherit; }
img { display: block; }

/* ---------- zaglavlje ---------- */
.glava { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(11,11,13,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rub); }
.g-logo { height: 30px; width: auto; flex: none; }
.g-tekst { flex: 1; min-width: 0; }
.g-liga { font-family: var(--naslov); font-size: 20px; line-height: 1; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-datum { font-size: 12.5px; color: var(--siva); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.veza { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .06em; border-radius: 999px; padding: 5px 10px; border: 1px solid var(--rub); color: var(--siva); display: inline-flex; align-items: center; gap: 6px; }
.veza::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--siva-2); }
.veza.ok { color: var(--zelena); border-color: rgba(62,207,122,.4); }
.veza.ok::before { background: var(--zelena); }
.veza.uzivo { color: #fff; border-color: var(--crvena); background: var(--crvena); }
.veza.uzivo::before { background: #fff; animation: treptaj 1.2s infinite; }
.veza.prekinuto { color: #fff; border-color: #7a0b10; background: #3a0507; }
.veza.prekinuto::before { background: var(--crvena); }
@keyframes treptaj { 50% { opacity: .25; } }
.prekid { display: none; position: sticky; top: 60px; z-index: 19; background: #3a0507; color: #fff; text-align: center; font-size: 14px; font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--crvena); }
.prekid.vidi { display: block; }

main { max-width: 760px; margin: 0 auto; padding: 14px 14px 24px; }
.pogled { display: none; }
.pogled.akt { display: block; }
.naslov { font-family: var(--naslov); font-weight: 400; font-size: 30px; letter-spacing: .03em; margin: 18px 2px 10px; display: flex; align-items: baseline; gap: 10px; }
.naslov small { font-family: var(--sans); font-size: 14px; color: var(--siva); letter-spacing: 0; }
.prazno { background: var(--kartica); border: 1px solid var(--rub); border-radius: 16px; padding: 22px 18px; text-align: center; color: var(--siva); font-size: 15px; }
.prazno b { display: block; color: var(--tekst); font-size: 17px; margin-bottom: 4px; }
.lista { display: flex; flex-direction: column; gap: 10px; }
.grupa { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--siva); margin: 14px 4px 2px; }
.grupa:first-child { margin-top: 0; }

/* ---------- kartica utakmice ---------- */
.utakmica { display: block; width: 100%; text-align: left; background: var(--kartica); border: 1px solid var(--rub); border-radius: 16px; padding: 12px 14px 14px; cursor: pointer; }
.utakmica:active { transform: scale(.99); background: var(--kartica-2); }
.u-vrh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.u-vrijeme { font-family: var(--naslov); font-size: 22px; letter-spacing: .03em; color: var(--siva); }
.status { font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; background: var(--kartica-2); color: var(--siva); white-space: nowrap; }
.status.uzivo { background: var(--crvena); color: #fff; }
.status.uzivo::before { content: "● "; animation: treptaj 1.2s infinite; }
.status.gotovo { background: #26262c; color: var(--tekst); }
.status.semafor { background: transparent; border: 1px solid var(--zuta); color: var(--zuta); }
.u-red { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.u-tim { display: flex; align-items: center; gap: 10px; min-width: 0; }
.u-tim.g { flex-direction: row-reverse; text-align: right; }
.u-grb { width: 40px; height: 40px; flex: none; border-radius: 10px; background: radial-gradient(circle at 50% 40%, #6b0e12, #1d0405); padding: 5px; }
.u-grb img { width: 100%; height: 100%; object-fit: contain; }
.u-ime { font-family: var(--naslov); font-size: 20px; line-height: 1.05; letter-spacing: .02em; overflow-wrap: break-word; min-width: 0; }
.u-ime.dugo { font-size: 16px; } .u-ime.jako-dugo { font-size: 14px; }
.u-rez { font-family: var(--naslov); font-size: 34px; line-height: 1; white-space: nowrap; text-align: center; min-width: 60px; }
.u-rez.vs { font-size: 18px; color: var(--siva); }
.u-rez small { display: block; font-family: var(--sans); font-size: 11px; color: var(--siva); letter-spacing: .04em; font-weight: 600; }
.u-dno { display: flex; justify-content: center; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--siva); }
.u-dno b { color: #fff; font-variant-numeric: tabular-nums; }
.utakmica.uzivo { border-color: var(--crvena); box-shadow: 0 0 0 1px var(--crvena) inset; }

/* ---------- uzivo (istaknuto) ---------- */
.uzivo-blok { position: relative; background: linear-gradient(160deg, #b3141a 0%, #5a080c 60%, #22030a 100%); border-radius: 20px; padding: 16px 14px 18px; overflow: hidden; }
.uzivo-blok::before { content: "GOAT"; position: absolute; right: -20px; top: -40px; font-family: var(--naslov); font-size: 190px; color: rgba(0,0,0,.14); line-height: 1; pointer-events: none; font-style: italic; }
.ub-vrh { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ub-oznaka { font-size: 12px; font-weight: 800; letter-spacing: .1em; background: #fff; color: var(--crvena); border-radius: 999px; padding: 4px 11px; }
.ub-oznaka::before { content: "● "; animation: treptaj 1.2s infinite; }
.ub-kolo { font-size: 13px; color: rgba(255,255,255,.8); }
.ub-sat { position: relative; text-align: center; font-family: var(--naslov); font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; margin-top: 4px; }
.ub-faza { position: relative; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.ub-odbroj { position: relative; display: none; margin: 8px auto 0; width: max-content; background: var(--zuta); color: #000; font-weight: 800; border-radius: 999px; padding: 4px 14px; font-size: 14px; letter-spacing: .04em; }
.ub-odbroj.vidi { display: block; }
.ub-red { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin-top: 14px; }
.ub-tim { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.ub-grb { width: 64px; height: 64px; }
.ub-grb img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(0,0,0,.3)); }
.ub-ime { font-family: var(--naslov); font-size: 20px; line-height: 1.05; overflow-wrap: break-word; max-width: 100%; }
.ub-ime.dugo { font-size: 16px; } .ub-ime.jako-dugo { font-size: 14px; }
.ub-rez { font-family: var(--naslov); font-size: 76px; line-height: .9; white-space: nowrap; text-shadow: 0 4px 0 rgba(0,0,0,.3); }
.ub-rez span { display: inline-block; min-width: .6em; text-align: center; }
.ub-rez .dvot { color: rgba(255,255,255,.7); padding: 0 2px; }
.ub-pen { position: relative; text-align: center; margin-top: 6px; font-size: 14px; font-weight: 700; }
.ub-info { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; font-size: 13px; }
.ub-info div { display: flex; flex-wrap: wrap; gap: 5px; }
.ub-info div:last-child { justify-content: flex-end; }
.pill { background: rgba(0,0,0,.35); border-radius: 999px; padding: 3px 9px; font-weight: 600; white-space: nowrap; }
.pill.bonus { background: var(--zuta); color: #000; }
.pill.var { background: #fff; color: #000; }
.ub-var { position: relative; margin-top: 12px; background: #fff; color: #000; border-radius: 12px; padding: 8px 12px; text-align: center; font-weight: 800; letter-spacing: .04em; }
.ub-gumb { position: relative; display: block; width: 100%; margin-top: 12px; background: rgba(0,0,0,.35); border: 0; border-radius: 12px; padding: 11px; font-weight: 700; font-size: 14px; }

/* dogadaji */
.dogadaji { background: var(--kartica); border: 1px solid var(--rub); border-radius: 16px; padding: 4px 12px; margin-top: 12px; }
.dg { display: grid; grid-template-columns: 36px 26px 1fr; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rub); font-size: 15px; }
.dg:last-child { border-bottom: 0; }
.dg.g { grid-template-columns: 1fr 26px 36px; text-align: right; }
.dg.g .dg-min { order: 3; } .dg.g .dg-ik { order: 2; } .dg.g .dg-opis { order: 1; }
.dg-min { font-family: var(--naslov); font-size: 20px; color: var(--siva); }
.dg-ik { text-align: center; font-size: 17px; }
.dg-opis b { font-weight: 700; }
.dg-opis small { display: block; color: var(--siva); font-size: 12.5px; }
.karta { display: inline-block; width: 13px; height: 18px; border-radius: 2px; vertical-align: -3px; }
.karta.zuti { background: var(--zuta); } .karta.crveni { background: var(--crvena); }

/* ---------- filteri ---------- */
.filteri { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filteri button { flex: 1; min-width: 70px; background: var(--kartica); border: 1px solid var(--rub); border-radius: 999px; padding: 11px 10px; font-weight: 700; font-size: 14px; cursor: pointer; }
.filteri button.akt { background: #fff; color: #000; border-color: #fff; }
.filteri input { flex: 1 1 140px; min-width: 0; background: var(--kartica); border: 1px solid var(--rub); border-radius: 999px; padding: 10px 14px; color: var(--tekst); font: inherit; font-size: 14px; color-scheme: dark; }

/* ---------- tablica ---------- */
.tablica-okvir { background: var(--kartica); border: 1px solid var(--rub); border-radius: 16px; overflow: hidden; }
.tablica { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.tablica th.c-m { width: 30px; } .tablica th.c-n { width: 38px; } .tablica th.c-gol { width: 52px; } .tablica th.c-b { width: 46px; }
.tablica th { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--siva); padding: 10px 4px; text-align: center; background: #111114; }
.tablica td { padding: 9px 4px; text-align: center; border-top: 1px solid var(--rub); font-variant-numeric: tabular-nums; }
.tablica td.m { width: 28px; font-weight: 700; color: var(--siva); box-shadow: inset 3px 0 transparent; }
.tablica td.t { text-align: left; }
.tablica .t-sadrzaj { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.tablica .t-grb { width: 26px; height: 26px; flex: none; border-radius: 6px; padding: 3px; }
.tablica .t-grb img { width: 100%; height: 100%; object-fit: contain; }
.tablica .t-ime { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tablica td.b { font-family: var(--naslov); font-size: 22px; color: #fff; background: rgba(224,22,30,.14); }
.tablica tr.z-polufinale td.m { box-shadow: inset 3px 0 var(--zelena); }
.tablica tr.z-playoff td.m { box-shadow: inset 3px 0 var(--zuta); }
.tablica tr.z-playin td.m { box-shadow: inset 3px 0 #3fa9e0; }
.tablica tr.z-ispadanje td.m { box-shadow: inset 3px 0 var(--crvena); }
.tablica tr.igra td.t .t-ime::after { content: " ●"; color: var(--crvena); animation: treptaj 1.2s infinite; }
.legenda { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 4px 0; font-size: 12px; color: var(--siva); }
.legenda span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.z-polufinale::before { background: var(--zelena); } .z-playoff::before { background: var(--zuta); } .z-playin::before { background: #3fa9e0; } .z-ispadanje::before { background: var(--crvena); }
.napomena { font-size: 12px; color: var(--siva-2); margin: 10px 4px; }
.tablica-uzivo { background: var(--crvena-tamna); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-size: 14px; }
.tablica-uzivo b { font-family: var(--naslov); font-size: 20px; letter-spacing: .02em; }
@media (max-width: 420px) {
  .tablica .sk { display: none; }
  .tablica th.c-n { width: 33px; } .tablica th.c-b { width: 40px; } .tablica .t-grb { width: 22px; height: 22px; }
  .tablica th { font-size: 10px; letter-spacing: 0; }
  .tablica { font-size: 13px; }
}

/* ---------- detalji (list odozdo) ---------- */
.list-poz { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); display: none; align-items: flex-end; justify-content: center; }
.list-poz.vidi { display: flex; }
.list { width: 100%; max-width: 760px; max-height: 92vh; overflow-y: auto; background: #111114; border-radius: 22px 22px 0 0; padding: 0 14px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rub); animation: gore .22s ease-out; }
@keyframes gore { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.list-vrh { position: sticky; top: 0; display: flex; justify-content: center; align-items: center; padding: 10px 0 8px; background: #111114; z-index: 1; }
.list-rucka { width: 44px; height: 5px; border-radius: 3px; background: var(--rub); }
.list-zatvori { position: absolute; right: 0; top: 6px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rub); background: var(--kartica); font-size: 16px; cursor: pointer; }
.d-sekcija { margin-top: 16px; }
.d-sekcija h3 { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--siva); margin: 0 4px 8px; }
.stat { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--rub); font-size: 15px; align-items: center; }
.stat span:first-child { text-align: left; font-weight: 700; } .stat span:last-child { text-align: right; font-weight: 700; }
.stat em { font-style: normal; color: var(--siva); font-size: 13px; text-align: center; }
.postave { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.postava { background: var(--kartica); border: 1px solid var(--rub); border-radius: 14px; padding: 8px 10px; min-width: 0; }
.postava h4 { margin: 2px 0 6px; font-family: var(--naslov); font-weight: 400; font-size: 18px; overflow-wrap: anywhere; }
.igrac { display: flex; gap: 8px; font-size: 13.5px; padding: 3px 0; min-width: 0; }
.igrac b { width: 24px; flex: none; text-align: right; color: var(--siva); font-variant-numeric: tabular-nums; }
.igrac span { overflow-wrap: anywhere; }
.igrac em { font-style: normal; font-size: 10px; color: var(--zuta); margin-left: 4px; }
.osoblje { font-size: 12.5px; color: var(--siva); margin-top: 6px; }
@media (max-width: 360px) { .postave { grid-template-columns: 1fr; } }

/* ---------- navigacija dolje ---------- */
.dno { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(11,11,13,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--rub); padding-bottom: env(safe-area-inset-bottom); }
.dno button { background: none; border: 0; padding: 8px 2px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; color: var(--siva); cursor: pointer; min-height: 64px; justify-content: center; }
.n-ik { font-size: 19px; line-height: 1; }
.dno button.akt { color: #fff; }
.dno button.akt .n-ik { color: var(--crvena); }
.dno button.ima-uzivo { color: #fff; }
.dno button.ima-uzivo .n-ik { color: var(--crvena); animation: treptaj 1.2s infinite; }

@media (min-width: 700px) {
  .ub-sat { font-size: 84px; }
  .ub-rez { font-size: 110px; }
  .ub-grb { width: 96px; height: 96px; }
  .ub-ime { font-size: 26px; }
  .u-ime { font-size: 24px; } .u-ime.dugo { font-size: 19px; } .u-ime.jako-dugo { font-size: 17px; }
  .u-grb { width: 48px; height: 48px; }
}

/* uski mobiteli (do ~380 px): manja imena i rezultat da nijedna rijec ne pukne na pola */
@media (max-width: 380px) {
  .ub-rez { font-size: 58px; }
  .ub-grb { width: 52px; height: 52px; }
  .ub-ime { font-size: 15px; } .ub-ime.dugo { font-size: 13px; } .ub-ime.jako-dugo { font-size: 11px; }
  .u-ime { font-size: 17px; } .u-ime.dugo { font-size: 14px; } .u-ime.jako-dugo { font-size: 11.5px; }
  .u-grb { width: 34px; height: 34px; }
  .u-rez { font-size: 28px; min-width: 50px; }
  .ub-sat { font-size: 56px; }
}
