:root {
  --blu: #0a1628;
  --blu2: #0d2048;
  --blu3: #1a3a6e;
  --oro: #c9a227;
  --oro2: #f0c040;
  --bianco: #f0f4ff;
}

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

body {
  background: var(--blu);
  color: var(--bianco);
  font-family: 'Montserrat', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 80%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 30%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 55%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(2px 2px at 40% 40%, rgba(201,162,39,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 60% 70%, rgba(201,162,39,0.2) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ── HEADER ── */
header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 40px 20px 30px;
  background: linear-gradient(180deg, rgba(201,162,39,0.15) 0%, transparent 100%);
  border-bottom: 1px solid rgba(201,162,39,0.3);
}

.header-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--oro), var(--oro2));
  color: var(--blu);
  font-family: 'Bebas Neue', cursive;
  font-size: 13px;
  letter-spacing: 3px;
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: 10px;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,162,39,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(201,162,39,0); }
}

header h1 {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(48px, 10vw, 90px);
  letter-spacing: 6px;
  line-height: 1;
  background: linear-gradient(135deg, #fff 0%, var(--oro2) 50%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  background-size: 200% auto;
}

@keyframes shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

header p {
  font-size: 13px;
  color: rgba(240,244,255,0.6);
  letter-spacing: 2px;
  margin-top: 6px;
  text-transform: uppercase;
}

/* ── NAV ── */
.serate-nav {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 20px 16px;
}

.serata-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(240,244,255,0.7);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.serata-btn:hover {
  background: rgba(201,162,39,0.15);
  border-color: var(--oro);
  color: var(--oro2);
  transform: translateY(-2px);
}

.serata-btn.active {
  background: linear-gradient(135deg, var(--oro), var(--oro2));
  border-color: transparent;
  color: var(--blu);
  box-shadow: 0 4px 20px rgba(201,162,39,0.4);
  transform: translateY(-2px);
}

.top5-btn {
  background: linear-gradient(135deg, #1a3a8e, #2a5cd0);
  border: 1px solid rgba(100,150,255,0.4);
  color: #fff;
  font-family: 'Bebas Neue', cursive;
  font-size: 16px;
  letter-spacing: 2px;
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.top5-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(42,92,208,0.5);
}

.top5-btn.active {
  background: linear-gradient(135deg, #2a5cd0, #4a7de0);
  box-shadow: 0 4px 25px rgba(42,92,208,0.6);
}

/* ── SERATA TITLE ── */
.serata-title {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 20px 20px;
}

.serata-title h2 {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: 4px;
}

.serata-title span { color: var(--oro2); }

.serata-title p {
  font-size: 12px;
  color: rgba(240,244,255,0.5);
  letter-spacing: 2px;
  margin-top: 4px;
}

/* ── LEGENDA ── */
.legenda {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 20px 24px;
}

.leg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(240,244,255,0.6);
}

.leg-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── CANTANTI GRID ── */
.cantanti-grid {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  padding: 0 16px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.cantante-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fadeInCard 0.4s ease both;
  position: relative;
  overflow: hidden;
}

.cantante-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.02));
  pointer-events: none;
}

