/* resultados.css - Estilos para la página de resultados */

.results-container {
  min-height: 100vh;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #08c5d1, #7b42f6, #ff2d55);
  background-attachment: fixed;
}

.results-content {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(15px);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 25px 50px -10px rgba(0,0,0,0.7);
}

.results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.results-header h1 {
  font-size: 2.8rem;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700, #ffb300);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldShine 2s ease-in-out infinite;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.results-header h1::before {
  content: '📊 ';
  -webkit-text-fill-color: initial;
  background: none;
}

@keyframes goldShine {
  0%, 100% { 
    background-position: 0% 50%;
    filter: brightness(1);
  }
  50% { 
    background-position: 100% 50%;
    filter: brightness(1.3);
  }
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 200, 83, 0.2);
  color: #00c853;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(0, 200, 83, 0.3);
  margin-bottom: 1rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #00c853;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: rgba(255,255,255,0.08);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #ffe066;
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 0.5rem;
}

.podium {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  height: 200px;
}

.podium-place {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1rem;
  text-align: center;
  position: relative;
  border: 2px solid rgba(255,255,255,0.2);
  transition: all 0.3s ease;
  min-width: 140px;
}

.podium-place:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.podium-first {
  height: 160px;
  background: linear-gradient(135deg, #ffd700, #fff2a6);
  border-color: #ffd700;
  order: 2;
  color: #111;
}

.podium-second {
  height: 120px;
  background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
  border-color: #c0c0c0;
  order: 1;
  color: #111;
}

.podium-third {
  height: 80px;
  background: linear-gradient(135deg, #cd7f32, #e6b366);
  border-color: #cd7f32;
  order: 3;
  color: #111;
}

.podium-rank {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.podium-first .podium-rank {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  color: #111;
  width: 35px;
  height: 35px;
  font-size: 1.1rem;
}

.podium-second .podium-rank {
  background: linear-gradient(45deg, #c0c0c0, #e5e5e5);
  color: #111;
}

.podium-third .podium-rank {
  background: linear-gradient(45deg, #cd7f32, #daa520);
  color: #111;
}

.podium-game {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  margin-top: 1rem; /* CAMBIAR: era 0.5rem */
  line-height: 1.2;
}

.podium-points {
  font-size: 1.2rem;
  font-weight: 400; /* CAMBIAR: era 800 */
  color: #111; /* CAMBIAR: era #ffe066 */
}

.full-results {
  margin-top: 3rem;
}

.results-table {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.results-table table {
  width: 100%;
  border-collapse: collapse;
}

.results-table th {
  background: rgba(255,255,255,0.1);
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  color: #ffe066;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.results-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.results-table tr:hover {
  background: rgba(255,255,255,0.05);
}

.rank-cell {
  text-align: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.rank-1 { color: #ffd700; }
.rank-2 { color: #c0c0c0; }
.rank-3 { color: #cd7f32; }
.rank-cell { color: #fff; }

.game-name-cell {
  font-weight: 600;
  font-size: 1.05rem;
}

.points-cell {
  text-align: center;
  font-weight: 700;
  color: #ff0;
  font-size: 1.1rem;
}

.votes-breakdown {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

.loading-state {
  text-align: center;
  padding: 3rem;
  opacity: 0.7;
}

.loading-spinner {
  font-size: 2rem;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.error-state {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  color: #ff6b6b;
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
}

.refresh-btn {
  background: linear-gradient(45deg, #08c5d1, #7b42f6);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.refresh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(8, 197, 209, 0.3);
}

.back-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  background: rgba(255,255,255,0.95);
  color: #333;
  text-decoration: none;
  padding: 0.75rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.back-link:hover {
  background: rgba(255,255,255,1);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.last-updated {
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .results-content {
    padding: 1.5rem;
  }
  
  .results-header h1 {
    font-size: 2.2rem;
  }
  
  .podium {
    flex-direction: column;
    height: auto;
    gap: 0.5rem;
  }
  
  .podium-place {
    width: 100%;
    height: auto !important;
    min-height: 80px;
    order: unset !important;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .results-table {
    overflow-x: auto;
  }
  
  .results-table th,
  .results-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
  }
  }

/* Solo para pantallas de escritorio */
@media (min-width: 769px) {
  .podium-third .podium-game {
    margin-top: 0rem;
  }
}

/* AGREGAR AL FINAL DE resultados.css: */
.rank-cell:not(.rank-1):not(.rank-2):not(.rank-3) {
  color: #fff;
}

/* Colores específicos para el ranking en la tabla */
.results-table .rank-1 { 
  color: #ffd700 !important; 
}

.results-table .rank-2 { 
  color: #c0c0c0 !important; 
}

.results-table .rank-3 { 
  color: #cd7f32 !important; 
}