/* Gala Premios 2026 - Master Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;900&family=Plus+Jakarta+Sans:wght@400;500;700;800&display=swap');

:root {
  --bg-dark: #0b0714;
  --bg-card: rgba(26, 17, 43, 0.75);
  --bg-card-hover: rgba(42, 28, 69, 0.85);
  --border-glow: rgba(168, 85, 247, 0.3);
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.4);
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  /* Kahoot Option Colors */
  --kahoot-red: #e21b3c;
  --kahoot-blue: #1368ce;
  --kahoot-yellow: #d89e00;
  --kahoot-green: #26890c;
  --kahoot-purple: #864cbf;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.25);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(236, 72, 153, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1, h2, h3, h4, .brand-title {
  font-family: 'Outfit', sans-serif;
}

/* Header Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(11, 7, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-icon {
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--accent-gold), #fef08a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-badge {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid var(--border-glow);
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #d8b4fe;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Layout Containers */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
  width: 100%;
  flex: 1;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-gold);
}

/* Auth Login Screen */
.login-box {
  max-width: 420px;
  margin: 4rem auto 0 auto;
  text-align: center;
  padding: 2.5rem 2rem;
}

.login-logo {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.user-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.user-select-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 0.8rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.user-select-btn:hover, .user-select-btn:focus {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* Phase 1 Nomination Ranking System */
.overall-progress-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.overall-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.overall-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.overall-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-pink), var(--accent-purple));
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

/* Aviso de categorias pendientes de votar */
.pending-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--accent-gold-glow);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fef08a;
}

.pending-jump {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* Category Slider Track & Arrows */
.cat-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  background: rgba(15, 10, 28, 0.8);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 0.4rem;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
}

.slider-arrow {
  background: rgba(139, 92, 246, 0.25);
  border: 1px solid var(--border-glow);
  color: var(--accent-gold);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  transition: var(--transition);
  z-index: 2;
  flex-shrink: 0;
}

.slider-arrow:hover {
  background: var(--accent-purple);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.6);
}

.category-progress-bar {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.4rem 0.5rem;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.category-progress-bar::-webkit-scrollbar {
  height: 5px;
}

.category-progress-bar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.category-progress-bar::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
  border-radius: 10px;
}

.cat-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cat-pill .cat-num {
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

.cat-pill:hover {
  background: rgba(139, 92, 246, 0.2);
  color: var(--text-main);
  border-color: var(--border-glow);
}

.cat-pill.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(236, 72, 153, 0.95));
  color: white;
  border-color: var(--accent-gold);
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}

.cat-pill.active .cat-num {
  background: rgba(0, 0, 0, 0.35);
  color: var(--accent-gold);
}

.cat-pill.completed {
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.cat-pill.completed .cat-num {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

/* Nominee Selector Pool Grid */
.nominee-pool-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.nominee-pool-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--border-glow);
  transform: translateY(-1px);
}

.nominee-pool-btn.selected {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.4));
  border-color: var(--accent-emerald);
  color: #6ee7b7;
  font-weight: 700;
}

/* Ranking Items List */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.ranking-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  cursor: grab;
  user-select: none;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  touch-action: none;
}

.ranking-item:active {
  cursor: grabbing;
}

.ranking-item.dragging {
  opacity: 0.45;
  border-color: var(--accent-gold);
  transform: scale(0.97);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.ranking-item.drag-over {
  border: 2px dashed var(--accent-pink);
  background: rgba(236, 72, 153, 0.15);
  transform: translateY(2px);
}

.drag-handle {
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: grab;
  margin-right: 0.6rem;
  user-select: none;
  line-height: 1;
}

.ranking-item:hover .drag-handle {
  color: var(--accent-gold);
}

.ranking-item:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--border-glow);
}

.rank-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  margin-right: 0.8rem;
}

.ranking-item:nth-child(1) .rank-badge {
  background: var(--accent-gold);
  color: #000;
}
.ranking-item:nth-child(2) .rank-badge {
  background: #cbd5e1;
  color: #000;
}
.ranking-item:nth-child(3) .rank-badge {
  background: #b45309;
  color: #fff;
}

.rank-name {
  font-weight: 600;
  font-size: 1.05rem;
  flex: 1;
}

.rank-controls {
  display: flex;
  gap: 0.4rem;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--accent-purple);
}

/* Pair Builder for "Dupla del Año" */
.pair-builder-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed var(--accent-purple);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.pair-selectors {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.pair-select {
  background: rgba(26, 17, 43, 0.9);
  border: 1px solid var(--border-glow);
  color: white;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  width: 100%;
}

.pair-plus {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent-pink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  color: white;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
}

.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), #fbbf24);
  color: #000;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

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

.btn-outline:hover {
  background: rgba(139, 92, 246, 0.15);
}

