/* ============================================================
   EUPHORIA – Public Site CSS  (completo, versione corretta)
   Font: Barlow Condensed + DM Sans
   ============================================================ */

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

:root {
  /* Base palette */
  --c-bg:         #080c12;
  --c-bg2:        #0f1520;
  --c-card:       #131c2a;
  --c-border:     #1e2d40;
  --c-text:       #d4e2f4;
  --c-muted:      #5a7a99;
  --c-dim:        #2a3d54;
  /* Accent colors */
  --c-purple:     #8b5cf6;
  --c-purple-d:   #7c3aed;
  --c-purple-dim: rgba(139,92,246,.35);
  --c-purple-bg:  rgba(139,92,246,.1);
  --c-green:      #00e676;
  --c-green-d:    #00c85e;
  --c-orange:     #ff7043;
  --c-yellow:     #ffd740;
  --c-blue:       #448aff;
  --c-red:        #ff5252;
  /* Layout */
  --nav-h:        64px;
  --r:            10px;
  --r-lg:         16px;
  --sh:           0 8px 32px rgba(0,0,0,.5);
}

html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
}
a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ─── NAV ─────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(8,12,18,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }
.brand-icon { font-size: 1.6rem; }
.brand-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--c-purple);
  letter-spacing: 1px;
  line-height: 1;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: var(--r);
  color: var(--c-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(139,92,246,.1);
  color: var(--c-purple);
  text-decoration: none;
}
.nav-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,82,82,.12) !important;
  color: var(--c-red) !important;
  border: 1px solid rgba(255,82,82,.25);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.nav-live-dot:hover { background: rgba(255,82,82,.2) !important; }
.live-dot {
  width: 7px;
  height: 7px;
  background: var(--c-red);
  border-radius: 50%;
  animation: blink 1.2s infinite;
  flex-shrink: 0;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }
.nav-hamburger {
  display: none;
  font-size: 1.4rem;
  background: none;
  border: none;
  color: var(--c-text);
  cursor: pointer;
  padding: 4px;
}

/* ─── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 72px 20px 60px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139,92,246,.1) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(68,138,255,.06) 0%, transparent 60%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-block;
  background: rgba(139,92,246,.12);
  border: 1px solid rgba(139,92,246,.25);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--c-purple);
  text-transform: uppercase;
  margin-bottom: 20px;
  position: relative;
}
.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: .5px;
  position: relative;
}
.brand-hero {
  font-style: italic;
  color: var(--c-purple);
  display: block;
  line-height: 1;
}
.hero p {
  margin: 16px auto 32px;
  max-width: 520px;
  color: var(--c-muted);
  font-size: 1.05rem;
  position: relative;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 40px auto 0;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 20px 32px;
  max-width: 580px;
  position: relative;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}
.hero-stat strong {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--c-text);
  line-height: 1;
}
.hero-stat span {
  font-size: .7rem;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 4px;
}
.hero-stat.live-stat strong { color: var(--c-red); }
.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--c-border);
  flex-shrink: 0;
}

/* ─── CONTAINER ───────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── SECTIONS ────────────────────────────────────────────── */
.section { padding: 52px 0; }
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: .5px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

/* ─── SPORT PILLS ─────────────────────────────────────────── */
.sport-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.sport-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 24px;
  padding: 9px 20px;
  color: var(--c-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
  text-decoration: none;
}
.sport-pill:hover {
  border-color: var(--c-purple-dim);
  color: var(--c-purple);
  background: var(--c-purple-bg);
  text-decoration: none;
  transform: translateY(-2px);
}

