/* =========================
   PARTE 1 - GLOBAL SETTINGS
========================= */

/* =========================
   DESIGN SYSTEM
========================= */
:root {
  --bg-main: #0b0f14;
  --bg-secondary: #121820;
  --bg-card: #161d27;

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;

  --brand: #38bdf8;
  --brand-hover: #2ea8e6;
  --state-open: #22c55e;
  --state-full: #ef4444;
  --state-live: #f59e0b;
  --state-final: #8b5cf6;
  --state-finished: #6b7280;

  --border: #3f4a55;
  --radius: 6px;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.4);

  --font: 'Inter', sans-serif;
}


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

body {
  font-family: var(--font);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}


/* =========================
   MAIN HEADER (UNIFIED)
========================= */
.main-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.main-header-container {
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 20px;
}

/* BRAND */
.brand {
  flex-shrink: 0;
}

.brand a {
  display: flex;
  align-items: center;
}

.brand img {
  width: 90px;
  height: auto;
}

/* NAV */
.main-nav {
  display: flex;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.main-nav a {
  padding: 20px 24px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 22px;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-main);
  border-bottom-color: var(--brand);
}


/* =========================
   FOOTER
========================= */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

.footer-container {
  padding: 24px 20px;
}

/* BRAND TOP */
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.footer-brand img {
  width: 38px;
  height: auto;
}

.footer-brand p {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0;
}

/* FOOTER CONTENT - Due colonne */
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 60px;
}

/* SEZIONI */
.footer-section h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  margin-bottom: 10px;
}

.footer-section p,
.footer-section a {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-section p {
  margin-bottom: 4px;
}

.footer-section a {
  display: block;
  text-decoration: none;
  margin-bottom: 4px;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: var(--brand);
}

/* ALLINEAMENTI */
.footer-contacts {
  text-align: left;
}

.footer-legal {
  text-align: right;
}

.footer-nav {
  text-align: center;
}

/* BOTTOM BAR */
.footer-bottom {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}


/* =========================
   CONTAINER
========================= */
.container {
  padding: 24px 16px;
}

.container h2 {
  margin-bottom: 0;
}

.page-header h2 {
  font-size: 66px;
}

/* =========================
   BADGES
========================= */
.badge {
  font-size: 24px;
  font-weight: 1000;
  padding: 14px 18px;
  border-radius: 7px;
  text-transform: uppercase;
}

.badge.open {
  background-color: rgba(34, 197, 94, 0.15);
  color: var(--state-open);
}

.badge.full {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--state-full);
}

.badge.live {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--state-live);
}

.badge.finished {
  background-color: rgba(107, 114, 128, 0.18);
  color: var(--state-finished);
}




/* =========================
   BUTTONS
========================= */

.btn {
  flex: 1;
  text-align: center;
  padding: 16px;
  border-radius: var(--radius);
  font-size: 29px;
  font-weight: 1000;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.btn.primary {
  background-color: var(--brand);
  color: #000;
}

.btn.primary:hover {
  background-color: var(--brand-hover);
  transform: translateY(-1px);
}

.btn.secondary {
  background-color: transparent;
  border: 3px solid var(--border);
  color: var(--text-main);
}

.btn.secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}

.btn.disabled {
  background-color: #374151;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn.disabled:hover {
  transform: none;
  border-color: #374151;
  color: #9ca3af;
}



/* =========================
   BUTTON LOADING (INLINE SPINNER)
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* spazio tra spinner e testo */
}

/* Spinner base */
.btn .spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000;
  animation: btn-spin 0.8s linear infinite;
}

/* Animazione */
@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Stato disabled con spinner (coerente) */
.btn.disabled .spinner {
  border-color: rgba(0, 0, 0, 0.2);
  border-top-color: rgba(0, 0, 0, 0.6);
}




/* =========================
   MATCH BUTTON – LOADING VARIANTS
========================= */

/* Spinner su bottone SECONDARY (modifica risultato) */
.match-card .btn.secondary .spinner {
  border-color: rgba(229, 231, 235, 0.35);   /* text-main soft */
  border-top-color: var(--text-main);
}

/* Spinner su bottone PRIMARY (invio risultato) */
.match-card .btn.primary .spinner {
  border-color: rgba(0, 0, 0, 0.25);
  border-top-color: #000;
}

/* Stato disabled nei match (più neutro) */
.match-card .btn.disabled {
  background-color: rgba(55, 65, 81, 0.6);
  border-color: rgba(55, 65, 81, 0.6);
}


.badge.final_phase {
  background-color: rgba(139, 92, 246, 0.15);
  color: var(--state-final);
}


.badge.needs_attention {
  background: #4f44ef;
  color: white;
}



.team-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rank-badge {
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand, #38bdf8);
  color: #0b0f14;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.team-name {
  white-space: nowrap;
}






/* =========================
   UTILITIES
========================= */

/* PLACEHOLDER / ERROR */
.placeholder {
  font-size: 12px;
  color: var(--text-muted);
}

