/* --- Base y Tipografía --- */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background-color: #121212; /* Un negro más profundo y moderno */
  color: #eeeeee;
}

.app {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 120px; /* Espacio para el footer fijo */
}

/* --- Header --- */
.app-header {
  background-color: #000;
  padding: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 2px solid #ff6b00;
}

.header-logo {
  max-height: 50px;
  width: auto;
}

.header-title-container {
  text-align: center;
  margin: 40px 0;
}

.header-title {
  font-size: 2.2em;
  font-weight: 800;
  color: #ff6b00;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* --- Paneles de Contenido --- */
.scores-container, .top-container, .workout-example, .panel {
  background-color: #1a1a1a;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.panel-title {
  color: #ff6b00;
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 5px;
}

.panel-subtitle {
  font-size: 0.9em;
  color: #888;
  margin-bottom: 15px;
}

/* --- Tablas Responsivas --- */
.scores-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.scores-table th, .scores-table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #333;
}

.scores-table th {
  background-color: #252525;
  color: #ff6b00;
  text-transform: uppercase;
  font-size: 0.85em;
}

.scores-table tr:hover {
  background-color: #222;
}

.total-cell {
  font-weight: bold;
  color: #ff6b00;
}

/* --- Top 3 Cards (Podio) --- */
#gridCards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.top-block {
  background: linear-gradient(145deg, #222, #111);
  border-radius: 10px;
  padding: 15px;
  border: 1px solid #333;
}

.top-block h4 {
  text-align: center;
  color: #fff;
  margin-top: 0;
  border-bottom: 1px solid #ff6b00;
  padding-bottom: 10px;
}

.top-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
  padding: 10px;
  border-radius: 8px;
  background: #222;
}

.rank-1 { border-left: 5px solid #ff6b00; box-shadow: 0 0 10px rgba(255, 107, 0, 0.3); }
.rank-2 { border-left: 5px solid #cccccc; }
.rank-3 { border-left: 5px solid #cd7f32; }

/* --- Modo Edición y Banner --- */
.edit-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #ff6b00;
  color: #000;
  text-align: center;
  font-weight: bold;
  padding: 10px 0;
  z-index: 10001;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

#exitEditBtn {
  background-color: #000;
  color: #fff;
  border: none;
  padding: 5px 15px;
  border-radius: 4px;
  cursor: pointer;
}

/* --- Formularios --- */
#addAthleteForm input, #addAthleteForm select {
  background: #222;
  border: 1px solid #444;
  color: white;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

#addAthleteForm button {
  background-color: #ff6b00;
  color: black;
  font-weight: bold;
  border: none;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

#addAthleteForm button:hover {
  background-color: #e65a00;
}

/* --- Footer --- */
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background-color: #000;
  position: fixed;
  bottom: 0;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid #333;
}

#editAccessBtn {
  background: none;
  border: none;
  color: #444;
  font-size: 1.2em;
  cursor: pointer;
}

/* --- Ajustes Mobile --- */
@media (max-width: 768px) {
  .scores-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .header-title { font-size: 1.5em; }
  
  .app-footer {
    flex-direction: row;
    padding: 15px 20px;
  }
}
