/* Pumpaj Liga — mobile-first stilovi */
:root{
  --bg: #0c0f14;
  --card: #141924;
  --muted: #a7b0c0;
  --text: #eaf0ff;
  --accent: #6ea8fe;
  --accent-soft: #aedaff;
  --glow: #2b64ff40;
  --border: #1f2533;
}

*{ box-sizing: border-box; }
html,body{
  margin:0; padding:0;
  background:
    radial-gradient(1200px 600px at 80% -10%, #2b64ff10, transparent 60%),
    radial-gradient(1200px 600px at -10% 20%, #00d38f10, transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* A11y utility */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Layout helpers */
.wrap{ width:min(940px, 92vw); margin:0 auto; }

/* Header */
.site-header{
  position: sticky; top:0; z-index: 10;
  background: linear-gradient(180deg, #0c0f1499, #0c0f1400);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap{ padding:16px 0 12px; }
.title{
  margin:0;
  font-weight:800; letter-spacing:.2px;
  font-size: clamp(22px, 5vw, 36px);
}
.subtitle{ margin:.25rem 0 0; color:var(--muted); }

/* Footer */
.site-footer{ border-top:1px solid var(--border); margin-top:28px; }
.site-footer .wrap{ padding:16px 0; text-align:center; color:var(--muted); }

/* Card */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 24px 50px -24px var(--glow);
  margin: 16px 0;
}
.card-head{
  display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:8px;
}
.card h2{ margin:0; font-size: clamp(18px, 4.5vw, 24px); }
.muted{ color: var(--muted); font-size:.95rem; }

/* Table */
.table-responsive{
  overflow:auto;                /* omogućava skrol ako ima puno redova */
  max-height: 70vh;             /* zadrži tabelu u visini prozora */
  border-radius: 12px;
  border: 1px solid var(--border);
}
.league-table{
  width:100%;
  border-collapse: collapse;
  background: #0f1420;
}
.league-table thead th{
  background:#101727;
  color:#cfe0ff;
  text-align:left;
  font-weight:600;
  font-size:.95rem;
  padding:12px 10px;
  border-bottom:1px solid var(--border);
  position: sticky; top: 0; z-index: 2; /* sticky header u okviru .table-responsive */
}
.col-rank{ width: 44px; text-align: center !important; }
.league-table td{
  padding:12px 10px;
  border-bottom:1px solid #1a2233;
  vertical-align: middle;
}
.league-table tbody tr{
  transition: background .2s ease, transform .12s ease;
}
.league-table tbody tr:hover{ background:#101727; }
.center{ text-align:center; }

/* Zebra efekat (suptilno) */
.league-table tbody tr:nth-child(odd){ background:#0f1726; }
.league-table tbody tr:nth-child(even){ background:#0f1420; }

/* Naglasi poene */
.league-table td.poeni{
  font-weight:800;
  letter-spacing:.2px;
}

/* Klikabilna sort zaglavlja + strelice */
th.sortable{
  text-align:center;
  cursor:pointer; user-select:none;
  transition: color .18s ease, background .18s ease;
}
th.sortable:hover{ color: var(--accent-soft); background:#0f1a2e; }
th.sortable:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:6px; }
th.sortable.active{ color: var(--accent); }
th.sortable .arrow{
  margin-left:.35rem; font-size:.8em; line-height:1; color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(110,168,254,.25));
}

/* Igrač celija */
.team{
  display:flex; align-items:center; gap:10px; font-weight:600;
}
.team .logo{
  width:28px; height:28px; border-radius:6px; object-fit:cover;
  border:1px solid #00000022; background:#fff;
}
.team .name{ white-space:nowrap; }

/* Pravougaoni “old-school” fenjer (CSS ikonica) */
.icon-fenjer{
  display:inline-block;
  width:18px; height:14px;
  border:2px solid #ff9a4a;        /* bakarna ivica */
  background: linear-gradient(#753b00,#ffb36b); /* starinski ton */
  box-shadow: inset 0 0 0 2px #2b1400, inset 0 -3px 0 0 #4c2200;
  border-radius: 3px;
  vertical-align:-2px;
  position:relative;
}
.icon-fenjer::before{
  /* ručka gore */
  content:"";
  position:absolute; left:50%; transform:translateX(-50%);
  top:-6px; width:12px; height:5px; border:2px solid #ff9a4a; border-bottom:none; border-radius:6px 6px 0 0;
}
.icon-fenjer::after{
  /* staklo / sjaj */
  content:"";
  position:absolute; inset:2px 3px;
  background: radial-gradient(60% 80% at 50% 50%, #ffd79f, #ffb36b 70%, #a05509 100%);
  border-radius:2px;
  box-shadow: inset 0 0 6px 1px #ffd9a7;
}

/* Info banner (SADA ISPOD TABELE) */
.info-banner{
  margin: 10px 0 24px;
  background: linear-gradient(180deg, #1a2233, #141924);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px -12px var(--glow);
}
.legend{
  list-style:none; padding:0; margin:0; display:flex; gap:14px; flex-wrap:wrap;
  align-items:center;
}
.legend .icon{ margin-right:6px; }
/* Ako želiš vertikalno, samo dodaj klasu .vertical na UL.legend */
.legend.vertical{ display:block; }
.legend.vertical li + li{ margin-top:8px; }

/* Mobile “cards” fallback za ekstra male ekrane */
.mobile-cards{ display:none; margin-top:12px; }
.team-card{
  border:1px solid var(--border);
  background: #0f1420;
  border-radius: 14px;
  padding: 12px;
  display:flex; flex-direction:column; gap:10px;
}
.team-card + .team-card{ margin-top:10px; }
.team-card header{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.team-card .rank{
  display:inline-flex; align-items:center; justify-content:center;
  width:42px; height:32px; border-radius:10px;
  background:#101a2e; border:1px solid var(--border);
  font-weight:700;
}
.team-card .id{ display:flex; align-items:center; gap:10px; }
.team-card .id .logo{
  width:28px; height:28px; border-radius:6px; object-fit:cover; background:#fff; border:1px solid #00000022;
}
.team-card h3{ margin:0; font-size:1rem; }
.team-card .stats{
  list-style:none; margin:0; padding:0; display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap:8px;
}
.team-card .stats li{
  display:flex; align-items:center; gap:6px; justify-content:center;
  background:#101727; border:1px solid var(--border); border-radius:10px; padding:8px 6px;
}
.team-card .stats .icon-fenjer{ margin-right:4px; }

/* Responsive ponašanje */
@media (max-width: 560px){
  .table-responsive{ display:none; }  /* Na baš malim ekranima koristi kartice */
  .mobile-cards{ display:block; }
}
@media (min-width: 561px){
  .mobile-cards{ display:none; }
}

/* Sitni vizuelni detalji */
.league-table tbody tr:first-child td,
.league-table tbody tr:nth-child(2) td{
  border-top: 1px solid #23314b;
}
.league-table tbody tr:hover td{ border-bottom-color:#2a3753; }