.btn-danger {
  background: rgba(226, 27, 60, 0.2);
  border: 1px solid var(--kahoot-red);
  color: #fca5a5;
}

.btn-danger:hover {
  background: var(--kahoot-red);
  color: white;
}

/* Phase 2: User Mobile Controller (Kahoot Style) */
.kahoot-mobile-view {
  display: flex;
  flex-direction: column;
  /* Descuenta la barra superior y el padding del contenedor para que el mando
     entre entero en la pantalla del movil sin tener que hacer scroll.
     dvh tiene en cuenta la barra del navegador en moviles. */
  height: calc(100vh - 130px);
  height: calc(100dvh - 130px);
  min-height: 400px;
  justify-content: space-between;
  padding: 0.5rem 0 0 0;
}

.kahoot-header {
  text-align: center;
  margin-bottom: 1rem;
}

.kahoot-cat-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 0.3rem;
}

.kahoot-status-pill {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
}

.kahoot-status-pill.open {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid var(--accent-emerald);
}

.kahoot-status-pill.closed {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid #ef4444;
}

.kahoot-status-pill.tiebreak {
  background: rgba(236, 72, 153, 0.25);
  color: #f9a8d4;
  border: 1px solid var(--accent-pink);
  animation: pulseGlow 1.2s ease-in-out infinite;
}

/* Aviso de ronda de desempate (movil y panel de admin) */
.tiebreak-notice {
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid var(--accent-pink);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.75rem;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.tiebreak-notice-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--accent-pink);
  letter-spacing: 0.02em;
}

.tiebreak-notice-text {
  font-size: 0.9rem;
  color: #f9a8d4;
  margin-top: 0.25rem;
}

.kahoot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 1rem;
  flex: 1;
  margin: 1rem 0;
}

/* En el desempate solo quedan 2 opciones: una fila de dos botones grandes. */
.kahoot-grid.count-2 {
  grid-template-columns: 1fr 1fr;
}

/* Con 3 opciones, la tercera ocupa el ancho completo. */
.kahoot-grid.count-3 .kahoot-btn:nth-child(3) {
  grid-column: span 2;
}

.kahoot-btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 1.25rem 0.75rem;
  color: white;
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  text-align: center;
  word-break: break-word;
}

.kahoot-btn:active {
  transform: scale(0.96);
}

.kahoot-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.kahoot-btn.selected {
  outline: 4px solid #ffffff;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
}

.kahoot-btn-0 { background: var(--kahoot-red); }
.kahoot-btn-1 { background: var(--kahoot-blue); }
.kahoot-btn-2 { background: var(--kahoot-yellow); }
.kahoot-btn-3 { background: var(--kahoot-green); }

.kahoot-shape {
  font-size: 2.2rem;
}

.finalist-label {
  line-height: 1.2;
}

/* Phase 2 Stage / TV Presentation View */
.stage-body {
  background: #06030c;
  overflow: hidden;
}

.stage-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  padding: 2rem;
  justify-content: space-between;
  position: relative;
}

.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-logo {
  font-size: 2.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-gold), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.prev-winner-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--accent-gold);
  color: #fef08a;
  padding: 0.6rem 1.25rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
}

.stage-center {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
  overflow-y: auto;
  width: 100%;
}

/* Los tamanos de la pantalla de TV se adaptan a la altura real del televisor
   (vh) para que nunca se corte nada, ni en un proyector bajito ni en 4K. */
.stage-cat-title {
  font-size: clamp(1.8rem, 5vh, 3.5rem);
  font-weight: 900;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

.stage-cat-subtitle {
  font-size: clamp(1rem, 2.2vh, 1.5rem);
  color: var(--text-muted);
  margin-bottom: clamp(0.75rem, 2.5vh, 2rem);
}

.voters-counter-box {
  background: rgba(139, 92, 246, 0.2);
  border: 2px solid var(--accent-purple);
  border-radius: var(--radius-lg);
  padding: clamp(0.6rem, 1.8vh, 1.5rem) 3rem;
  font-size: clamp(1.1rem, 2.6vh, 2rem);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.4);
}

.counter-num {
  font-size: clamp(1.8rem, 4.5vh, 3.2rem);
  color: var(--accent-gold);
  font-family: 'Outfit', sans-serif;
}

/* Stage Chart & Podium Reveal */
.stage-chart-container {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  align-items: flex-end;
  height: clamp(120px, 28vh, 320px);
  margin-top: clamp(0.75rem, 2.5vh, 2rem);
  flex-shrink: 0;
}

.chart-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: height 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.5rem;
  font-size: clamp(1rem, 2.6vh, 1.8rem);
  font-weight: 900;
  box-shadow: 0 -5px 25px rgba(0,0,0,0.5);
  min-height: 34px;
}

