:root {
  --primary: #e11d28;
  --primary-dark: #a01520;
  --primary-light: #f43f4a;
  --accent: #ffffff;
  --accent-dark: #e5e5e5;
  --bg: #3a1118;
  --bg-soft: #4a1520;
  --bg-card: #5a1a26;
  --text: #fff5f6;
  --text-muted: #d4b8bd;
  --border: #6d2332;
  --success: #22c55e;
  --danger: #ef4444;
  --draw: #f59e0b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --transition: 0.25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(58, 17, 24, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.3px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: white;
  border: 2px solid white;
  box-shadow:
    0 0 0 2px var(--primary),
    0 4px 12px rgba(225, 29, 40, 0.4);
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-text span { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 6px;
}

.nav-links a {
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 15px;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover, .nav-links a.active {
  color: white;
  background: var(--bg-card);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  background: var(--primary);
  border: 2px solid white;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(225, 29, 40, 0.4);
}

.nav-toggle:hover { background: var(--primary-light); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--bg);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/banner-hero.jpg');
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  opacity: 0.28;
  filter: saturate(1.1) blur(1px);
  z-index: 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(120deg, rgba(58,17,24,0.92) 0%, rgba(74,21,32,0.78) 40%, rgba(58,17,24,0.55) 70%, rgba(58,17,24,0.85) 100%),
    radial-gradient(ellipse at top right, rgba(225,29,40,0.35), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(255,255,255,0.06), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 80px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 560px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
  box-shadow: 0 8px 22px rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--primary-light);
}

.hero-logo {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  margin: 0 auto;
  position: relative;
  display: grid;
  place-items: center;
}

.hero-logo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: conic-gradient(from 180deg, var(--primary), var(--primary-light), var(--accent), var(--primary));
  border-radius: 50%;
  animation: spin 16s linear infinite;
  opacity: 0.3;
  filter: blur(30px);
}

.hero-logo-inner {
  position: relative;
  width: 88%;
  height: 88%;
  border-radius: 50%;
  overflow: hidden;
  background: white;
  border: 6px solid white;
  box-shadow:
    0 0 0 5px var(--primary),
    0 0 0 10px rgba(255,255,255,0.15),
    0 30px 70px rgba(225, 29, 40, 0.45),
    0 14px 30px rgba(0,0,0,0.35);
}

.hero-logo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== SECTIONS ===== */
.section {
  padding: 80px 0;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 20px;
  flex-wrap: wrap;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.8px;
}

.section-title span {
  color: var(--accent);
}

.section-subtitle {
  color: var(--text-muted);
  margin-top: 6px;
}

.section-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.section-link:hover { gap: 10px; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* ===== NEXT MATCH ===== */
.next-match {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius);
  padding: 36px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.next-match::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
}

.match-label {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  position: relative;
}

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  position: relative;
}

.match-team {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.team-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 22px;
  color: var(--primary);
  overflow: hidden;
}

.team-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-weight: 700;
  font-size: 18px;
  color: white;
}

.match-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.match-vs .vs-text {
  font-weight: 900;
  font-size: 32px;
  color: var(--accent);
  letter-spacing: 2px;
}

.match-vs .match-date {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.2);
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.stat:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 42px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

/* ===== NEWS ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.news-image.has-photo {
  background-size: cover !important;
  background-position: center !important;
}
.news-image.has-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.5));
  transition: var(--transition);
}
.news-card:hover .news-image.has-photo { background-size: 110% !important; }

/* ===== Featured hero news ===== */
.featured-news {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  margin-bottom: 32px;
  cursor: pointer;
}
.featured-news:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.featured-news-image {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: #0e050a;
}
.featured-news-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.featured-news:hover .featured-news-image img { transform: scale(1.05); }
.featured-news-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 55%, rgba(0,0,0,0.35));
  pointer-events: none;
  z-index: 1;
}
.featured-news-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--accent);
  color: var(--primary-dark);
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  z-index: 3;
}
.featured-news-body {
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}
.featured-news-date {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 700;
}
.featured-news-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}
.featured-news-excerpt {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}
.featured-news-cta {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  transition: gap 0.2s;
}
.featured-news:hover .featured-news-cta { gap: 12px; }

/* Month grouping headers on vijesti */
.news-month {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 20px 0 14px;
  border-top: 1px solid var(--border);
  margin: 24px 0 0;
}
.news-month:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.news-month span { color: var(--accent); }
.news-section-group + .news-section-group { margin-top: 8px; }

@media (max-width: 860px) {
  .featured-news { grid-template-columns: 1fr; }
  .featured-news-image { min-height: 260px; }
  .featured-news-body { padding: 28px; }
  .featured-news-title { font-size: 22px; }
}

/* ===== Article page ===== */
.article-wrap {
  max-width: 820px;
  margin: 0 auto;
}
.article-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.article-meta .badge {
  background: var(--accent);
  color: var(--primary-dark);
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.article-meta .date {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.article-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
}
.article-lead {
  font-size: 18px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 28px;
  font-weight: 500;
}
.article-body p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 18px;
}
.article-body strong { color: var(--accent); }
.article-body ul {
  margin: 0 0 18px 20px;
  line-height: 1.75;
}
.article-body ul li { margin-bottom: 6px; }
.article-figure {
  margin: 28px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-figure img { width: 100%; display: block; }
.article-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 28px 0;
}
.article-gallery img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
}
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 20px;
  font-size: 14px;
}
.article-back:hover { gap: 10px; }