.error {
  color: #ef4444;
  font-size: 12px;
}


/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--brand);
  color: #000;
  padding: 22px 32px;     /* ↓ più compatto */
  border-radius: 10px;
  font-size: 22px;
  font-weight: 700;
  box-shadow: var(--shadow);
  z-index: 999;
}









































/* =========================
   PARTE 2 - HOMEPAGE ("index.html")
========================= */

/* =========================
   PAGE HEADER
========================= */
.page-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}


/* =========================
   SPORT FILTER INLINE (HOMEPAGE)
========================= */
.sport-filter-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  
  padding: 6px 12px;
  border-radius: 8px;
  background-color: rgba(22, 29, 39, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.12);
  backdrop-filter: blur(4px);
  
  transition: border-color 0.2s ease;
}

.sport-filter-inline:hover {
  border-color: rgba(56, 189, 248, 0.25);
}

.sport-filter-inline label {
  font-size: 22px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(156, 163, 175, 0.8);
  white-space: nowrap;
  margin: 0;
}

.sport-filter-inline select {
  padding: 6px 10px;
  font-size: 22px;
  font-weight: 600;
  
  background-color: transparent;
  color: var(--text-main);
  
  border: none;
  border-radius: 4px;
  cursor: pointer;
  
  min-width: 120px;
  
  transition: background-color 0.2s ease;
}

.sport-filter-inline select:hover {
  background-color: rgba(56, 189, 248, 0.08);
}

.sport-filter-inline select:focus {
  outline: none;
  background-color: rgba(56, 189, 248, 0.12);
}

.sport-filter-inline option {
  background-color: var(--bg-secondary);
  color: var(--text-main);
  padding: 8px;
}


/* =========================
   TOURNAMENT LIST
========================= */
.tournament-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.tournament {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.tournament h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.tournament p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tournament a {
  display: inline-block;
  margin-top: 10px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}




/* =========================
   TOURNAMENT CARDS
========================= */
.tournament-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.tournament-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.tournament-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.tournament-card.finished {
  opacity: 0.75;
}

.tournament-card.finished:hover {
  transform: none;
  box-shadow: var(--shadow);
  border-color: var(--border);
}

.tournament-card h3 {
  font-size: 50px;
  line-height: 1.2;
  margin: 0;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 0;
}

/* =========================
   CARD INFO ROWS (NEW)
========================= */
.card-info-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.card-info-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  font-size: 24px;
  color: var(--text-muted);
  line-height: 1.8;
}

.card-info-row .row-icon {
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  font-size: 24px;
}

.card-info-row span:last-child {
  flex: 1;
}

/* Stato finished: opacità ridotta per le info */
.tournament-card.finished .card-info-row {
  opacity: 0.7;
}

/* =========================
   CARD ACTIONS & BUTTONS
========================= */
.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}





/* =========================
   SKELETON UI – TOURNAMENT CARDS
========================= */

.tournament-card.skeleton {
  pointer-events: none;
  cursor: default;

  opacity: 1;
  filter: blur(0);
  transform: scale(1);

  transition:
    opacity 0.35s ease,
    filter 0.35s ease,
    transform 0.35s ease;
}

/* stato di uscita skeleton (fade-out soft) */
.tournament-card.skeleton.fade-out {
  opacity: 0;
  filter: blur(4px);
  transform: scale(0.98);
}


/* disabilita hover effetti */
.tournament-card.skeleton:hover {
  transform: none;
  box-shadow: var(--shadow);
  border-color: var(--border);
}

/* elementi skeleton */
.skeleton-title,
.skeleton-line {
  background: linear-gradient(
    90deg,
    #1f2933 25%,
    #2a3441 37%,
    #1f2933 63%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 4px;
}

/* titolo finto */
.skeleton-title {
  height: 18px;
  width: 65%;
  margin-bottom: 14px;
}

/* righe finte */
.skeleton-line {
  height: 12px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-line.short {
  width: 45%;
}

/* animazione shimmer */
@keyframes skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}























































/* =========================
   PARTE 3 - TOURNAMENT PAGE / REGOLAMENTO PAGE (tournament.html)
========================= */

/* =========================
   VISIBILITÀ BASE SEZIONI
========================= */
#generic-regulation-section,
#tournament-specific-section,
.tournament-skeleton {
  display: block;
}


/* =========================
   PAGINA TORNEO - HEADER BASE
========================= */
.tournament-header {
  margin-bottom: 30px;
}

.tournament-header h1 {
  font-size: 26px;
  margin-bottom: 6px;
}

.tournament-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.tournament-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}


/* =========================
   TOURNAMENT META (INFO) - BASE
========================= */
.tournament-info-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.tournament-info-rows .info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.tournament-info-rows .info-row-icon {
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  font-size: 20px;
}

.tournament-info-rows .info-row span:last-child {
  flex: 1;
}


/* =========================
   FORM ISCRIZIONE - BASE
========================= */
#registration-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 10px;
  counter-reset: form-field;
}

