@font-face {
  font-family: 'ORBITRON';
  src: url('../fonts/Orbitron-Bold.ttf') format('truetype');
  font-style: normal;
  font-weight: normal;
}

* {
  font-family: 'ORBITRON';
}

/* Fondo general */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #ff073a, #00b0ff);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  /* Cambiado de 'hidden' a 'auto' */
  overflow-x: hidden;
}

/* Contenedor del visor 3D */
.sketchfab-embed-wrapper {
  width: 100%;
  max-width: 1920px;
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.4);
  border-radius: 15px;
  overflow: hidden;
  z-index: -999;
  filter: saturate(1.5);
}

.botonInicio {
  z-index: 10;
  /* Mayor z-index para estar por encima del logo */
  position: absolute;
  top: 70%;
  width: 10vw;
  height: 5vh;
  border-radius: 10px;
  left: 50%;
  transform: translateX(-50%);
  /* Centra horizontalmente */
  background-color: rgba(255, 255, 255, 0.8);
  /* Fondo semi-transparente */
  border: none;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.f1 {
  z-index: 0;
  /* Menor z-index para estar detrás del botón */
  position: absolute;
  filter: saturate(0.2);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* Centra el logo */
  max-width: 50%;
  opacity: 0.7;
  /* Semi-transparente */
}

.boton {
  z-index: 11;
  position: relative;
  /* Cambiado de absolute a relative */
  display: block;
  text-align: center;
  width: 100%;
}

/* El resto de los estilos se mantienen igual */
.piloto {
  z-index: 12;
  position: relative;
  top: 50%;
  right: 40%;
  width: 30vw;
  border-radius: 20%;

}

.administrador {
  z-index: 12;
  position: absolute;
  bottom: 0%;
  left: 40%;
  width: 30vw;
  border-radius: 20%;
}

.botonAdministrador {
  z-index: 12;
  position: relative;

}

.botonUsuario {
  z-index: 13;
  position: relative;
  right: 100%;
}

/* Add these styles to your existing CSS */

.botonVolver {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
  font-family: 'ORBITRON';
}

#vista-usuario,
#vista-admin {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
}



/* F1 User View Styles */

/* Header styles */
.f1-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(255, 0, 0, 0.5);
  border-bottom: 2px solid #e10600;
}

.logo-container {
  width: 80px;
}

.header-logo {
  width: 100%;
  height: auto;
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  margin: 0 20px;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-family: 'ORBITRON';
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: #e10600;
}

.exit-link {
  color: #e10600 !important;
  font-weight: bold;
}

.content-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/fondo_carro.jpg');
  background-size: cover;
  background-position: center;
  z-index: -1;
  filter: none;
  /* Quitar el brightness(0.7) */
}


/* Content sections */
#vista-usuario {
  margin-top: 50px;
  width: 100%;
  min-height: 100vh;
  position: relative;
  overflow-y: auto;
  /* Permitir scroll vertical */
}

.contenido-usuario {

  padding: 50px;
  margin-top: 40px;
}

/* Ajuste para contenedores de secciones */
.contenido-usuario section {
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(225, 6, 0, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.contenido-usuario h2 {
  color: #e10600;
  font-family: 'ORBITRON';
  border-bottom: 1px solid #e10600;
  padding-bottom: 10px;
}

/* Estilos para la selección de usuarios */
#nuevo-contenido {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #ff073a, #00b0ff);
  z-index: 100;
}

.seleccion-usuario {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  height: 80vh;
  padding: 20px;
}


.section-title {
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  border-bottom: 2px solid #e10600;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.usuario-opcion,
.admin-opcion {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40%;
}

.piloto,
.administrador {
  width: 100%;
  max-width: 350px;
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
  margin-bottom: 30px;
  transition: transform 0.3s ease;
}

.piloto:hover,
.administrador:hover {
  transform: scale(1.05);
}

.botonUsuario,
.botonAdministrador {
  padding: 12px 30px;
  border: none;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.botonUsuario {
  background-color: #ffd700;
  /* Amarillo F1 */
  color: #000;
}

.botonAdministrador {
  background-color: #e10600;
  /* Rojo F1 */
  color: #fff;
}

.botonUsuario:hover,
.botonAdministrador:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.botonVolver {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 30px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  text-transform: uppercase;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

/* Estilos específicos para centrar imágenes y botones en la pantalla de selección */
#nuevo-contenido .seleccion-usuario {
  display: flex;
  justify-content: center;
  align-items: center;
}

#nuevo-contenido .usuario-opcion,
#nuevo-contenido .admin-opcion {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 5%;
}

#nuevo-contenido .piloto,
#nuevo-contenido .administrador {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  width: 300px;
  height: 300px;
  object-fit: cover;
}

#nuevo-contenido .botonUsuario,
#nuevo-contenido .botonAdministrador {
  position: static;
  right: auto;
  margin-top: 20px;
}