@media (max-width: 700px) {
  .article-title { font-size: 26px; }
  .article-lead { font-size: 16px; }
  .article-gallery { grid-template-columns: 1fr; }
}

.news-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.news-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.15);
  font-size: 64px;
  font-weight: 900;
}

.news-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4));
}

.news-category {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--accent);
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.news-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.35;
}

.news-excerpt {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
  flex: 1;
}

.news-read {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.news-card:hover .news-read { gap: 10px; }

/* ===== RESULTS ===== */
.results-list {
  display: grid;
  gap: 12px;
}

.result-row {
  display: grid;
  grid-template-columns: 100px 1fr auto 1fr 60px;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: var(--transition);
}

.result-row:hover {
  border-color: var(--primary-light);
  transform: translateX(4px);
}

.result-date {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.result-home, .result-away {
  font-weight: 600;
  font-size: 15px;
}

.result-home { text-align: right; }

.result-score {
  background: var(--bg-soft);
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 17px;
  min-width: 68px;
  text-align: center;
  color: var(--accent);
  border: 1px solid var(--border);
}

.result-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.tag-win { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.tag-loss { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.tag-draw { background: rgba(245, 158, 11, 0.15); color: var(--draw); }

.team-highlight { color: var(--accent); font-weight: 800; }

/* ===== TABLE ===== */
.standings-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: auto;
}

.standings {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.standings th {
  background: var(--bg-soft);
  text-align: left;
  padding: 16px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.standings th.center, .standings td.center { text-align: center; }

.standings td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.standings tr:last-child td { border-bottom: none; }

.standings tr:hover td { background: rgba(230, 57, 70, 0.08); }

.standings .pos {
  width: 44px;
  text-align: center;
  font-weight: 700;
  color: var(--text-muted);
}

.standings .club-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.mini-logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--border);
}

.standings .highlight-row {
  background: rgba(255, 255, 255, 0.06);
}

.standings .highlight-row td { font-weight: 700; }

.standings .pts { color: var(--accent); font-weight: 800; }

/* ===== PLAYERS ===== */
.squad-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.filter-btn:hover { color: white; border-color: var(--primary-light); }

.filter-btn.active {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.player-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.player-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.player-photo {
  height: 260px;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary-dark) 100%);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.player-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.15), transparent 60%);
}

.player-photo svg {
  width: 70%;
  height: 95%;
  color: rgba(255,255,255,0.25);
}

.player-number {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 56px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  text-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

.player-pos-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: white;
  text-transform: uppercase;
}

.player-info {
  padding: 18px;
}

.player-name {
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 4px;
}

.player-meta {
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 60px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .brand { margin-bottom: 16px; }

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 320px;
}

.footer h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  color: var(--accent);
}

.footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer ul a {
  color: var(--text-muted);
  font-size: 14px;
  transition: var(--transition);
}

.footer ul a:hover { color: white; }

.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.social-link:hover {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 80px 0 40px;
  background:
    radial-gradient(ellipse at top, rgba(230, 57, 70, 0.2), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.page-header h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.page-header h1 span { color: var(--accent); }

.page-header p { color: var(--text-muted); font-size: 17px; }

/* ===== GRID 2COL ===== */
.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-logo { max-width: 280px; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .result-row { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .result-home, .result-away { text-align: center; }
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-soft);
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    transform: translateY(-150%);
    transition: transform 0.28s ease;
    gap: 4px;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { display: block; width: 100%; padding: 14px 16px; font-size: 16px; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .match-teams { grid-template-columns: 1fr; }
  .brand-text { font-size: 15px; }
}

/* ===== LIVE BAR ===== */
.live-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 28px;
}

.live-status { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); }
.live-status a { color: var(--accent); font-weight: 600; }
.live-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.2);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(34,197,94,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(34,197,94,0.05); }
}

.live-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.live-updated { font-size: 13px; color: var(--text-muted); }

.refresh-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.refresh-btn:hover:not(:disabled) { background: var(--primary-light); transform: translateY(-1px); }
.refresh-btn:disabled { opacity: 0.6; cursor: wait; }