#registration-form > label {
  display: flex;
  flex-direction: column;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.02em;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  padding-left: 48px;
}

#registration-form > label::before {
  counter-increment: form-field;
  content: counter(form-field);
  position: absolute;
  left: 0;
  top: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(56, 189, 248, 0.18);
  color: var(--brand);
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

#registration-form > label:last-of-type {
  border-bottom: none;
}

/* Helper text sotto label */
.field-helper {
  font-size: 17px;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 2px;
  font-style: italic;
  line-height: 1.4;
  font-weight: 400;
}

/* Input fields */
#registration-form input[type="text"],
#registration-form input[type="email"],
#registration-form input[type="tel"] {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 18px;
  font-weight: 400;
  transition: 
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#registration-form input:hover {
  border-color: rgba(56, 189, 248, 0.25);
}

#registration-form input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

#registration-form input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
  font-style: italic;
}

/* Select orario */
#registration-form select {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: 
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

#registration-form select:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background-color: rgba(11, 15, 20, 0.95);
}

#registration-form select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}


/* =========================
   FORM - EXTRA FIELDS CONTAINER
========================= */
#extra-fields-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  counter-reset: extra-field 3;
}

#extra-fields-container > label,
#extra-fields-container > div {
  padding: 20px 0;
  padding-left: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

#extra-fields-container > label::before,
#extra-fields-container > div::before {
  counter-increment: extra-field;
  content: counter(extra-field);
  position: absolute;
  left: 0;
  top: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(56, 189, 248, 0.18);
  color: var(--brand);
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

#extra-fields-container > label:last-child,
#extra-fields-container > div:last-child {
  border-bottom: none;
}


/* =========================
   FORM - EXTRA FIELDS - TITOLI
========================= */
#extra-fields-container .form-field-title {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

#extra-fields-container .form-field-wrapper {
  display: flex;
  flex-direction: column;
}


/* =========================
   FORM - CHECKBOX GROUP (GIORNI)
========================= */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.015);
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(56, 189, 248, 0.08);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: 
    background-color 0.2s ease, 
    border-color 0.2s ease,
    transform 0.15s ease;
}

.checkbox-item:hover {
  background-color: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateX(2px);
}

.checkbox-item:has(input:checked) {
  background-color: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.45);
}

.checkbox-item input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--brand);
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.checkbox-item label {
  cursor: pointer;
  font-size: 20px;
  font-weight: 500;
  color: var(--text-main);
  flex: 1;
  margin: 0;
  user-select: none;
}


/* =========================
   FORM - SUBMIT BUTTON
========================= */
#registration-form button[type="submit"] {
  margin-top: 32px;
  padding: 18px 32px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--brand) 0%, #0ea5e9 100%);
  color: #000;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 
    0 4px 14px rgba(56, 189, 248, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.2);
  transition: 
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

#registration-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(56, 189, 248, 0.5),
    0 4px 10px rgba(0, 0, 0, 0.25);
}

#registration-form button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 8px rgba(56, 189, 248, 0.3),
    0 1px 4px rgba(0, 0, 0, 0.15);
}

#registration-form button[type="submit"].disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}



/* =========================
   FORM - ASTERISCO CAMPI OBBLIGATORI
========================= */
.required-asterisk {
  color: #ef4444;
  font-weight: 700;
  margin-left: 2px;
}

/* =========================
   FORM - NOTA CAMPI OBBLIGATORI
========================= */
.form-required-note {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 20px;
  margin-bottom: 20px;
  font-style: italic;
}

.form-required-note .required-asterisk {
  margin-left: 0;
  margin-right: 4px;
}

/* =========================
   FORM - CAMPO NOTE AGGIUNTIVE (TEXTAREA)
========================= */
#registration-form textarea {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 18px;
  font-weight: 400;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: 
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#registration-form textarea:hover {
  border-color: rgba(56, 189, 248, 0.25);
}

#registration-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

#registration-form textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
  font-style: italic;
}

/* Campo opzionale - stile leggermente diverso */
#registration-form .field-optional {
  opacity: 0.9;
}

/* =========================
   FORM - CHECKBOX ACCETTAZIONE REGOLAMENTO
========================= */
.regulation-acceptance {
  margin-top: 24px;
  padding: 16px;
  background-color: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: var(--radius);
}

.checkbox-acceptance {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.checkbox-acceptance input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--brand);
  flex-shrink: 0;
}

.checkbox-acceptance .checkbox-label {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-main);
}

.checkbox-acceptance .checkbox-label strong {
  color: var(--brand);
}

/* Hover state */
.regulation-acceptance:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background-color: rgba(56, 189, 248, 0.08);
}

/* Checked state */
.regulation-acceptance:has(input:checked) {
  border-color: rgba(56, 189, 248, 0.45);
  background-color: rgba(56, 189, 248, 0.1);
}







/* =========================
   TOURNAMENT TEAMS LIST - BASE
========================= */
.tournament-teams-block {
  margin-top: 26px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.teams-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.teams-block-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0;
}