/* Ajustes para la barra de navegación */
.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
  /* Centra los elementos horizontalmente */
}

.main-nav li {
  margin: 0 40px;
  /* Aumenta el espacio entre elementos */
  padding: 10px 0;
  /* Añade espacio vertical */
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-family: 'ORBITRON';
  font-size: 1.2rem;
  /* Aumenta ligeramente el tamaño de fuente */
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
  padding: 5px 10px;
  /* Añade padding alrededor del texto */
}

.main-nav a:hover {
  color: #e10600;
  background-color: rgba(255, 255, 255, 0.1);
  /* Efecto hover sutil */
  border-radius: 5px;
}

.exit-link {
  color: #e10600 !important;
  font-weight: bold;
}


/* Estilos para el dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #000;
  border: 1px solid #e10600;
  border-top: none;
  width: 200px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  flex-direction: column;
}

.dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-menu li {
  padding: 0;
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  color: #fff !important;
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
  background-color: #e10600;
  border-left: 3px solid #fff;
}

/* Ajuste para el enlace principal */
.dropdown-toggle::after {
  content: " ▼";
  font-size: 0.8em;
}

#vista-admin {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/fondo_carro.jpg');
  background-size: cover;
  background-position: center;
  overflow-y: auto;
}

.admin-header {
  background-color: #000;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid red;
}

.logo {
  font-weight: bold;
  font-size: 18px;
}

.menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

.exit-btn {
  background: none;
  border: none;
  color: red;
  font-size: 16px;
  cursor: pointer;
}