/* ─── TORNEO CARDS ────────────────────────────────────────── */
.tournaments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
  gap: 20px;
}
.torneo-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all .22s;
  display: flex;
  flex-direction: column;
}
.torneo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh);
  border-color: var(--c-purple-dim);
}
.torneo-card-top {
  padding: 20px;
  background: linear-gradient(135deg, rgba(139,92,246,.06), transparent);
  border-bottom: 1px solid var(--c-border);
}
.torneo-sport-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.torneo-sport { font-size: 2rem; }
.torneo-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 8px;
  color: var(--c-text);
}
.torneo-cat {
  display: inline-block;
  background: rgba(139,92,246,.12);
  color: var(--c-purple);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.torneo-card-body {
  padding: 14px 20px;
  flex: 1;
}
.torneo-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.torneo-meta-item {
  color: var(--c-muted);
  font-size: .83rem;
}
.torneo-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--c-border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── MATCH ROWS ──────────────────────────────────────────── */
.matches-list { display: flex; flex-direction: column; gap: 8px; }
.match-row {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: 12px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.match-row:hover {
  border-color: rgba(139,92,246,.2);
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.match-row.live-row {
  border-color: rgba(255,82,82,.35);
  background: rgba(255,82,82,.04);
  animation: livePulse 3s infinite;
}
@keyframes livePulse {
  0%,100%{border-color:rgba(255,82,82,.35)}
  50%{border-color:rgba(255,82,82,.6)}
}
.match-team {
  font-weight: 600;
  font-size: .93rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-team.home { text-align: right; }
.match-team.away { text-align: left; }
.match-score {
  text-align: center;
  min-width: 100px;
  flex-shrink: 0;
}
.match-score .score {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 3px;
  display: block;
  color: var(--c-text);
}
.match-score .score-vs {
  font-size: .75rem;
  color: var(--c-muted);
  display: block;
  font-weight: 500;
}
.match-score .score-time {
  font-size: .7rem;
  color: var(--c-muted);
  display: block;
  margin-top: 2px;
}

/* ─── STANDINGS TABLE ─────────────────────────────────────── */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .87rem;
}
.standings-table thead th {
  background: rgba(255,255,255,.025);
  color: var(--c-muted);
  font-size: .68rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.standings-table thead th:nth-child(2) { text-align: left; }
.standings-table tbody tr {
  border-bottom: 1px solid rgba(30,45,64,.7);
  transition: background .15s;
}
.standings-table tbody tr:hover { background: rgba(255,255,255,.03); }
.standings-table td {
  padding: 11px 14px;
  text-align: center;
  vertical-align: middle;
}
.standings-table td:nth-child(2) { text-align: left; }
.standings-table .pts {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--c-purple);
}
.standings-table .qualified {
  border-left: 3px solid var(--c-purple);
}
.standings-table .qualified td:nth-child(2) {
  color: var(--c-text);
}
.pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: .78rem;
  font-weight: 700;
  background: var(--c-dim);
  color: var(--c-muted);
}
.pos-badge.p1 { background: var(--c-yellow); color: #000; }
.pos-badge.p2 { background: #b0bec5; color: #000; }
.pos-badge.p3 { background: #a0785a; color: #fff; }

/* ─── BRACKET PUBLIC ──────────────────────────────────────── */
.bracket-public {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 16px 4px 24px;
  align-items: stretch;
  scrollbar-width: thin;
  scrollbar-color: var(--c-dim) transparent;
}
.bracket-public::-webkit-scrollbar { height: 6px; }
.bracket-public::-webkit-scrollbar-track { background: transparent; }
.bracket-public::-webkit-scrollbar-thumb { background: var(--c-dim); border-radius: 3px; }

.bracket-col {
  min-width: 190px;
  flex: 1 1 190px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bracket-col-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-purple);
  text-align: center;
  background: rgba(139,92,246,.07);
  border: 1px solid rgba(139,92,246,.18);
  border-radius: 6px;
  padding: 7px 10px;
  margin-bottom: 2px;
}

.bm-public {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.bm-public:hover {
  border-color: var(--c-purple-dim);
  box-shadow: 0 4px 20px rgba(139,92,246,.15);
  transform: translateY(-1px);
}

.bm-public .bm-team {
  padding: 9px 12px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--c-border);
  transition: background .15s;
}
.bm-public .bm-team:last-of-type { border-bottom: none; }

.bm-public .bm-team span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-public .bm-team.winner {
  background: rgba(139,92,246,.1);
  color: var(--c-purple);
  font-weight: 700;
}
.bm-public .bm-team.winner::before {
  content: '●';
  font-size: .5rem;
  color: var(--c-purple);
  flex-shrink: 0;
}

.bm-public .bm-vs {
  text-align: center;
  color: var(--c-muted);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 0;
  background: rgba(255,255,255,.02);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.winner-cell { color: var(--c-purple); font-weight: 600; }

/* ─── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-border);
}
.card-header h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}
.card-body { padding: 20px; }
.card-body.p0 { padding: 0; }
.mb-20 { margin-bottom: 20px; }

/* ─── NEWS ────────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 16px;
}
.news-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all .22s;
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh);
  border-color: var(--c-purple-dim);
}
.news-card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-text);
}
.news-card-meta { color: var(--c-muted); font-size: .75rem; }
.news-card-body {
  color: var(--c-muted);
  font-size: .85rem;
  line-height: 1.6;
  flex: 1;
}
.news-tag {
  display: inline-block;
  background: rgba(139,92,246,.12);
  color: var(--c-purple);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: .7rem;
  font-weight: 600;
}

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn-primary  { background: var(--c-purple);   color: #fff; }
.btn-primary:hover  { background: var(--c-purple-d); }
.btn-outline  { background: transparent; border-color: var(--c-dim); color: var(--c-muted); }
.btn-outline:hover  { border-color: var(--c-purple-dim); color: var(--c-purple); }
.btn-danger   { background: rgba(255,82,82,.12); border-color: rgba(255,82,82,.3); color: var(--c-red); }
.btn-danger:hover   { background: rgba(255,82,82,.22); }
.btn-success  { background: rgba(0,230,118,.12); border-color: rgba(0,230,118,.3); color: var(--c-green); }
.btn-success:hover  { background: rgba(0,230,118,.22); }
.btn-sm  { padding: 5px 12px; font-size: .8rem; }
.btn-xs  { padding: 3px 8px; font-size: .72rem; border-radius: 5px; }

/* ─── BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-success   { background:rgba(0,230,118,.15);   color:var(--c-green); }
.badge-warning   { background:rgba(255,112,67,.15);  color:var(--c-orange); }
.badge-info      { background:rgba(68,138,255,.15);  color:var(--c-blue); }
.badge-secondary { background:rgba(90,122,153,.15);  color:var(--c-muted); }
.badge-danger    { background:rgba(255,82,82,.15);   color:var(--c-red); }
.badge-purple    { background:rgba(139,92,246,.15);  color:var(--c-purple); }
.badge-live      { background:rgba(255,82,82,.2); color:var(--c-red); animation: blink 1.2s infinite; }

/* ─── TABS ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--c-muted);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: -1px;
  font-family: inherit;
}
.tab-btn:hover { color: var(--c-text); }
.tab-btn.active { color: var(--c-purple); border-bottom-color: var(--c-purple); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── LIVE INDICATOR ─────────────────────────────────────── */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,82,82,.1);
  border: 1px solid rgba(255,82,82,.3);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--c-red);
  text-transform: uppercase;
}

/* ─── EMPTY STATE ─────────────────────────────────────────── */
.empty-pub {
  text-align: center;
  padding: 60px 20px;
  color: var(--c-muted);
}
.empty-pub span { font-size: 3.5rem; display: block; margin-bottom: 12px; }

/* ─── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--c-bg2);
  border-top: 1px solid var(--c-border);
  padding: 36px 20px;
  text-align: center;
  color: var(--c-muted);
  font-size: .84rem;
}
.footer-brand {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--c-text);
}
.brand-footer { color: var(--c-purple); }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.footer-links a { color: var(--c-muted); font-size: .84rem; }
.footer-links a:hover { color: var(--c-purple); text-decoration: none; }

/* ─── SKELETON ────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,var(--c-border) 25%,var(--c-dim) 50%,var(--c-border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  height: 16px;
}
@keyframes shimmer { from{background-position:200% 0} to{background-position:-200% 0} }

/* ═══════════════════════════════════════════════════════════
   BRACKET ENGINE — Connettori a L + allineamento verticale
   Stesso sistema usato in bracket.php e tournament.php
   ═══════════════════════════════════════════════════════════ */

/* ── Wrapper scrollabile ─────────────────────────────────── */
.bracket-wrap {
  overflow-x: auto;
  overflow-y: visible;
  padding: 32px 0 48px;
  scrollbar-width: thin;
  scrollbar-color: var(--c-dim) transparent;
}
.bracket-wrap::-webkit-scrollbar { height: 5px; }
.bracket-wrap::-webkit-scrollbar-thumb { background: var(--c-dim); border-radius: 3px; }

/* ── Area principale ─────────────────────────────────────── */
.bracket-svg-area {
  display: flex;
  align-items: center;
  min-width: max-content;
  gap: 0;
  padding: 0 24px;
  position: relative;
}

/* ── Colonna per round ───────────────────────────────────── */
.bracket-round-col {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  min-width: 210px;
  position: relative;
}

/* ── Header round ────────────────────────────────────────── */
.bracket-round-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--c-purple);
  text-align: center;
  background: rgba(139,92,246,.08);
  border: 1px solid rgba(139,92,246,.2);
  border-radius: 6px;
  padding: 6px 12px;
  margin: 0 12px 18px;
  white-space: nowrap;
}