.teams-block-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(255, 255, 255, 0.03);
}

.teams-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.team-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.35);
  background-color: rgba(56, 189, 248, 0.06);
}

.team-chip-index {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background-color: rgba(56, 189, 248, 0.18);
  color: var(--brand);
  border: 1px solid rgba(56, 189, 248, 0.25);
  flex-shrink: 0;
}

.team-chip-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.teams-empty,
.teams-error {
  padding: 12px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.teams-error {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
  background-color: rgba(239, 68, 68, 0.06);
}




/* =========================
   SKELETON UI (TOURNAMENT TEAMS LIST)
========================= */
.team-chip--skeleton {
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.06);
  background-color: rgba(255, 255, 255, 0.02);
}

.team-chip--skeleton .team-chip-index,
.team-chip--skeleton .team-chip-name {
  color: transparent;
  border: none;
  background: linear-gradient(
    90deg,
    #1f2933 25%,
    #2a3441 37%,
    #1f2933 63%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

.team-chip--skeleton .team-chip-index {
  width: 22px;
}

.team-chip--skeleton .team-chip-name {
  height: 12px;
  width: 120px;
  border-radius: 6px;
}


/* =========================
   REGOLAMENTO – CARDS BASE
========================= */
.generic-regulation-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.regulation-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.regulation-card:hover {
  background-color: rgba(56, 189, 248, 0.05);
  border-color: rgba(56, 189, 248, 0.25);
}

.regulation-icon {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background-color: rgba(56, 189, 248, 0.18);
  color: var(--brand);
  border: 1px solid rgba(56, 189, 248, 0.25);
  margin-top: 1px;
}

.regulation-content {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-main);
}

.regulation-content p {
  margin: 0 0 6px;
}

.regulation-content p:last-child {
  margin-bottom: 0;
}


/* =========================
   SPECIFIC REGULATION CARDS - BASE
========================= */
.specific-regulation-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

.specific-regulation-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.specific-regulation-card:hover {
  background-color: rgba(56, 189, 248, 0.05);
  border-color: rgba(56, 189, 248, 0.25);
}

.specific-regulation-icon {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background-color: rgba(56, 189, 248, 0.18);
  color: var(--brand);
  border: 1px solid rgba(56, 189, 248, 0.25);
  margin-top: 1px;
}

.specific-regulation-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-main);
}

.specific-regulation-content p {
  margin: 0 0 8px;
}

.specific-regulation-content p:last-child {
  margin-bottom: 0;
}

.specific-regulation-content strong {
  color: var(--brand);
  font-weight: 600;
}


/* =========================
   TOURNAMENT GENERAL REGULATION - BASE
========================= */
.tournament-general-regulation {
  margin-top: 40px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.regulation-general-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(56, 189, 248, 0.3);
}


/* =========================
   DROPDOWN SELEZIONE TORNEO
========================= */
#tournament-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
}

#tournament-select option {
  background-color: var(--bg-main);
  color: var(--text-main);
}


/* =========================
   SKELETON UI – TOURNAMENT PAGE
========================= */
.tournament-skeleton {
  pointer-events: none;
  cursor: default;
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
  transition:
    opacity 0.35s ease,
    filter 0.35s ease,
    transform 0.35s ease;
}

.tournament-skeleton.fade-out {
  opacity: 0;
  filter: blur(4px);
  transform: scale(0.98);
}


/* ==========================================================
   PAGINA REGOLAMENTO GENERALE (#generic-regulation-section)
   Font e dimensioni aumentate per la vista standalone
========================================================== */

#generic-regulation-section .tournament-general-regulation {
  margin-top: 24px;
}

#generic-regulation-section .regulation-general-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 2px solid rgba(56, 189, 248, 0.3);
}

#generic-regulation-section .regulation-card {
  padding: 18px 20px;
  gap: 16px;
}

#generic-regulation-section .regulation-icon {
  min-width: 32px;
  height: 32px;
  font-size: 16px;
}

#generic-regulation-section .regulation-content {
  font-size: 20px;
  line-height: 1.6;
}

#generic-regulation-section .regulation-content p {
  margin: 0 0 12px;
}

#generic-regulation-section .generic-regulation-cards {
  gap: 32px;
  margin-top: 24px;
}

#generic-regulation-section .highlight-brand {
  color: var(--brand);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Filtro torneo - grande */
#generic-regulation-section .sport-filter-inline {
  padding: 14px 20px;
  gap: 16px;
}

#generic-regulation-section .sport-filter-inline label {
  font-size: 28px;
}

#generic-regulation-section .sport-filter-inline select {
  font-size: 28px;
  padding: 10px 16px;
  min-width: 200px;
}


/* ==========================================================
   PAGINA TORNEO SPECIFICO (#tournament-specific-section)
   Layout full-width con font aumentati
========================================================== */

/* Header torneo */
#tournament-specific-section .tournament-header {
  margin-bottom: 40px;
}