.bar-0 { background: linear-gradient(180deg, #ff4d6d, var(--kahoot-red)); }
.bar-1 { background: linear-gradient(180deg, #4895ef, var(--kahoot-blue)); }
.bar-2 { background: linear-gradient(180deg, #ffb703, var(--kahoot-yellow)); }
.bar-3 { background: linear-gradient(180deg, #52b788, var(--kahoot-green)); }

.chart-label {
  margin-top: 0.5rem;
  font-size: clamp(0.85rem, 2vh, 1.2rem);
  font-weight: 800;
  text-align: center;
}

/* Barras de los candidatos empatados / del ganador */
.chart-bar.tied {
  outline: 3px solid var(--accent-gold);
  outline-offset: -3px;
  box-shadow: 0 0 35px var(--accent-gold-glow);
}

/* FASE 1 en la pantalla de TV: resumen de nominaciones */
.nom-summary-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.75rem;
}

.nom-stat-box {
  background: rgba(139, 92, 246, 0.18);
  border: 2px solid var(--accent-purple);
  border-radius: var(--radius-lg);
  padding: 1rem 1.75rem;
  text-align: center;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.35);
}

.nom-stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--accent-gold);
  line-height: 1.1;
}

.nom-stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.nom-progress-block {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.nom-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.nom-percent {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent-gold);
}

.nom-progress-track {
  height: 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.nom-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-pink), var(--accent-purple));
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.nom-progress-detail {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.nom-qr-box {
  text-align: center;
}

.nom-qr-img {
  width: 130px;
  height: 130px;
  border-radius: var(--radius-sm);
  border: 3px solid var(--accent-purple);
  background: #fff;
  display: block;
}

.nom-qr-url {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  max-width: 150px;
  word-break: break-all;
}

.nom-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.nom-user-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  text-align: left;
}

.nom-user-card.done {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
}

.nom-user-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.nom-user-name {
  font-size: 1.1rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nom-user-count {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-gold);
  white-space: nowrap;
}

.nom-user-card.done .nom-user-count {
  color: #6ee7b7;
}

.nom-user-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.nom-user-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
  transition: width 0.5s ease;
}

.nom-user-card.done .nom-user-fill {
  background: var(--accent-emerald);
}

/* Cartel de empate en la pantalla de TV */
.stage-tiebreak-banner {
  background: rgba(236, 72, 153, 0.15);
  border: 2px solid var(--accent-pink);
  border-radius: var(--radius-lg);
  padding: clamp(0.6rem, 1.8vh, 1.5rem) 3rem;
  margin-bottom: clamp(0.75rem, 2.5vh, 2rem);
  animation: pulseGlow 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

.stage-tiebreak-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.6rem, 4.5vh, 3rem);
  font-weight: 900;
  color: var(--accent-pink);
  letter-spacing: 0.05em;
}

.stage-tiebreak-names {
  font-size: clamp(1.2rem, 3.5vh, 2.4rem);
  font-weight: 800;
  color: var(--text-main);
  margin: 0.35rem 0;
}

.stage-tiebreak-sub {
  font-size: clamp(0.9rem, 2vh, 1.2rem);
  color: #f9a8d4;
}

/* Winner Banner */
.winner-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 7, 20, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.5s ease;
}

.trophy-icon {
  font-size: 6rem;
  animation: bounce 1s infinite alternate;
}

.winner-name-big {
  font-size: 4.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-gold), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 1rem 0;
  text-align: center;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1rem;
}

.modal-content {
  background: #150d26;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 550px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.5);
  text-align: center;
}

.qr-code-img {
  width: 250px;
  height: 250px;
  border-radius: var(--radius-md);
  margin: 1.5rem auto;
  border: 4px solid var(--accent-purple);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
}

/* Animations */
@keyframes bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-20px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(236, 72, 153, 0.3); }
  50% { box-shadow: 0 0 35px rgba(236, 72, 153, 0.75); }
}

/* Responsive utilities */
@media (max-width: 768px) {
  .stage-cat-title { font-size: 2.2rem; }
  .stage-chart-container { height: auto; }
  .winner-name-big { font-size: 2.8rem; }
  .stage-tiebreak-banner { padding: 1rem 1.25rem; }
  .stage-tiebreak-title { font-size: 1.8rem; }
  .stage-tiebreak-names { font-size: 1.4rem; }
  .stage-tiebreak-sub { font-size: 0.95rem; }
  .nom-summary-top { grid-template-columns: 1fr; }
  .nom-qr-box { display: none; }
  .nom-users-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

@media (max-width: 500px) {
  .container { padding: 1rem 0.85rem 1.25rem 0.85rem; }
  .kahoot-cat-title { font-size: 1.3rem; }
}