/* ── Slot wrapper (contiene card + connettori) ───────────── */
.bracket-slot {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 12px;
  flex: 1;
}

/* ── Match card ──────────────────────────────────────────── */
.bracket-match-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  position: relative;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  box-shadow: 0 2px 14px rgba(0,0,0,.35);
}
.bracket-match-card:hover {
  border-color: var(--c-purple-dim);
  box-shadow: 0 6px 24px rgba(139,92,246,.2);
  transform: translateY(-2px);
}
.bracket-match-card.finale {
  border-color: rgba(139,92,246,.45);
  background: linear-gradient(160deg, rgba(139,92,246,.1) 0%, var(--c-card) 60%);
}
.bracket-match-card.terzo-posto {
  border-color: rgba(251,191,36,.35);
  background: linear-gradient(160deg, rgba(251,191,36,.07) 0%, var(--c-card) 60%);
}

/* ── Team row ────────────────────────────────────────────── */
.bm-team-row {
  display: flex;
  align-items: center;
  padding: 9px 14px;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background .15s;
  min-height: 40px;
}
.bm-team-row:last-of-type { border-bottom: none; }
.bm-team-row.winner { background: rgba(139,92,246,.12); }
.bm-team-row.loser  { opacity: .44; }

.bm-team-name {
  font-size: .86rem;
  font-weight: 500;
  color: var(--c-text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bm-team-name.tbd { color: var(--c-muted); font-style: italic; font-weight: 400; }
.bm-team-row.winner .bm-team-name { color: var(--c-purple); font-weight: 700; }

/* ── Score badge ─────────────────────────────────────────── */
.bm-score {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--c-muted);
  min-width: 18px;
  text-align: center;
}
.bm-team-row.winner .bm-score { color: var(--c-purple); }

/* ── VS divider tra le due squadre ──────────────────────── */
.bm-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px 14px;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-dim);
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid rgba(255,255,255,.04);
}