#tournament-specific-section .tournament-header h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
}

#tournament-specific-section .tournament-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#tournament-specific-section .tournament-subtitle {
  font-size: 20px;
  margin-top: 8px;
}

/* Info block */
.tournament-info-block {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 40px;
}

.tournament-info-block h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
}

.tournament-info-block .tournament-meta {
  gap: 16px;
}

.tournament-info-block .meta-item {
  font-size: 22px;
}

.tournament-info-block .meta-icon {
  width: 28px;
  font-size: 22px;
}

/* Registration block */
.tournament-registration-block {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 40px;
}

.tournament-registration-block h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
}

.tournament-registration-block > p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.registration-closed-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
}

.tournament-registration-block p strong {
  color: var(--text-main);
  font-size: 20px;
}

/* Specific rules block */
.tournament-specific-rules-block {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 40px;
}

.tournament-specific-rules-block .rules-subtitle {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
}

.tournament-specific-rules-block .specific-regulation-card {
  padding: 16px 18px;
  gap: 14px;
  margin-bottom: 16px;
}

.tournament-specific-rules-block .specific-regulation-icon {
  min-width: 28px;
  height: 28px;
  font-size: 14px;
}

.tournament-specific-rules-block .specific-regulation-content {
  font-size: 18px;
  line-height: 1.6;
}

.tournament-specific-rules-block .specific-regulation-content p {
  margin: 0 0 10px;
}

.tournament-specific-rules-block .specific-regulation-cards {
  gap: 16px;
}

/* Teams block */
#tournament-specific-section .tournament-teams-block {
  margin-top: 0;
  margin-bottom: 40px;
  padding: 24px;
}

#tournament-specific-section .teams-block-title {
  font-size: 28px;
  font-weight: 700;
}

#tournament-specific-section .teams-block-count {
  font-size: 18px;
  padding: 10px 16px;
}

#tournament-specific-section .team-chip {
  padding: 14px 18px;
  gap: 12px;
}

#tournament-specific-section .team-chip-index {
  min-width: 28px;
  height: 28px;
  font-size: 14px;
}

#tournament-specific-section .team-chip-name {
  font-size: 18px;
}

#tournament-specific-section .teams-chips-grid {
  gap: 12px;
}

/* General regulation block */
#tournament-specific-section .tournament-general-regulation {
  margin-top: 0;
  margin-bottom: 40px;
  padding: 24px;
}

#tournament-specific-section .regulation-general-title {
  font-size: 28px;
  margin-bottom: 24px;
  padding-bottom: 16px;
}

#tournament-specific-section .regulation-card {
  padding: 16px 18px;
  gap: 14px;
}

#tournament-specific-section .regulation-icon {
  min-width: 28px;
  height: 28px;
  font-size: 14px;
}

#tournament-specific-section .regulation-content {
  font-size: 18px;
  line-height: 1.6;
}

#tournament-specific-section .regulation-content p {
  margin: 0 0 10px;
}

#tournament-specific-section .generic-regulation-cards {
  gap: 16px;
}




























































/* =========================
   PARTE 4 - STANDINGS PAGE (standings.html)
========================= */

/* =========================
   STANDINGS PAGE - LAYOUT
========================= */

.standings-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 0;
}


/* =========================
   STANDINGS HEADER
========================= */

.standings-header {
  margin-bottom: 40px;
}

.standings-header h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
  margin: 0;
  margin-top: 20px
}

.standings-subtitle {
  font-size: 20px;
  color: var(--text-muted);
  margin-top: 8px;
}


/* =========================
   STANDINGS FILTER SELECT SECTION
========================= */

#standings-select-section .sport-filter-inline {
  padding: 14px 20px;
  gap: 16px;
}

#standings-select-section .sport-filter-inline label {
  font-size: 32px;
}

#standings-select-section .sport-filter-inline select {
  font-size: 28px;
  padding: 10px 16px;
  min-width: 200px;
}

/* Placeholder quando nessun torneo selezionato */
.standings-placeholder {
  margin-top: 60px;
  text-align: center;
  padding: 60px 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.standings-placeholder-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.7;
}

.standings-placeholder h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.standings-placeholder p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.5;
}


/* =========================
   STANDINGS - TORNEO NON INIZIATO
========================= */

