body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #121212, #1a1a1a);
  color: #e0e0e0;
  margin: 0;
  padding: 20px;
}

h1 {
  font-family: 'Bebas Neue', cursive;
  text-align: center;
  color: #ffd700;
  text-shadow: 2px 2px 4px #000;
  margin-bottom: 10px;
  font-size: 3em;
  letter-spacing: 2px;
}

.subtitle {
  text-align: center;
  margin-bottom: 25px;
  font-size: 1em;
  opacity: 0.85;
}

.container {
  max-width: 1100px;
  margin: auto;
  background: #1e1e1e;
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.7);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #2a2a2a;
  border-radius: 10px;
  min-width: 700px;
}

th, td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #444;
}

th {
  background: #3a3a3a;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: sticky;
  top: 0;
  z-index: 2;
}

tr {
  animation: fadeIn 0.4s ease-in;
}

tr:nth-child(even) {
  background: #252525;
}

tr:hover {
  background: #333;
  transform: scale(1.01);
  transition: all 0.2s ease-in-out;
}

.first-place {
  font-size: 1.9em;
  font-weight: bold;
  color: #FFD700;
  text-shadow: 0 0 2px #FFD700, 0 0 6px rgba(255, 215, 0, 0.1);
  animation: bounce 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.second-place {
  font-size: 1.6em;
  font-weight: bold;
  color: #C0C0C0;
  text-shadow: 0 0 2px #C0C0C0, 0 0 6px rgba(192, 192, 192, 0.1);
  animation: pulse 5s ease-in-out infinite;
}

.third-place {
  font-size: 1.4em;
  font-weight: bold;
  color: #CD7F32;
  text-shadow: 0 0 2px #CD7F32, 0 0 6px rgba(205, 127, 50, 0.1);
  animation: pulse 5s ease-in-out infinite;
}

.perfect {
  box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.5);
}

.failed {
  opacity: 0.5;
}

.bar {
  background: #444;
  border-radius: 6px;
  overflow: hidden;
  height: 10px;
  margin-top: 4px;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff99, #00cc66);
  transition: width 0.5s ease;
}

button {
  background: #333;
  color: #e0e0e0;
  border: none;
  padding: 8px 14px;
  margin: 4px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

button.active {
  background: linear-gradient(135deg, #ffd700, #ffb700);
  color: #000;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
  font-weight: 600;
}

button:hover {
  background: #555;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85em;
  opacity: 0.7;
}

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

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

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}