/* ── Connettori SVG (disegnati via JS) ───────────────────── */
.bracket-connectors-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* ── Champion centerpiece ────────────────────────────────── */
.champion-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 0 16px;
}
.champion-col-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #fbbf24;
  text-align: center;
  background: rgba(251,191,36,.08);
  border: 1px solid rgba(251,191,36,.25);
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 18px;
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
}
.champion-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.champion-box-inner {
  background: linear-gradient(160deg, rgba(251,191,36,.15), rgba(251,191,36,.04));
  border: 2px solid rgba(251,191,36,.4);
  border-radius: 18px;
  padding: 24px 28px;
  text-align: center;
  box-shadow: 0 0 40px rgba(251,191,36,.12);
}
.champion-trophy {
  font-size: 3.8rem;
  display: block;
  animation: trophyPulse 2.5s ease-in-out infinite;
  line-height: 1;
}
@keyframes trophyPulse {
  0%,100% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 8px rgba(251,191,36,.3)); }
  50%      { transform: scale(1.07) translateY(-3px); filter: drop-shadow(0 0 20px rgba(251,191,36,.6)); }
}
.champion-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fbbf24;
  margin-top: 14px;
}
.champion-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--c-text);
  margin-top: 6px;
  letter-spacing: .5px;
}

/* ── Empty / Legend ──────────────────────────────────────── */
.bracket-empty { text-align:center; padding:80px 20px; color:var(--c-muted); }
.bracket-empty-icon { font-size:4rem; display:block; margin-bottom:16px; }
.bracket-legend { display:flex; gap:20px; flex-wrap:wrap; margin-bottom:20px; font-size:.78rem; color:var(--c-muted); }
.legend-item { display:flex; align-items:center; gap:6px; }
.legend-dot { width:10px; height:10px; border-radius:50%; }
.legend-purple { background:var(--c-purple); }
.legend-gold   { background:#fbbf24; }
.legend-gray   { background:var(--c-dim); }

/* ── Bracket PUBLIC mini (in tournament.php) ─────────────── */
.bracket-public {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 20px 4px 28px;
  min-width: max-content;
  scrollbar-width: thin;
  scrollbar-color: var(--c-dim) transparent;
}
.bracket-public::-webkit-scrollbar { height: 5px; }
.bracket-public::-webkit-scrollbar-thumb { background: var(--c-dim); border-radius: 3px; }

.bracket-col {
  min-width: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex-shrink: 0;
  position: relative;
}
.bracket-col-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-purple);
  text-align: center;
  background: rgba(139,92,246,.07);
  border: 1px solid rgba(139,92,246,.18);
  border-radius: 6px;
  padding: 6px 10px;
  margin: 0 10px 14px;
}