.standings-not-started,
.standings-not-found {
  margin-top: 40px;
  text-align: center;
  padding: 60px 24px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.standings-not-started-icon,
.standings-not-found-icon {
  font-size: 72px;
  margin-bottom: 24px;
  opacity: 0.85;
}

.standings-not-started h3,
.standings-not-found h3 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.standings-not-started .tournament-name-label {
  font-size: 24px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 20px;
}

.standings-not-started .tournament-info-text,
.standings-not-found p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.standings-not-started .tournament-info-text strong {
  color: var(--text-main);
}

/* Actions buttons */
.standings-not-started-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.standings-not-started-actions .btn {
  padding: 16px 26px;
  font-size: 20px;
}

/* Info items */
.standings-not-started-info {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.standings-not-started-info .info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: var(--text-muted);
}

.standings-not-started-info .info-icon {
  font-size: 22px;
  opacity: 0.85;
}

/* Not found specifico */
.standings-not-found {
  padding: 80px 24px;
}

.standings-not-found .btn {
  margin-top: 16px;
  padding: 14px 24px;
  font-size: 16px;
}


/* =========================
   GIRONI SECTION WRAPPER
========================= */
.gironi-section {
  background: linear-gradient(
    135deg,
    rgba(18, 24, 32, 0.95) 0%,
    rgba(22, 29, 39, 0.95) 100%
  );
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.gironi-section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(139, 92, 246, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
}

.gironi-section-title .section-icon {
  font-size: 32px;
  filter: drop-shadow(0 2px 4px rgba(139, 92, 246, 0.4));
}


/* =========================
   GIRONI SUBSECTIONS
========================= */
.gironi-subsection {
  margin-top: 40px;
}

.gironi-subsection:first-of-type {
  margin-top: 0;
}

.gironi-subsection-title {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(156, 163, 175, 0.9);
  margin-bottom: 20px;
  padding-bottom: 10px;
  padding-left: 14px;
  border-left: 4px solid rgba(56, 189, 248, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
}


/* =========================
   MATCHES BOX
========================= */
.standings-results-box-fullwidth {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 0;
}


/* =========================
   ROUND FILTER
========================= */
.round-filter-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 14px 18px;
  background-color: rgba(22, 29, 39, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}

.round-filter-box label {
  font-size: 24px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}

.round-filter-box select {
  flex: 1;
  padding: 12px 16px;
  font-size: 22px;
  font-weight: 500;
  background-color: rgba(11, 15, 20, 0.8);
  color: var(--text-main);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.round-filter-box select:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background-color: rgba(11, 15, 20, 0.95);
}

.round-filter-box select:focus {
  outline: none;
  border-color: var(--brand);
  background-color: rgba(11, 15, 20, 1);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* Hide filter during loading */
.standings-results-box-fullwidth.loading .round-filter-box {
  display: none;
}


/* =========================
   MATCHES LIST
========================= */
.matches-scroll {
  display: flex;
  flex-direction: column;
  gap: 16px;
}


/* =========================
   CARD MATCH
========================= */
.match-card {
  position: relative;
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Card partita già giocata */
.match-card.played {
  background-color: rgba(56, 189, 248, 0.04);
  border-color: rgba(56, 189, 248, 0.25);
  opacity: 0.78;
}

.match-card.played .score-input {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.match-card.finals {
  border: 1px solid var(--border);
  background: rgba(56, 189, 248, 0.04);
}

.match-card.finals.played {
  background-color: rgba(56, 189, 248, 0.04);
  border-color: rgba(56, 189, 248, 0.25);
  opacity: 0.78;
}

.match-card.locked {
  opacity: 0.55;
  pointer-events: none;
}

.match-card.locked::before {
  display: none;
}


/* =========================
   MATCH META (ROUND + GROUP)
========================= */
.match-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.match-round,
.match-group {
  padding: 6px 12px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.match-round {
  background-color: rgba(56, 189, 248, 0.12);
  color: var(--brand);
  border-color: rgba(56, 189, 248, 0.3);
  font-weight: 800;
}

/* Nascondi badge "Fase Finale" nei match finals */
.match-card.finals .match-group {
  display: none;
}


/* =========================
   TEAMS + SCORE (READ-ONLY VERSION)
========================= */
.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.match-teams .team {
  font-size: 28px;
  font-weight: 600;
  flex: 1;
  text-align: center;
  line-height: 1.3;
}

.match-teams .score {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
  min-width: 44px;
  text-align: center;
  padding: 8px 12px;
  background-color: rgba(56, 189, 248, 0.08);
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

.match-card:not(.played) .match-teams .score {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  opacity: 0.6;
}

.dash {
  font-size: 24px;
  opacity: 0.6;
}

/* Evidenzia vincitore/perdente */
.match-teams .team.winner {
  color: #22c55e;
  font-weight: 700;
}

.match-teams .team.loser {
  color: var(--text-muted);
  opacity: 0.6;
}


/* =========================
   MATCH STATUS (READ-ONLY)
========================= */
.match-status {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.match-status .status-played {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 600;
  color: #22c55e;
  padding: 6px 14px;
  background-color: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 999px;
}

.match-status .status-pending {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 500;
  font-style: italic;
  color: var(--text-muted);
  padding: 6px 14px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}


/* =========================
   MATCH GIOCATO - CARD STYLE
========================= */
.match-card.played {
  background-color: rgba(56, 189, 248, 0.04);
  border-color: rgba(56, 189, 248, 0.25);
}

.match-card.finals.played {
  background-color: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.3);
}


/* =========================
   STANDINGS TABLE BOX
========================= */
.standings-table-box-fullwidth {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}


/* =========================
   STANDINGS – CLASSIFICA GRUPPI
========================= */
.standings-group {
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.standings-group:last-child {
  margin-bottom: 0;
}

.standings-title {
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid var(--brand);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 22px;
}

.standings-table thead th {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 6px;
  border-bottom: 1px solid var(--border);
}

.standings-table thead th:first-child {
  text-align: left;
}

.standings-table tbody tr {
  transition: background-color 0.15s ease;
}

.standings-table tbody tr:hover {
  background-color: rgba(56, 189, 248, 0.06);
}

.standings-table td {
  padding: 12px 6px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.standings-table td:first-child {
  text-align: left;
  font-weight: 500;
}

.standings-table td:nth-child(2) {
  font-weight: 800;
  font-size: 24px;
  color: var(--brand);
}

.standings-table td:nth-child(n+3) {
  color: var(--text-muted);
  font-size: 20px;
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rank-badge {
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background-color: rgba(56, 189, 248, 0.15);
  color: var(--brand);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.team-name {
  font-size: 26px;
  font-weight: 600;
}


/* =========================
   FINALS SECTION CONTAINER
========================= */
.finals-section {
  width: 100%;
  max-width: 100%;
  background: linear-gradient(
    135deg,
    rgba(18, 24, 32, 0.95) 0%,
    rgba(22, 29, 39, 0.95) 100%
  );
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.finals-section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(139, 92, 246, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
}

.finals-section-title .section-icon {
  font-size: 32px;
  filter: drop-shadow(0 2px 4px rgba(139, 92, 246, 0.4));
}


/* =========================
   FINALS SUBSECTIONS
========================= */
.finals-subsection {
  margin-top: 40px;
}

.finals-subsection:first-of-type {
  margin-top: 0;
}

.finals-subsection-title {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(156, 163, 175, 0.9);
  margin-bottom: 20px;
  padding-bottom: 10px;
  padding-left: 14px;
  border-left: 4px solid rgba(56, 189, 248, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
}

.finals-subsection .finals-bracket-column {
  background-color: var(--bg-card);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 10px;
  padding: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}


/* =========================
   FINALS MATCHES - FULL WIDTH
========================= */
.finals-matches-fullwidth {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.finals-matches-fullwidth .round-filter-box {
  margin-bottom: 24px;
}


/* =========================
   FINALS ROUNDS SPACING
========================= */
.finals-round {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.finals-round:last-child {
  margin-bottom: 0;
}

.finals-round h3 {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-main);
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 4px solid var(--brand);
}

.finals-round .match-card {
  margin-bottom: 16px;
}

.finals-round .match-card:last-child {
  margin-bottom: 0;
}


/* =========================
   BRACKET VISUAL - CENTERED
========================= */
.bracket-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 40px 20px;
  overflow-x: auto;
  min-height: 500px;
  width: 100%;
}

/* =============================
   SYMMETRIC BRACKET LAYOUT
============================= */
.bracket-symmetric {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  width: max-content;
  margin: 0 auto;
}

.bracket-side {
  display: flex;
  align-items: center;
  gap: 48px;
}

.bracket-left {
  flex-direction: row;
  justify-content: flex-end;
}

.bracket-right {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 180px;
  position: relative;
  gap: 0;
}

.bracket-round.left {
  align-items: flex-end;
}

.bracket-round.right {
  align-items: flex-start;
}

.bracket-round-label {
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(156, 163, 175, 0.8);
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  white-space: nowrap;
}


/* =============================
   MATCH SPACING PER ROUND
============================= */
.bracket-side .bracket-round:first-child .bracket-match {
  margin: 20px 0;
}

.bracket-side .bracket-round:nth-child(2) .bracket-match {
  margin: 56px 0;
}

.bracket-side .bracket-round:nth-child(3) .bracket-match {
  margin: 128px 0;
}

.bracket-side .bracket-round:nth-child(4) .bracket-match {
  margin: 272px 0;
}


/* =============================
   BRACKET MATCH CARD
============================= */
.bracket-match {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.2s ease;
}

.bracket-match:hover {
  transform: translateX(2px);
  z-index: 10;
}


/* =============================
   BRACKET TEAM SLOT
============================= */
.bracket-team {
  background: linear-gradient(
    135deg,
    rgba(22, 29, 39, 0.95) 0%,
    rgba(18, 24, 32, 0.95) 100%
  );
  border: 1px solid rgba(56, 189, 248, 0.12);
  backdrop-filter: blur(8px);
  padding: 14px 18px;
  font-size: 24px;
  font-weight: 500;
  color: var(--text-main);
  min-width: 180px;
  max-width: 200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.bracket-team:first-child {
  border-radius: 10px 10px 0 0;
  border-bottom: 1px solid rgba(56, 189, 248, 0.06);
}

.bracket-team:last-child {
  border-radius: 0 0 10px 10px;
  border-top: none;
}

.bracket-team::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.15) 0%,
    transparent 50%,
    rgba(56, 189, 248, 0.08) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.bracket-match:hover .bracket-team::before {
  opacity: 1;
}

.bracket-team-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.bracket-team-score {
  font-weight: 700;
  font-size: 24px;
  min-width: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}


/* =============================
   WINNER STATE
============================= */
.bracket-team.winner {
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.08) 0%,
    rgba(56, 189, 248, 0.04) 100%
  );
  border-color: rgba(56, 189, 248, 0.35);
  color: #ffffff;
}

.bracket-team.winner::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    rgba(56, 189, 248, 0.8) 0%,
    rgba(56, 189, 248, 0.4) 100%
  );
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.bracket-team.winner .bracket-team-name {
  font-weight: 600;
}

.bracket-team.winner .bracket-team-score {
  color: var(--brand);
  font-weight: 800;
}


/* =============================
   LOSER STATE
============================= */
.bracket-team.loser {
  opacity: 0.4;
  background: linear-gradient(
    135deg,
    rgba(22, 29, 39, 0.6) 0%,
    rgba(18, 24, 32, 0.6) 100%
  );
  border-color: rgba(255, 255, 255, 0.06);
}

.bracket-team.loser .bracket-team-name {
  color: var(--text-muted);
}

.bracket-team.loser .bracket-team-score {
  color: var(--text-muted);
  font-weight: 500;
}


/* =============================
   TBD / EMPTY SLOT
============================= */
.bracket-team.tbd {
  color: var(--text-muted);
  font-style: italic;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
  border-style: dashed;
}

.bracket-team.tbd .bracket-team-score {
  opacity: 0.5;
}


/* =============================
   BRACKET CONNECTORS (LINES)
============================= */
.bracket-left .bracket-match::after {
  content: "";
  position: absolute;
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(56, 189, 248, 0.25) 0%,
    rgba(56, 189, 248, 0.08) 100%
  );
}

.bracket-right .bracket-match::after {
  content: "";
  position: absolute;
  left: -24px;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(56, 189, 248, 0.08) 0%,
    rgba(56, 189, 248, 0.25) 100%
  );
}


/* =============================
   BRACKET FINAL CENTER
============================= */
.bracket-final {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  min-width: 220px;
  gap: 24px;
}

.bracket-final .bracket-match {
  margin: 0;
}

.bracket-final .bracket-match::after {
  display: none;
}

.bracket-final .bracket-team {
  min-width: 200px;
  max-width: 220px;
}


/* =============================
   TROPHY & CHAMPION
============================= */
.bracket-trophy {
  font-size: 64px;
  filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.3));
  animation: trophy-glow 3s ease-in-out infinite;
}

@keyframes trophy-glow {
  0%, 100% {
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.3));
  }
  50% {
    filter: drop-shadow(0 6px 20px rgba(255, 215, 0, 0.5));
  }
}

.bracket-champion {
  font-size: 40px;
  font-weight: 700;
  color: var(--brand);
  padding: 14px 28px;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.12) 0%,
    rgba(56, 189, 248, 0.06) 100%
  );
  border: 2px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2);
  animation: champion-pulse 2s ease-in-out infinite;
}

@keyframes champion-pulse {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2);
  }
  50% {
    box-shadow: 0 6px 24px rgba(56, 189, 248, 0.35);
  }
}