.dropbtn {
  background-color: transparent;
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

.dropbtn:hover,
.dropbtn:focus {
  color: #e10600;
  outline: none;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #111;
  min-width: 160px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
  z-index: 1;
  right: 0;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
  border: solid 1px #e10600;
}

.dropdown-content a {
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #e10600;
  border-left: 4px solid #fff;
}

.dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.contenido-admin {
  flex: 1;
  padding: 20px;
}

/* Estilos para la sección de vehículos */
.vehiculos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.vehiculo-card {
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
}

.vehiculo-card:hover {
  transform: translateY(-5px);
}

.vehiculo-imagen img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.vehiculo-info {
  padding: 15px;
}

.vehiculo-info h3 {
  margin-top: 0;
  color: #e10600;
  font-size: 1.4rem;
}

.stats {
  margin-top: 15px;
}

.stat {
  margin-bottom: 10px;
}

.stat-label {
  font-size: 0.9rem;
  display: block;
  margin-bottom: 3px;
}

.stat-bar {
  height: 8px;
  background: #444;
  border-radius: 4px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: #e10600;
  border-radius: 4px;
}

.stat-value {
  font-size: 0.8rem;
  display: block;
  text-align: right;
  margin-top: 2px;
}

.loading,
.error-message,
.no-data {
  text-align: center;
  padding: 30px;
  font-size: 1.2rem;
}

.error-message button {
  background: #e10600;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  margin-top: 10px;
  cursor: pointer;
  font-family: 'ORBITRON';
}

.error-message button:hover {
  background: #ff0700;
}


/* Estilos para la sección de pilotos */
.pilotos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.piloto-card {
  background: rgba(10, 10, 10, 0.8);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  position: relative;
  border: 1px solid rgba(225, 6, 0, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
}

.piloto-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px rgba(225, 6, 0, 0.4);
}

.piloto-numero {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #e10600;
  color: white;
  font-size: 1.8rem;
  font-weight: bold;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.piloto-imagen {
  height: 220px;
  position: relative;
  overflow: hidden;
}

.piloto-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.piloto-card:hover .piloto-imagen img {
  transform: scale(1.1);
}

.piloto-info {
  padding: 20px;
}

.piloto-info h3 {
  margin-top: 0;
  color: #ffffff;
  font-size: 1.5rem;
  border-bottom: 2px solid #e10600;
  padding-bottom: 8px;
  margin-bottom: 15px;
}

.piloto-info p {
  margin: 8px 0;
  font-size: 0.95rem;
}

.piloto-info p span {
  color: #e10600;
  font-weight: bold;
}

.stats-container {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  padding: 15px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: #e10600;
}

.stat-label {
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
}

.piloto-ranking {
  background: linear-gradient(90deg, rgba(225, 6, 0, 0.2), rgba(225, 6, 0, 0.05));
  padding: 10px;
  border-radius: 5px;
  text-align: center;
  margin-top: 10px;
}

.ranking-label {
  font-weight: bold;
  margin-right: 10px;
}

.ranking-value {
  font-size: 1.2rem;
  color: #e10600;
}

/* Estilos para la sección de circuitos */
.circuitos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 25px;
}

.circuito-card {
  background: rgba(10, 10, 10, 0.8);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(225, 6, 0, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.circuito-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px rgba(225, 6, 0, 0.4);
}

.circuito-header {
  background: #e10600;
  color: white;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.circuito-gp {
  font-weight: bold;
  font-size: 0.9rem;
}

.circuito-fecha {
  font-size: 0.8rem;
  opacity: 0.9;
}

.circuito-imagen {
  height: 200px;
  overflow: hidden;
}

.circuito-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.circuito-card:hover .circuito-imagen img {
  transform: scale(1.05);
}

.circuito-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.circuito-info h3 {
  margin-top: 0;
  color: #ffffff;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.circuito-ubicacion {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.pais-bandera {
  font-size: 1.5rem;
  margin-right: 10px;
}

.pais-nombre {
  font-size: 1.1rem;
  color: #cccccc;
}

.circuito-datos {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 8px;
}

.dato {
  text-align: center;
  flex: 1;
}

.dato-valor {
  font-size: 1.3rem;
  font-weight: bold;
  color: #ffffff;
}

.dato-label {
  font-size: 0.8rem;
  color: #999;
  margin-top: 5px;
}

.circuito-record {
  background: rgba(225, 6, 0, 0.1);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

.record-title {
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #e10600;
  margin-bottom: 5px;
}

.record-tiempo {
  font-size: 1.4rem;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 5px;
}

.record-piloto {
  font-size: 0.9rem;
  color: #cccccc;
}

.circuito-descripcion {
  margin-top: auto;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #aaaaaa;
}

/* Estilos para la sección de equipos */
.equipos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 25px;
}

.equipo-card {
  background: rgba(15, 15, 15, 0.85);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s, box-shadow 0.3s;
}

.equipo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
}

.equipo-header {
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.equipo-logo {
  max-height: 80px;
  max-width: 80%;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.equipo-info {
  padding: 25px;
}

.equipo-info h3 {
  margin-top: 0;
  color: #ffffff;
  font-size: 1.7rem;
  text-align: center;
  margin-bottom: 15px;
}

.equipo-pais {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.pais-bandera {
  font-size: 1.5rem;
  margin-right: 10px;
}

.pais-nombre {
  font-size: 1.1rem;
  color: #cccccc;
}

.equipo-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 25px;
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 10px;
}

.stat-bloque {
  text-align: center;
}

.stat-numero {
  font-size: 1.8rem;
  font-weight: bold;
  color: #e10600;
}

.stat-texto {
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
  margin-top: 5px;
}

.equipo-detalles {
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
}

.equipo-detalles p {
  margin: 8px 0;
  font-size: 0.95rem;
}

.equipo-detalles strong {
  color: #e10600;
}

.equipo-pilotos {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  padding: 15px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.piloto-item {
  text-align: center;
  position: relative;
  width: 90px;
}

.piloto-item img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e10600;
}

.piloto-item span {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
}

.numero-piloto {
  position: absolute;
  top: -5px;
  right: 5px;
  background: #e10600;
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.equipo-descripcion {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #aaaaaa;
}

.btn-borrar-piloto {
  background: #e10600;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  margin-top: 15px;
  font-size: 1rem;
  font-family: 'ORBITRON';
  cursor: pointer;
  transition: background 0.2s;
}

.btn-borrar-piloto:hover {
  background: #b30000;
}

.btn-borrar-vehiculo,
.btn-borrar-circuito,
.btn-borrar-equipo {
  background: #e10600;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  margin-top: 15px;
  font-size: 1rem;
  font-family: 'ORBITRON';
  cursor: pointer;
  transition: background 0.2s;
}

.btn-borrar-vehiculo:hover,
.btn-borrar-circuito:hover,
.btn-borrar-equipo:hover {
  background: #b30000;
}

.btn-agregar-dropdown {
  background: #1bc700;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  margin: 8px 0;
  font-size: 1rem;
  font-family: 'ORBITRON';
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.2s;
}

.btn-agregar-dropdown:hover {
  background: #158a00;
}

.modal {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  /* Permite scroll si el modal es muy grande */
}

.modal-content {
  background: #181818;
  color: #fff;
  padding: 32px 40px 28px 40px;
  border-radius: 14px;
  width: 50%;
  height: 80vh;
  min-width: 320px;
  max-width: 98vw;
  max-height: 95vh;
  position: relative;
  box-shadow: 0 0 32px 0 #e10600cc;
  border: 2px solid #e10600;
  font-family: 'ORBITRON', Arial, sans-serif;
  overflow-x: auto;
  /* Scroll horizontal si es necesario */
  overflow-y: auto;
  /* Scroll vertical si es necesario */
}

/* Responsive para pantallas pequeñas */
@media (max-width: 600px) {
  .modal-content {
    padding: 18px 6vw 18px 6vw;
    min-width: 0;
    max-width: 100vw;
    max-height: 98vh;
    font-size: 0.95rem;
  }

  #formAgregar label,
  #formAgregar input,
  #formAgregar textarea {
    font-size: 0.95rem;
  }
}

.dropdown-content li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guardarJS {
  background: #e10600;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  margin-top: 15px;
  font-size: 1rem;
  font-family: 'ORBITRON';
  cursor: pointer;
}

/* Media Queries para hacer el sitio responsive */

/* Para dispositivos móviles pequeños */
@media screen and (max-width: 480px) {

  /* Ajustes generales */
  body {
    padding: 10px;
  }

  /* Ajustes para la barra de navegación */
  .f1-header {
    flex-direction: column;
    padding: 5px;
  }

  .logo-container {
    width: 60px;
    margin-bottom: 10px;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
  }

  .main-nav li {
    margin: 5px 0;
  }

  /* Ajustes para la pantalla de selección */
  .seleccion-usuario {
    flex-direction: column;
    height: auto;
  }

  .usuario-opcion,
  .admin-opcion {
    width: 90%;
    margin: 15px 0;
  }

  .piloto,
  .administrador {
    max-width: 200px;
  }

  /* Ajustes para grids */
  .vehiculos-grid,
  .pilotos-grid,
  .circuitos-grid,
  .equipos-grid {
    grid-template-columns: 1fr;
  }

  /* Ajustes para tarjetas */
  .vehiculo-card,
  .piloto-card,
  .circuito-card,
  .equipo-card {
    margin: 0 auto;
    width: 95%;
  }

  /* Ajustes para el modal */
  .modal-content {
    width: 90%;
    padding: 15px;
  }

  /* Botones */
  .botonUsuario,
  .botonAdministrador,
  .btn-borrar-piloto,
  .btn-borrar-vehiculo,
  .btn-borrar-circuito,
  .btn-borrar-equipo,
  .btn-agregar-dropdown {
    padding: 8px 15px;
    font-size: 0.9rem;
  }
}

/* Para tablets y dispositivos móviles medianos */
@media screen and (min-width: 481px) and (max-width: 768px) {

  /* Ajustes generales */
  .contenido-usuario {
    padding: 20px;
  }

  /* Ajustes para la barra de navegación */
  .main-nav li {
    margin: 0 15px;
  }

  .main-nav a {
    font-size: 1rem;
  }

  /* Ajustes para grids */
  .vehiculos-grid,
  .pilotos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .circuitos-grid,
  .equipos-grid {
    grid-template-columns: 1fr;
  }

  /* Ajustes para el modal */
  .modal-content {
    width: 80%;
  }

  /* Ajustes para la pantalla de selección */
  .piloto,
  .administrador {
    max-width: 250px;
  }
}

/* Para tablets horizontales y pantallas pequeñas */
@media screen and (min-width: 769px) and (max-width: 1024px) {

  /* Ajustes generales */
  .contenido-usuario {
    padding: 30px;
  }

  /* Ajustes para grids */
  .vehiculos-grid,
  .pilotos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .circuitos-grid,
  .equipos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Ajustes para el modal */
  .modal-content {
    width: 70%;
  }
}

/* Para pantallas medianas */
@media screen and (min-width: 1025px) and (max-width: 1366px) {

  /* Ajustes para grids */
  .vehiculos-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pilotos-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .circuitos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .equipos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Ajustes para dropdown en pantallas pequeñas */
@media screen and (max-width: 768px) {
  .dropdown-menu {
    width: 100%;
    position: static;
    box-shadow: none;
    margin-top: 5px;
  }

  .dropdown {
    width: 100%;
    text-align: center;
  }

  .dropdown-toggle::after {
    margin-left: 10px;
  }

  /* Ajustes para administrador */
  .admin-header {
    flex-direction: column;
  }

  .menu {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
  }

  /* Ajustes para estadísticas */
  .stats-container {
    flex-direction: column;
  }

  .stat-item {
    margin-bottom: 10px;
  }

  .circuito-datos {
    flex-direction: column;
  }

  .dato {
    margin-bottom: 10px;
  }

  .equipo-stats {
    flex-direction: column;
  }

  .stat-bloque {
    margin-bottom: 10px;
  }
}

/* Ajustes para orientación landscape en móviles */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .seleccion-usuario {
    flex-direction: row;
    justify-content: space-around;
    height: auto;
    padding: 10px;
  }

  .piloto,
  .administrador {
    max-width: 150px;
    height: 150px;
  }

  .f1-header {
    padding: 5px 10px;
  }

  /* Ajustar altura del modal para evitar scrolling excesivo */
  .modal-content {
    height: 90vh;
    max-height: 90vh;
  }
}

/* Ajustes para pantallas de alta resolución */
@media screen and (min-width: 1367px) {
  .contenido-usuario {
    max-width: 1600px;
    margin: 40px auto;
  }

  .vehiculos-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .pilotos-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .circuitos-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .equipos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Ajustes para tamaños de fuente responsive */
@media screen and (max-width: 480px) {
  .section-title {
    font-size: 1.5rem;
  }

  .vehiculo-info h3,
  .piloto-info h3,
  .circuito-info h3,
  .equipo-info h3 {
    font-size: 1.2rem;
  }

  .stat-value,
  .dato-valor,
  .stat-numero {
    font-size: 1.2rem;
  }
}

/* Ajustes para compatibilidad con dispositivos antiguos */
@supports not (display: grid) {

  .vehiculos-grid,
  .pilotos-grid,
  .circuitos-grid,
  .equipos-grid {
    display: flex;
    flex-wrap: wrap;
  }

  .vehiculo-card,
  .piloto-card,
  .circuito-card,
  .equipo-card {
    flex: 0 0 calc(50% - 20px);
    margin: 10px;
  }

  @media screen and (max-width: 768px) {

    .vehiculo-card,
    .piloto-card,
    .circuito-card,
    .equipo-card {
      flex: 0 0 100%;
    }
  }
}

/* Ajustes de accesibilidad para contraste y tamaño de toque */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Optimización para dispositivos de pantalla táctil */
@media (hover: none) {

  .botonUsuario,
  .botonAdministrador,
  .btn-borrar-piloto,
  .btn-borrar-vehiculo,
  .btn-borrar-circuito,
  .btn-borrar-equipo,
  .btn-agregar-dropdown {
    padding: 12px 20px;
    /* Botones más grandes para tocar */
  }

  .main-nav a {
    padding: 10px 15px;
  }

  .dropdown-menu a {
    padding: 15px 20px;
  }
}

/* Actualización para hacer las imágenes de vehículos más grandes */
.vehiculo-imagen {
  height: 300px;
  /* Aumento de altura (era 180px originalmente) */
  overflow: hidden;
  position: relative;
}

.vehiculo-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

/* Efecto hover para las imágenes */
.vehiculo-card:hover .vehiculo-imagen img {
  transform: scale(1.05);
}

/* Ajustes responsivos para diferentes tamaños de pantalla */
@media screen and (max-width: 768px) {
  .vehiculo-imagen {
    height: 250px;
    /* Altura un poco menor para tablets */
  }
}

@media screen and (max-width: 480px) {
  .vehiculo-imagen {
    height: 220px;
    /* Altura adaptada para móviles */
  }
}


/* Actualización para hacer las imágenes de pilotos más grandes */
.piloto-imagen {
  height: 300px;
  /* Aumento de altura (era 180px originalmente) */
  overflow: hidden;
  position: relative;
}

.piloto-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

/* Efecto hover para las imágenes */
.piloto-card:hover .piloto-imagen img {
  transform: scale(1.05);
}

/* Ajustes responsivos para diferentes tamaños de pantalla */
@media screen and (max-width: 768px) {
  .piloto-imagen {
    height: 250px;
    /* Altura un poco menor para tablets */
  }
}

@media screen and (max-width: 480px) {
  .piloto-imagen {
    height: 220px;
    /* Altura adaptada para móviles */
  }
}

/* Actualización para hacer las imágenes de pilotos más grandes */
.equipo-imagen {
  height: 300px;
  /* Aumento de altura (era 180px originalmente) */
  overflow: hidden;
  position: relative;
}

.equipo-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

/* Efecto hover para las imágenes */
.equipo-card:hover .equipo-imagen img {
  transform: scale(1.05);
}

/* Ajustes responsivos para diferentes tamaños de pantalla */
@media screen and (max-width: 768px) {
  .equipo-imagen {
    height: 250px;
    /* Altura un poco menor para tablets */
  }
}

@media screen and (max-width: 480px) {
  .equipo-imagen {
    height: 220px;
    /* Altura adaptada para móviles */
  }
}

/* Actualización para hacer las imágenes de pilotos más grandes */
.circuito-imagen {
  height: 300px;
  /* Aumento de altura (era 180px originalmente) */
  overflow: hidden;
  position: relative;
}

.circuito-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

/* Efecto hover para las imágenes */
.circuito-card:hover .circuito-imagen img {
  transform: scale(1.05);
}

/* Ajustes responsivos para diferentes tamaños de pantalla */
@media screen and (max-width: 768px) {
  .circuito-imagen {
    height: 250px;
    /* Altura un poco menor para tablets */
  }
}

@media screen and (max-width: 480px) {
  .circuito-imagen {
    height: 220px;
    /* Altura adaptada para móviles */
  }
}

/* ESTILOS PARA PILOTOS - ADMIN */
#ADMINpilotos .piloto-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.3s ease;
}
#ADMINpilotos .piloto-imagen:hover img {
  transform: scale(1.05);
}
#ADMINpilotos .piloto-info {
  padding: 20px;
}
#ADMINpilotos .piloto-info h3 {
  margin: 0 0 10px 0;
  font-size: 1.4em;
  font-weight: bold;
  color: #e10600;
}
#ADMINpilotos .pilotos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

/* ESTILOS PARA VEHÍCULOS - ADMIN */
#ADMINvehiculos .vehiculo-imagen img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Muestra el vehículo completo */
  object-position: center;
  transition: transform 0.3s ease;
}
#ADMINvehiculos .vehiculo-imagen:hover img {
  transform: scale(1.05);
}
#ADMINvehiculos .vehiculo-info {
  padding: 20px;
}
#ADMINvehiculos .vehiculo-info h3 {
  margin: 0 0 10px 0;
  font-size: 1.4em;
  font-weight: bold;
  color: #e10600;
}
#ADMINvehiculos .vehiculos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

/* ESTILOS PARA EQUIPOS - ADMIN */
#ADMINequipos .equipo-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.3s ease;
}
#ADMINequipos .equipo-imagen:hover img {
  transform: scale(1.05);
}
#ADMINequipos .equipo-info {
  padding: 20px;
}
#ADMINequipos .equipo-info h3 {
  margin: 0 0 10px 0;
  font-size: 1.4em;
  font-weight: bold;
  color: #e10600;
}
#ADMINequipos .equipos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

/* ESTILOS PARA CIRCUITOS - ADMIN */
#ADMINcircuitos .circuito-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.3s ease;
}
#ADMINcircuitos .circuito-imagen:hover img {
  transform: scale(1.05);
}
#ADMINcircuitos .circuito-info {
  padding: 20px;
}
#ADMINcircuitos .circuito-info h3 {
  margin: 0 0 10px 0;
  font-size: 1.4em;
  font-weight: bold;
  color: #e10600;
}
#ADMINcircuitos .circuitos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}