/* Card mini usata in bracket-public */
.bm-public {
  margin: 6px 10px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  position: relative;
}
.bm-public:hover {
  border-color: var(--c-purple-dim);
  box-shadow: 0 4px 16px rgba(139,92,246,.18);
  transform: translateY(-1px);
}
.bm-public .bm-team {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--c-text);
  border-bottom: 1px solid rgba(255,255,255,.05);
  min-height: 34px;
}
.bm-public .bm-team:last-of-type { border-bottom: none; }
.bm-public .bm-team span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bm-public .bm-team.winner {
  background: rgba(139,92,246,.1);
  color: var(--c-purple);
  font-weight: 700;
}
.bm-public .bm-team.winner::before {
  content: '▶';
  font-size: .45rem;
  color: var(--c-purple);
  flex-shrink: 0;
}
.bm-public .bm-vs {
  text-align: center;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-dim);
  padding: 3px 0;
  background: rgba(255,255,255,.02);
  border-top: 1px solid rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.winner-cell { color: var(--c-purple); font-weight: 600; }

/* Champion mini (in tournament.php) */
.bracket-champion-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  padding: 0 12px;
}
.bracket-champion-mini-inner {
  background: linear-gradient(160deg, rgba(251,191,36,.12), rgba(251,191,36,.04));
  border: 1.5px solid rgba(251,191,36,.35);
  border-radius: 14px;
  padding: 16px 18px;
  text-align: center;
}
.bracket-champion-mini-trophy {
  font-size: 2.4rem;
  display: block;
  animation: trophyPulse 2.5s ease-in-out infinite;
}
.bracket-champion-mini-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fbbf24;
  margin-top: 10px;
  display: block;
}
.bracket-champion-mini-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--c-text);
  margin-top: 4px;
  display: block;
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 720px) {
  .nav-links { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--c-bg2); border-bottom: 1px solid var(--c-border); padding: 12px; z-index: 200; flex-direction: column; }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: block; }
  .site-nav { position: relative; }
  .match-row { grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 10px 12px; }
  .match-team { font-size: .82rem; }
  .match-score { min-width: 80px; }
  .match-score .score { font-size: 1.3rem; letter-spacing: 2px; }
  .bracket-col { min-width: 155px; }
  .standings-table td, .standings-table thead th { padding: 9px 8px; font-size: .78rem; }
  .hero-stats { padding: 14px 16px; }
  .hero-stat { padding: 0 12px; }
  .hero-stat strong { font-size: 1.5rem; }
  .bracket-round-col { min-width: 150px; }
}
@media (max-width: 500px) {
  .hero-stats { flex-direction: column; gap: 12px; }
  .hero-stat-divider { width: 40px; height: 1px; }
  .hero-stat { padding: 0; }
  .sport-pills { justify-content: flex-start; }
}
@media (max-width: 900px) {
  .tournaments-grid { grid-template-columns: 1fr; }
}