/* =============================
   LINEAR BRACKET LAYOUT
============================= */
.bracket-linear {
  flex-direction: row;
  align-items: flex-start;
  gap: 48px;
  width: max-content;
  margin: 0 auto;
}

.bracket-linear .bracket-round {
  align-items: center;
}

.bracket-linear .bracket-round:last-child {
  margin-right: 0;
}

.bracket-linear .bracket-match::after {
  right: -24px;
  left: auto;
}


/* =========================
   SKELETON UI – STANDINGS
========================= */
.standings-skeleton {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
  transition:
    opacity 0.35s ease,
    filter 0.35s ease,
    transform 0.35s ease;
}

.standings-skeleton.fade-out {
  opacity: 0;
  filter: blur(4px);
  transform: scale(0.98);
}

.standings-skeleton .skeleton-match {
  height: 80px;
  border-radius: var(--radius);
  background: linear-gradient(
    90deg,
    #1f2933 25%,
    #2a3441 37%,
    #1f2933 63%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

.standings-skeleton .skeleton-row {
  height: 18px;
  width: 100%;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    #1f2933 25%,
    #2a3441 37%,
    #1f2933 63%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

.standings-skeleton .skeleton-row.short {
  width: 60%;
}


/* =========================
   STANDINGS FINISHED STATE
========================= */
.standings-layout.finished .score-input,
.standings-layout.finished .btn {
  pointer-events: none;
  opacity: 0.6;
}

.finals-box.finished::before {
  content: "Torneo concluso";
  display: inline-block;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  background-color: rgba(107, 114, 128, 0.18);
  color: var(--state-finished);
}


/* =========================
   HIDDEN UTILITY
========================= */
.hidden {
  display: none !important;
}