@keyframes fadeInCard {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cantante-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(201,162,39,0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.cantante-card.migliore {
  border-color: rgba(240,192,64,0.5);
  background: rgba(201,162,39,0.08);
}

.cantante-card.migliore::after {
  content: '★';
  position: absolute;
  top: 8px;
  right: 10px;
  color: var(--oro2);
  font-size: 14px;
}

.cantante-card.no-voto { opacity: 0.6; }

.num-badge {
  font-family: 'Bebas Neue', cursive;
  font-size: 22px;
  color: rgba(240,244,255,0.25);
  min-width: 30px;
  text-align: center;
  line-height: 1;
}

.cantante-info { flex: 1; min-width: 0; }

.cantante-nome {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cantante-nome.migliore-testo { color: var(--oro2); }

.cantante-canzone {
  font-size: 12px;
  color: rgba(240,244,255,0.5);
  margin-top: 3px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── VOTO BADGES ── */
.voto-badge {
  min-width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', cursive;
  font-size: 24px;
  flex-shrink: 0;
}

.voto-nd          { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.3); font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: 300; }
.voto-rosso       { background: #c0392b; color: #fff; }
.voto-verde-chiaro{ background: #a8e6cf; color: #1a5236; }
.voto-verde       { background: #27ae60; color: #fff; }
.voto-grigio      { background: #7f8c8d; color: #fff; }
.voto-giallo      { background: #e6a817; color: #1a0f00; }

/* ── TOP 5 ── */
.top5-section {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px 60px;
  animation: fadeInCard 0.4s ease;
}

.top5-header { text-align: center; margin-bottom: 30px; }

.top5-header h2 {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(36px, 7vw, 64px);
  letter-spacing: 6px;
  line-height: 1;
}

.top5-header h2 span { color: var(--oro2); }

.top5-header p {
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(240,244,255,0.5);
  margin-top: 8px;
  text-transform: uppercase;
}

.top5-serata { margin-bottom: 32px; }

.top5-serata-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--oro2);
  border-bottom: 1px solid rgba(201,162,39,0.3);
  padding-bottom: 8px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.top10-badge {
  font-size: 11px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--oro), var(--oro2));
  color: var(--blu);
  padding: 3px 10px;
  border-radius: 20px;
}

.top5-items { display: flex; flex-direction: column; gap: 10px; }

.top5-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px 18px;
  animation: fadeInCard 0.4s ease both;
  transition: all 0.3s;
}

.top5-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(201,162,39,0.3);
  transform: translateX(4px);
}

.top5-rank {
  font-family: 'Bebas Neue', cursive;
  font-size: 32px;
  color: var(--oro2);
  min-width: 30px;
  text-align: center;
  line-height: 1;
}

.top5-nome {
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex: 1;
}

.top5-item.nd .top5-nome {
  color: rgba(240,244,255,0.3);
  font-style: italic;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

.top5-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.match-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}

.match-yes { background: rgba(39,174,96,0.2);  color: #2ecc71; border: 1px solid rgba(39,174,96,0.3); }
.match-no  { background: rgba(192,57,43,0.2);  color: #e74c3c; border: 1px solid rgba(192,57,43,0.3); }

.top5-nota {
  font-size: 10px;
  color: rgba(240,244,255,0.35);
  font-style: italic;
  text-align: right;
}

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.show { display: flex; animation: fadeModal 0.3s ease; }

@keyframes fadeModal { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--blu2);
  border: 1px solid rgba(201,162,39,0.4);
  border-radius: 20px;
  padding: 28px;
  max-width: 440px;
  width: 90%;
  animation: slideModal 0.3s ease;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

@keyframes slideModal {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--bianco);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover { background: rgba(255,255,255,0.2); }

.modal h3 {
  font-family: 'Bebas Neue', cursive;
  font-size: 26px;
  letter-spacing: 3px;
  color: var(--oro2);
  margin-bottom: 4px;
}

.modal .modal-canzone {
  font-size: 13px;
  color: rgba(240,244,255,0.5);
  font-style: italic;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-voti { display: flex; flex-direction: column; gap: 10px; }

.modal-voto-row { display: flex; align-items: center; justify-content: space-between; }

.modal-serata-label {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(240,244,255,0.6);
}

.modal-voto-display {
  font-family: 'Bebas Neue', cursive;
  font-size: 20px;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: rgba(240,244,255,0.3);
  font-size: 11px;
  letter-spacing: 1px;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--blu); }
::-webkit-scrollbar-thumb { background: var(--blu3); border-radius: 3px; }

/* ── CLASSIFICA BTN ── */
.classifica-btn {
  background: linear-gradient(135deg, #6a1a8e, #9a2cd0);
  border: 1px solid rgba(180,100,255,0.4);
  color: #fff;
  font-family: 'Bebas Neue', cursive;
  font-size: 16px;
  letter-spacing: 2px;
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.classifica-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(154,44,208,0.5);
}

.classifica-btn.active {
  background: linear-gradient(135deg, #9a2cd0, #b44de0);
  box-shadow: 0 4px 25px rgba(154,44,208,0.6);
}

/* ── CLASSIFICA SECTION ── */
.classifica-section {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px 60px;
  animation: fadeInCard 0.4s ease;
}

.classifica-items { display: flex; flex-direction: column; gap: 8px; }

.classifica-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 18px;
  animation: fadeInCard 0.4s ease both;
  transition: all 0.3s;
}

.classifica-item:hover {
  background: rgba(255,255,255,0.08);
  transform: translateX(4px);
}

.classifica-podio {
  border-color: rgba(240,192,64,0.5);
  background: rgba(201,162,39,0.08);
}

.classifica-top10 {
  border-color: rgba(255,255,255,0.15);
}

.classifica-rank {
  font-family: 'Bebas Neue', cursive;
  font-size: 26px;
  color: var(--oro2);
  min-width: 36px;
  text-align: center;
  line-height: 1;
}

.classifica-podio .classifica-rank { font-size: 28px; }

.classifica-info { flex: 1; min-width: 0; }

.classifica-nome {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.classifica-podio .classifica-nome { color: var(--oro2); font-size: 15px; }

.classifica-canzone {
  font-size: 11px;
  color: rgba(240,244,255,0.45);
  font-style: italic;
  margin-top: 2px;
}

.classifica-nostro-voto {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.classifica-voto-label {
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(240,244,255,0.4);
}

.classifica-voto-num {
  font-family: 'Bebas Neue', cursive;
  font-size: 22px;
  color: var(--oro2);
  line-height: 1;
}

/* ── LEGENDA TOP5 NOTE ── */
.leg-item-top5 {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
  font-size: 10px;
  color: rgba(240,192,64,0.8);
}

/* ── RESPONSIVE ── */
@media (max-width: 500px) {
  .cantanti-grid { grid-template-columns: 1fr; }
  .serata-btn { padding: 8px 14px; font-size: 11px; }
}