/* ===== MINI STATS PILLS ===== */
.mini-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.stat-pill {
  flex: 1 1 auto;
  min-width: 110px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stat-pill .n { font-size: 26px; font-weight: 900; color: var(--text); line-height: 1; }
.stat-pill .l { font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--text-muted); font-weight: 600; }
.stat-pill.win .n { color: #4ade80; }
.stat-pill.draw .n { color: #fbbf24; }
.stat-pill.loss .n { color: #f87171; }
.stat-pill.accent { background: var(--primary); border-color: var(--primary); }
.stat-pill.accent .n { color: white; font-size: 28px; }
.stat-pill.accent .l { color: rgba(255,255,255,0.85); }

/* ===== MATCH CARD ===== */
.match-list {
  display: grid;
  gap: 12px;
}
.loading-card {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  transition: var(--transition);
}
.match-card:hover {
  border-color: var(--primary-light);
  transform: translateX(3px);
}
.match-card.upcoming {
  border-left: 3px solid var(--primary);
  background: linear-gradient(90deg, rgba(225,29,40,0.08), var(--bg-card) 40%);
}

.m-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.m-kolo {
  background: var(--bg-soft);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}
.m-date {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.m-tag {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.m-tag.win { background: rgba(34,197,94,0.15); color: #4ade80; }
.m-tag.draw { background: rgba(251,191,36,0.15); color: #fbbf24; }
.m-tag.loss { background: rgba(248,113,113,0.15); color: #f87171; }
.m-tag.upcoming { background: rgba(225,29,40,0.2); color: var(--primary-light); }

.m-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.team-col { display: flex; align-items: center; }
.team-home { justify-content: flex-end; text-align: right; }
.team-away { justify-content: flex-start; text-align: left; }
.team-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.team-name.is-us {
  color: var(--accent);
  font-weight: 800;
  position: relative;
  padding: 4px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
}

.m-score {
  font-weight: 900;
  font-size: 20px;
  min-width: 78px;
  text-align: center;
  padding: 8px 14px;
  background: var(--bg-soft);
  border-radius: 8px;
  color: white;
  border: 1px solid var(--border);
  letter-spacing: 1.5px;
}
.m-score.pending { color: var(--text-muted); font-size: 16px; letter-spacing: 1px; }

.error-card {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  padding: 16px;
  border-radius: 10px;
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}
.error-card a { color: var(--accent); text-decoration: underline; margin-left: 8px; }

@media (max-width: 600px) {
  .m-body { grid-template-columns: 1fr; gap: 8px; }
  .team-home, .team-away { justify-content: center; text-align: center; }
  .m-score { justify-self: center; }
}

/* ===== PLAYER BIO ===== */
.player-card.has-bio { position: relative; }
.player-card.has-bio::before {
  content: '';
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 10px; height: 10px;
  background: var(--primary);
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(225,29,40,0.3);
}
.player-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-light);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: var(--transition);
}
.player-card.has-bio:hover .player-more {
  color: white;
  letter-spacing: 1px;
}

/* ===== BIO MODAL ===== */
.bio-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 4, 7, 0);
  transition: background 0.25s ease;
}
.bio-modal.open {
  display: flex;
  background: rgba(10, 4, 7, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: bioFadeIn 0.25s ease both;
}
@keyframes bioFadeIn { from { opacity: 0; } to { opacity: 1; } }

.bio-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.bio-dialog {
  position: relative;
  z-index: 2;
  background:
    radial-gradient(ellipse at top right, rgba(225,29,40,0.25), transparent 55%),
    linear-gradient(160deg, var(--bg-card) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 50px 100px rgba(0,0,0,0.7),
    0 0 0 1px rgba(255,255,255,0.05),
    inset 0 1px 0 rgba(255,255,255,0.08);
  animation: bioPop 0.35s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}
@keyframes bioPop {
  from { transform: translateY(30px) scale(0.94); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.bio-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: var(--transition);
  z-index: 10;
  backdrop-filter: blur(8px);
}
.bio-close:hover { background: var(--primary); border-color: var(--primary); transform: rotate(90deg); }

/* HERO HEADER */
.bio-hero {
  position: relative;
  padding: 32px 30px 26px;
  background:
    linear-gradient(135deg, rgba(225,29,40,0.35), rgba(139,13,31,0.15)),
    var(--bg-soft);
  border-radius: 20px 20px 0 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.bio-watermark {
  position: absolute;
  right: -40px;
  top: -30px;
  width: 220px;
  height: 220px;
  opacity: 0.12;
  pointer-events: none;
  filter: saturate(1.3);
}

.bio-shield {
  width: 96px;
  height: 110px;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 14px;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(225,29,40,0.4);
  position: relative;
  border: 3px solid white;
  /* border + clip-path combo via filter drop-shadow for clean edge */
  filter: drop-shadow(0 0 0 white);
}
.bio-shield-num {
  font-size: 38px;
  font-weight: 900;
  color: white;
  line-height: 1;
  letter-spacing: -1px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.bio-shield-pos {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: white;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.92;
}

.bio-ident { position: relative; z-index: 2; }
.bio-club {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
  margin-bottom: 6px;
}
.bio-name {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.1;
  color: white;
  margin-bottom: 14px;
}
.bio-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bio-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  backdrop-filter: blur(6px);
}

/* BODY */
.bio-body {
  padding: 26px 30px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
}
.bio-body p { margin-bottom: 14px; }
.bio-body p:last-child { margin-bottom: 0; }
.bio-body strong { color: var(--accent); font-weight: 700; }

/* FOOT — clubs list */
.bio-foot {
  padding: 20px 30px 28px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
  border-radius: 0 0 20px 20px;
}
.bio-foot-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.bio-clubs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bio-club-tag {
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.bio-club-tag.current {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(225,29,40,0.35);
}
.bio-tm-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  margin-top: 4px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: all 0.15s ease;
}
.bio-tm-link:hover {
  color: var(--accent);
  border-color: var(--primary-light);
  background: rgba(225,29,40,0.12);
}

@media (max-width: 560px) {
  .bio-dialog { border-radius: 16px; }
  .bio-hero { padding: 28px 22px 22px; border-radius: 16px 16px 0 0; }
  .bio-name { font-size: 24px; }
  .bio-body, .bio-foot { padding-left: 22px; padding-right: 22px; }
  .bio-watermark { width: 170px; height: 170px; right: -30px; }
}

/* ===== PLAYER PHOTO (card) ===== */
.player-card.has-photo .player-photo {
  background: linear-gradient(180deg, #2b0a10 0%, #140609 100%);
}
.player-card.has-photo .player-photo svg { display: none; }
.player-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  z-index: 0;
  transition: transform 0.4s ease;
}
.player-card.has-photo:hover .player-img { transform: scale(1.04); }
.player-card.has-photo .player-pos-tag,
.player-card.has-photo .player-number {
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.player-card.has-photo .player-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 40%, transparent 65%, rgba(10,4,7,0.65) 100%);
  z-index: 1;
  pointer-events: none;
}

/* ===== MODAL with photo ===== */
.bio-hero-left { position: relative; z-index: 2; }
.bio-dialog.with-photo .bio-hero {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 20px;
  padding: 32px 30px 30px;
}
.bio-dialog.with-photo .bio-hero-left { order: 1; }
.bio-photo {
  order: 2;
  width: 100%;
  max-width: 220px;
  height: 250px;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 14px;
  border: 3px solid white;
  box-shadow:
    0 0 0 3px var(--primary),
    0 15px 35px rgba(0,0,0,0.5);
  justify-self: end;
  align-self: start;
  position: relative;
  z-index: 3;
}

@media (max-width: 560px) {
  .bio-dialog.with-photo .bio-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .bio-dialog.with-photo .bio-hero-left { order: 2; display: flex; flex-direction: column; align-items: center; }
  .bio-dialog.with-photo .bio-chips { justify-content: center; }
  .bio-photo {
    order: 1;
    justify-self: center;
    max-width: 180px;
    height: 200px;
  }
}

/* ===== STANDINGS TABLE (live) ===== */
.standings-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: auto;
}
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}
.standings-table thead {
  background: linear-gradient(180deg, var(--bg-soft), rgba(0,0,0,0.2));
}
.standings-table th {
  padding: 14px 10px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.standings-table th.center, .standings-table td.center { text-align: center; }
.standings-table th.pos, .standings-table td.pos {
  width: 48px;
  text-align: center;
  font-weight: 800;
  color: var(--text-muted);
  position: relative;
}
.standings-table th.pts, .standings-table td.pts {
  font-weight: 900;
  color: var(--accent);
  font-size: 15px;
  background: rgba(0,0,0,0.12);
}

.standings-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.18s ease;
}
.standings-table tbody tr:last-child { border-bottom: none; }
.standings-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.standings-table td { padding: 11px 10px; }

/* position color strips */
.standings-table td.pos { border-left: 3px solid transparent; }
.standings-table td.pos.promo   { border-left-color: #22c55e; color: #4ade80; }
.standings-table td.pos.playoff { border-left-color: #fbbf24; color: #fbbf24; }
.standings-table td.pos.releg   { border-left-color: #ef4444; color: #f87171; }

.standings-table .highlight-row {
  background: linear-gradient(90deg, rgba(225,29,40,0.18) 0%, rgba(225,29,40,0.04) 100%);
  box-shadow: inset 3px 0 0 var(--primary);
}
.standings-table .highlight-row td { font-weight: 800; color: white; }
.standings-table .highlight-row td.pts { color: var(--accent); background: rgba(225,29,40,0.25); }

.club-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.team-logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  background: white;
  border-radius: 5px;
  padding: 2px;
  flex-shrink: 0;
}
.team-logo-fallback {
  width: 26px;
  height: 26px;
  background: var(--bg-soft);
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.club-label { font-weight: 600; }
.us-dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(225,29,40,0.25);
  margin-left: 4px;
  animation: pulse 2s infinite;
}

.legend-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.promo     { background: #22c55e; }
.legend-dot.playoff   { background: #fbbf24; }
.legend-dot.releg     { background: #ef4444; }
.legend-dot.highlight { background: var(--primary); box-shadow: 0 0 0 3px rgba(225,29,40,0.25); }

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .standings-table { min-width: 320px; }
  .club-label { font-size: 12px; }
  .legend-row { gap: 10px; padding: 10px 14px; }
  .legend-item { font-size: 11px; }
}

/* ===== Match card team logos ===== */
.m-team-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  background: white;
  border-radius: 6px;
  padding: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.m-team-logo.fallback {
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  padding: 0;
}
.m-team-logo.logo-sm  { width: 42px; height: 42px; padding: 4px; }
.m-team-logo.logo-lg-plain {
  width: 80px; height: 80px;
  border-radius: 50%;
  padding: 6px;
  border: 2px solid rgba(255,255,255,0.2);
}
.m-team-logo.fallback.logo-lg-plain { font-size: 22px; }

.team-col { display: flex; align-items: center; gap: 10px; }
.team-home { justify-content: flex-end; text-align: right; }
.team-away { justify-content: flex-start; text-align: left; }

/* result rows on home page — make room for logos */
.result-row .result-home,
.result-row .result-away {
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-row .result-home { justify-content: flex-end; }
.result-row .result-away { justify-content: flex-start; }
.result-row .rr-team { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Make homepage next-match use image logos properly */
.next-match .team-logo {
  width: 80px;
  height: 80px;
  background: white;
  overflow: hidden;
  padding: 4px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,0.2);
}
.next-match .team-logo img,
.next-match .team-logo .m-team-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  border: none;
  padding: 0;
}
.next-match .team-name.is-us { color: var(--accent); font-weight: 800; }

@media (max-width: 600px) {
  .m-team-logo { width: 28px; height: 28px; }
  .m-team-logo.logo-sm { width: 34px; height: 34px; }
  .result-row .rr-team { font-size: 13px; }
}

/* ===== Club page — bouncing balls background ===== */
.club-balls {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.club-ball {
  position: absolute;
  bottom: 30px;
  font-size: 44px;
  line-height: 1;
  opacity: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.35));
  animation: clubBallFall 5.5s infinite;
  transform: translateY(-110vh);
}
.club-ball.b1 { left: 12%; animation-delay: 0s; }
.club-ball.b2 { left: 49%; animation-delay: 1.8s; font-size: 36px; }
.club-ball.b3 { left: 82%; animation-delay: 3.6s; font-size: 40px; }

@keyframes clubBallFall {
  0%   { transform: translateY(-110vh) rotate(0deg);   opacity: 0; }
  3%   { opacity: 0.22; }
  /* Falling — ease-in */
  20%  { transform: translateY(0)       rotate(360deg); opacity: 0.28; animation-timing-function: cubic-bezier(0.3, 0, 0.7, 1); }
  /* First bounce up */
  30%  { transform: translateY(-32vh)   rotate(440deg); opacity: 0.28; }
  /* Fall back */
  40%  { transform: translateY(0)       rotate(560deg); opacity: 0.28; }
  /* Second bounce */
  48%  { transform: translateY(-15vh)   rotate(620deg); opacity: 0.28; }
  55%  { transform: translateY(0)       rotate(690deg); opacity: 0.28; }
  /* Third tiny bounce */
  61%  { transform: translateY(-5vh)    rotate(730deg); opacity: 0.28; }
  65%  { transform: translateY(0)       rotate(760deg); opacity: 0.28; }
  /* Rest on floor */
  93%  { transform: translateY(0)       rotate(760deg); opacity: 0.28; }
  100% { transform: translateY(0)       rotate(760deg); opacity: 0; }
}

/* Lift content above balls on pages that enable them */
.has-balls-bg .page-header,
.has-balls-bg .section,
.has-balls-bg .footer {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .club-ball { animation: none; display: none; }
}

/* ==========================================================
   BIO MODAL — SEASON STATS BLOCK
   ========================================================== */
.bio-stats {
  padding: 22px 30px 6px;
  color: var(--text);
}
.bio-stats .stats-head { margin-bottom: 14px; }
.bio-stats .stats-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.bio-stats .stats-title span {
  color: var(--accent);
  letter-spacing: 0;
}
.bio-stats .stats-sub {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.75;
  margin: 0;
}
.bio-stats .stat-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin: 14px 0 18px;
}
.bio-stats .stat-badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.bio-stats .stat-badge .stat-val {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.1;
}
.bio-stats .stat-badge .stat-lbl {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}
.bio-stats .stat-badge.primary { border-color: var(--primary); }
.bio-stats .stat-badge.goal {
  border-color: #ffd43b;
  background: linear-gradient(180deg, rgba(255,212,59,0.18), var(--bg-card));
}
.bio-stats .stat-badge.goal .stat-val { color: #ffd43b; }
.bio-stats .stat-badge.yellow .stat-val { color: #ffd43b; }
.bio-stats .stat-badge.red .stat-val { color: #ff6b6b; }

.bio-stats .stats-matches-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 6px 0 10px;
}
.bio-stats .stats-matches-title .muted {
  opacity: 0.6;
  font-weight: 600;
}

.bio-stats .stats-matches {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}
.bio-stats .stats-matches::-webkit-scrollbar { width: 6px; }
.bio-stats .stats-matches::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.bio-stats .match-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.bio-stats .match-row.dnp {
  opacity: 0.45;
  background: transparent;
}

.bio-stats .match-round {
  font-weight: 900;
  color: var(--accent);
  background: var(--primary);
  border-radius: 6px;
  padding: 4px 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.5px;
}
.bio-stats .match-row.dnp .match-round {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.bio-stats .match-fixture {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.bio-stats .match-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.bio-stats .match-opp {
  font-weight: 700;
  color: var(--text);
}
.bio-stats .match-score {
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.bio-stats .match-date {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.75;
}
.bio-stats .match-ha {
  display: inline-block;
  width: 18px; height: 18px;
  font-size: 10px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  border-radius: 4px;
}
.bio-stats .match-ha.home { background: var(--primary); color: var(--accent); }
.bio-stats .match-ha.away { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.bio-stats .match-result {
  display: inline-block;
  width: 18px; height: 18px;
  font-size: 10px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  border-radius: 4px;
  margin-left: auto;
}
.bio-stats .match-result.win { background: #2ecc71; color: #fff; }
.bio-stats .match-result.draw { background: #6d6d6d; color: #fff; }
.bio-stats .match-result.loss { background: #e11d28; color: #fff; }

.bio-stats .match-events {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  max-width: 200px;
}
.bio-stats .ev {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,0,0,0.2);
  color: var(--text);
  white-space: nowrap;
}
.bio-stats .ev.starter { background: rgba(46,204,113,0.18); color: #6ee6a0; }
.bio-stats .ev.subin   { background: rgba(46,204,113,0.14); color: #6ee6a0; }
.bio-stats .ev.subout  { background: rgba(225,29,40,0.18);  color: #ffa3a9; }
.bio-stats .ev.goal    { background: rgba(255,212,59,0.2); color: #ffd43b; }
.bio-stats .ev.yellow  { background: rgba(255,212,59,0.14); color: #ffd43b; }
.bio-stats .ev.red     { background: rgba(225,29,40,0.2); color: #ffb3b8; }
.bio-stats .ev.dnp     { background: transparent; color: var(--text-muted); opacity: 0.5; font-weight: 600; }

@media (max-width: 560px) {
  .bio-stats { padding: 18px 22px 4px; }
  .bio-stats .match-row {
    grid-template-columns: 40px 1fr;
    gap: 8px;
  }
  .bio-stats .match-events {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: 100%;
    padding-left: 48px;
  }
  .bio-stats .stat-badges {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================
   STATISTIKA PAGE
   ========================================================== */
.team-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}
.team-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.team-tile:hover { transform: translateY(-2px); border-color: var(--primary-light); }
.team-tile .tt-val {
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.1;
}
.team-tile .tt-lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}
.team-tile.win    { border-color: rgba(46,204,113,0.5); }
.team-tile.win    .tt-val { color: #6ee6a0; }
.team-tile.loss   { border-color: rgba(225,29,40,0.6); }
.team-tile.loss   .tt-val { color: #ffa3a9; }
.team-tile.draw   .tt-val { color: var(--text-muted); }
.team-tile.primary { border-color: var(--primary); }

/* Leaderboards grid */
.leaderboards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.leaderboard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.lb-header {
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(225,29,40,0.1), transparent);
}
.lb-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--accent);
}
.lb-header .lb-sub {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}
.lb-body { padding: 8px 0; }
.lb-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.lb-row:last-child { border-bottom: none; }
.lb-rank {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-muted);
  text-align: center;
}
.lb-row:nth-child(1) .lb-rank { color: #ffd43b; font-size: 18px; }
.lb-row:nth-child(2) .lb-rank { color: #cbd5dc; font-size: 16px; }
.lb-row:nth-child(3) .lb-rank { color: #e09260; font-size: 15px; }
.lb-name .lb-n-main {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.lb-name .lb-n-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.lb-val {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.lb-big {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.lb-big.y { color: #ffd43b; }
.lb-big.r { color: #ff6b6b; font-size: 14px; }
.lb-tiny {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}
.lb-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Full squad table */
.squad-stats-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow-x: auto;
}
.squad-stats-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  color: var(--text);
}
.squad-stats-table thead th {
  background: rgba(0,0,0,0.2);
  padding: 12px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.squad-stats-table thead th:nth-child(2),
.squad-stats-table thead th:nth-child(3) { text-align: left; }
.squad-stats-table tbody td {
  padding: 11px 10px;
  font-size: 13px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
}
.squad-stats-table tbody tr:last-child td { border-bottom: none; }
.squad-stats-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.squad-stats-table .sq-num {
  font-weight: 900;
  color: var(--accent);
  width: 44px;
}
.squad-stats-table .sq-name {
  text-align: left;
  font-weight: 700;
}
.squad-stats-table .sq-name a { color: var(--text); text-decoration: none; }
.squad-stats-table .sq-name a:hover { color: var(--primary-light); }
.squad-stats-table .sq-pos {
  text-align: left;
  color: var(--text-muted);
  font-size: 12px;
}
.squad-stats-table .hi-goal { color: #ffd43b; font-weight: 900; }
.squad-stats-table .hi-yel  { color: #ffd43b; font-weight: 900; }
.squad-stats-table .hi-red  { color: #ff6b6b; font-weight: 900; }

/* ==========================================================
   NEWS CARD — SHARE ROW (list view)
   ========================================================== */
.news-card.has-share { display: flex; flex-direction: column; }
.news-card-main {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  flex: 1;
}
.news-card.has-share:hover .news-image.has-photo { background-size: 110%; }

.news-share-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.12);
}
.ns-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition: all 0.15s ease;
}
.ns-ico {
  width: 14px;
  height: 14px;
  line-height: 1;
  display: block;
}
span.ns-ico {
  font-size: 14px;
  font-weight: 900;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  width: auto; height: auto;
}
.ns-btn:hover { color: var(--accent); background: rgba(255,255,255,0.08); }
.ns-btn.fb:hover   { background: #1877f2; color: #fff; }
.ns-btn.wa:hover   { background: #25d366; color: #fff; }
.ns-btn.vi:hover   { background: #7360f2; color: #fff; }
.ns-btn.copy:hover { background: var(--primary); color: var(--accent); }
.ns-btn.copied {
  background: #2ecc71 !important;
  color: #fff !important;
}

@media (max-width: 460px) {
  .news-share-row { padding: 7px 12px; gap: 4px; }
}

/* ==========================================================
   ARTICLE PAGE (vijest.php)
   ========================================================== */
.article-page { background: linear-gradient(180deg, rgba(0,0,0,0.2), transparent 240px); }
.article-hero {
  position: relative;
  min-height: 340px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 60px 0 30px;
  border-bottom: 1px solid var(--border);
}
.article-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(26,6,9,0.75) 70%, rgba(26,6,9,1) 100%);
  pointer-events: none;
}
.article-hero .container { position: relative; z-index: 1; }
.article-hero-solid {
  min-height: 220px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.article-hero-solid .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.article-cat {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary);
  color: var(--accent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.article-score {
  font-size: 72px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 2px;
  line-height: 1;
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.article-body-wrap {
  max-width: 780px;
  padding-top: 32px;
  padding-bottom: 40px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.article-date { }
.article-score-inline {
  padding: 3px 10px;
  background: var(--primary);
  color: var(--accent);
  border-radius: 6px;
  font-size: 13px;
  letter-spacing: 0.6px;
}
.article-title {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.18;
  color: var(--accent);
  margin: 0 0 18px;
}
.article-excerpt {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 24px;
}
.article-excerpt strong { color: var(--accent); font-weight: 800; }
.article-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}
.article-body p { margin-bottom: 14px; }
.article-body img { max-width: 100%; border-radius: 10px; margin: 16px 0; }

.article-share {
  margin: 30px 0 20px;
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.article-share .share-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 6px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.share-btn:hover { transform: translateY(-1px); border-color: var(--primary); }
.share-btn.fb:hover   { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-btn.wa:hover   { background: #25d366; color: #fff; border-color: #25d366; }
.share-btn.tw:hover   { background: #000; color: #fff; border-color: #000; }
.share-btn.vi:hover   { background: #7360f2; color: #fff; border-color: #7360f2; }
.share-btn.copy:hover { background: var(--primary); color: var(--accent); border-color: var(--primary); }

.article-back {
  margin-top: 20px;
}
.article-back a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.article-back a:hover { color: var(--accent); }

@media (max-width: 620px) {
  .article-hero { min-height: 240px; padding: 40px 0 20px; }
  .article-title { font-size: 26px; }
  .article-excerpt { font-size: 16px; }
  .article-score { font-size: 52px; }
}

/* ==========================================================
   STATISTIKA — HERO DONUT + CHARTS
   ========================================================== */
.stats-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.stats-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(225,29,40,0.14), transparent 60%);
  pointer-events: none;
}
.stats-hero-chart {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto;
}
.donut-svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(-3deg);
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.3));
}
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.donut-center .dc-big {
  font-size: 42px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.donut-center .dc-small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}
.donut-center .dc-pct {
  font-size: 12px;
  font-weight: 800;
  color: #ffd43b;
  margin-top: 8px;
  padding: 3px 10px;
  background: rgba(255,212,59,0.12);
  border-radius: 999px;
}
.stats-hero-tiles { position: relative; z-index: 1; }
.stats-hero-tiles .team-stats { margin-bottom: 0; }
@media (max-width: 780px) {
  .stats-hero { grid-template-columns: 1fr; padding: 18px; }
  .stats-hero-chart { width: 200px; height: 200px; }
  .donut-center .dc-big { font-size: 34px; }
}

/* Chart cards */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  position: relative;
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.chart-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
}
.chart-head .chart-sub {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}
.chart-tot {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.chart-tot-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  padding: 4px 10px;
  background: rgba(0,0,0,0.2);
  border-radius: 999px;
}
.chart-tot-item .ct-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.chart-tot-item.win .ct-dot { background: #e11d28; }
.chart-tot-item.loss .ct-dot { background: rgba(255,255,255,0.4); }

.charts-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

/* Form strip */
.form-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.form-box {
  flex: 1 1 60px;
  min-width: 60px;
  max-width: 70px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 10px 4px 8px;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
  cursor: default;
  transition: transform 0.15s ease;
}
.form-box:hover { transform: translateY(-2px); }
.form-box.win  { background: rgba(46,204,113,0.18); border-color: rgba(46,204,113,0.4); }
.form-box.draw { background: rgba(173,181,189,0.12); border-color: rgba(173,181,189,0.3); }
.form-box.loss { background: rgba(225,29,40,0.18); border-color: rgba(225,29,40,0.4); }
.form-box .fb-letter {
  font-size: 18px; font-weight: 900; color: var(--accent); line-height: 1;
}
.form-box.win .fb-letter  { color: #6ee6a0; }
.form-box.loss .fb-letter { color: #ffa3a9; }
.form-box.draw .fb-letter { color: #cbd5dc; }
.form-box .fb-score {
  font-size: 12px; font-weight: 800; color: var(--text); margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.form-box .fb-round {
  font-size: 9px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.8px; margin-top: 4px; text-transform: uppercase;
}
.form-legend {
  display: flex;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.fl-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.6px;
}
.fl-dot { width: 10px; height: 10px; border-radius: 50%; }
.fl-dot.win  { background: #6ee6a0; }
.fl-dot.draw { background: #cbd5dc; }
.fl-dot.loss { background: #ffa3a9; }

/* Line/Bar SVGs */
.line-svg, .bars-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Goal share */
.gs-bar {
  display: flex;
  width: 100%;
  height: 18px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  background: rgba(0,0,0,0.25);
}
.gs-seg {
  min-width: 2px;
  height: 100%;
  transition: opacity 0.15s ease;
}
.gs-seg:hover { opacity: 0.85; }
.gs-list { display: flex; flex-direction: column; gap: 6px; }
.gs-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.gs-row:last-child { border-bottom: none; }
.gs-swatch {
  width: 10px; height: 10px; border-radius: 3px;
}
.gs-name {
  color: var(--text);
  font-weight: 700;
}
.gs-name em {
  font-style: normal;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  margin-left: 6px;
}
.gs-val {
  font-weight: 900;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* Horizontal minutes bars */
.hbars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hb-row {
  display: grid;
  grid-template-columns: 130px 1fr 52px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.hb-name {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hb-track {
  height: 12px;
  background: rgba(0,0,0,0.25);
  border-radius: 6px;
  overflow: hidden;
}
.hb-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 6px;
  transition: width 0.6s ease;
}
.hb-val {
  text-align: right;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .hb-row { grid-template-columns: 100px 1fr 44px; }
}

/* Home-page top scorers strip */
.top-scorers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.ts-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px 12px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.ts-card:hover { transform: translateY(-2px); border-color: var(--primary-light); }
.ts-card .ts-rank {
  position: absolute;
  top: -10px; left: 12px;
  background: var(--primary);
  color: var(--accent);
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 3px 10px rgba(225,29,40,0.4);
}
.ts-card .ts-goals {
  font-size: 30px;
  font-weight: 900;
  color: #ffd43b;
  line-height: 1;
}
.ts-card .ts-goals span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
  margin-left: 4px;
}
.ts-card .ts-name {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 800;
}
.ts-card .ts-pos {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 720px) {
  .team-tile .tt-val { font-size: 26px; }
  .team-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================
   STATISTIKA — MOBILE POLISH
   ========================================================== */
@media (max-width: 600px) {
  /* Page header tighter */
  .page-header h1 { font-size: 28px; }

  /* Team tiles — 4-column at 4x2 grid with compact values */
  .team-stats { gap: 8px; }
  .team-tile {
    padding: 12px 6px;
    border-radius: 10px;
  }
  .team-tile .tt-val { font-size: 22px; }
  .team-tile .tt-lbl { font-size: 9px; letter-spacing: 1px; margin-top: 2px; }

  /* Hero donut + tiles stack, smaller donut */
  .stats-hero { padding: 16px; gap: 16px; }
  .stats-hero-chart { width: 180px; height: 180px; }
  .donut-center .dc-big   { font-size: 30px; }
  .donut-center .dc-small { font-size: 10px; }
  .donut-center .dc-pct   { font-size: 11px; padding: 2px 8px; }

  /* Chart cards — tighter padding */
  .chart-card { padding: 14px; border-radius: 12px; }
  .chart-head { margin-bottom: 10px; gap: 8px; }
  .chart-head h3 { font-size: 15px; }
  .chart-head .chart-sub { font-size: 10px; letter-spacing: 1px; }

  /* Form strip — 5 per row, 2 rows, bigger squares */
  .form-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .form-box {
    flex: none;
    min-width: 0;
    max-width: none;
    padding: 8px 2px 6px;
  }
  .form-box .fb-letter { font-size: 16px; }
  .form-box .fb-score  { font-size: 11px; }
  .form-box .fb-round  { font-size: 8px; }
  .form-legend { gap: 10px; margin-top: 10px; }
  .fl-item { font-size: 10px; }

  /* Goals chart — scroll horizontally to keep bars readable */
  .bars-svg {
    min-width: 560px;
    height: 220px;
  }
  #goalsChart {
    display: block;
  }
  .chart-card.has-scroll-x .chart-head { position: sticky; left: 0; }
  .chart-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -14px;
    padding: 0 14px;
  }
  .chart-scroll-wrap::-webkit-scrollbar { height: 5px; }
  .chart-scroll-wrap::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
  }

  /* Points line — slightly smaller text */
  .line-svg { height: 200px; }

  /* Goal share — compact rows */
  .gs-row { grid-template-columns: 12px 1fr auto; gap: 8px; font-size: 12px; padding: 3px 0; }
  .gs-name em { display: block; margin-left: 0; margin-top: 1px; font-size: 10px; }
  .gs-bar { height: 14px; margin-bottom: 10px; }

  /* Minutes bars — tighter */
  .hbars { gap: 6px; }
  .hb-row { grid-template-columns: 92px 1fr 42px; gap: 8px; font-size: 12px; }
  .hb-name { font-size: 12px; }
  .hb-val  { font-size: 11px; }
  .hb-track { height: 10px; }

  /* Leaderboards — tighter rows */
  .leaderboards-grid { gap: 12px; }
  .leaderboard { border-radius: 12px; }
  .lb-header { padding: 12px 14px 8px; }
  .lb-header h3 { font-size: 15px; }
  .lb-row { padding: 8px 14px; gap: 8px; grid-template-columns: 28px 1fr auto; }
  .lb-rank { font-size: 12px; }
  .lb-name .lb-n-main { font-size: 13px; }
  .lb-name .lb-n-sub  { font-size: 10px; }
  .lb-big { font-size: 18px; }
  .lb-tiny { font-size: 9px; }

  /* Squad table hint */
  .squad-stats-wrap { border-radius: 12px; }
  .squad-stats-wrap::after {
    content: '← pomjeri →';
    display: block;
    text-align: center;
    padding: 8px;
    font-size: 10px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.15);
  }

  /* Section padding compression */
  .section { padding: 28px 0; }
}

@media (max-width: 400px) {
  .team-stats { grid-template-columns: repeat(2, 1fr); }
  .stats-hero-chart { width: 160px; height: 160px; }
  .donut-center .dc-big { font-size: 26px; }
  .form-strip { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .form-box { padding: 6px 2px 4px; }
  .form-box .fb-letter { font-size: 14px; }
  .form-box .fb-score  { font-size: 10px; }
  .form-box .fb-round  { font-size: 8px; }
  .hb-row { grid-template-columns: 80px 1fr 36px; }
}
