:root {
  --bg: #F5F5F5;
  --text: #222;
  --accent: #D82828;    
  --muted: #888;
  --border: #ccc;
  --blue-main: #1C50A4;  
  --blue-dark: #0F3A79;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
background: #0051ff;
  background: linear-gradient(90deg, rgba(0, 81, 255, 0.52) 0%, rgba(255, 0, 0, 0.51) 100%);
  color: var(--text);
}

header {
  width: 100%;
  background: var(--blue-main);
  border-bottom: 1px solid var(--blue-dark);
  position: fixed;
  top: 0;
  z-index: 100;
  padding: 0.8rem 0;
}

nav {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

.menu {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.menu li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

.menu li a:hover {
  color: var(--accent);
}

main {
  padding: 7rem 1rem 3rem;
  text-align: center;
}

.contenedor-lista {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.tabla-participantes {
  border-collapse: collapse;
  width: 90%;
  max-width: 800px;
  margin: auto;
  border: 1px solid var(--border);
  background: #fff;
  color: #000;
}

.tabla-participantes th,
.tabla-participantes td {
  border: 1px solid var(--border);
  padding: 0.7rem;
  text-align: center;
}

.tabla-participantes th {
  background: var(--blue-main);
  color: #fff;
  font-weight: bold;
}

.tabla-participantes tr:nth-child(even) {
  background: #E8EAF6;
}

.tabla-participantes tr:hover {
  background: #D1D9F0;
}

.vacio {
  color: var(--muted);
  font-style: italic;
}

.contador {
  margin-top: 3rem;
  text-align: center;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-main));
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  margin-inline: auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.contador::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, var(--accent) 0%, transparent 30%, transparent 70%, var(--accent) 100%);
  animation: giro 6s linear infinite;
  opacity: 0.1;
}

@keyframes giro {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.contador h2 {
  font-size: 1.8rem;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 0 10px rgba(0,0,0,0.3);
  margin-bottom: 1rem;
}

#tiempo {
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent);
  text-shadow: 0 0 15px var(--accent), 0 0 25px var(--blue-main);
  letter-spacing: 2px;
  animation: pulso 1.5s ease-in-out infinite;
}

@keyframes pulso {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

footer {
  width: 100%;
  background: var(--blue-dark);
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: auto;
  position: relative;
  bottom: 0;
}
