/* =========================================
   1. FUENTES Y RESET GLOBALES
   ========================================= */
@font-face {
  font-family: 'Chewy';
  src: url('Chewy-Regular.ttf');
}

@font-face {
  font-family: 'Gagalin';
  src: url('Gagalin-Regular.otf');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #cffafe;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
  padding: 20px 0;
}

/* =========================================
   2. ESTILOS COMUNES (Para todas las pantallas)
   ========================================= */
.main-container,
.main-container-reg,
.main-container-rol,
.main-container-datos,
.main-container-deportista {
  width: 90%;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.btn {
  align-self: center;
  width: 100%;
  border-radius: 25px;
  background: #2563eb;
  color: white;
  font-family: 'Gagalin';
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
}
.btn:hover {
  background: #1e4ed8;
  transform: scale(1.03);
}
.watermark {
  align-self: center;
  margin-top: auto;
  font-family: 'Gagalin';
  letter-spacing: 2px;
  color: #111827;
  opacity: 0.6;
}

.logo-text1, .logo-text-vulpine {
  font-family: 'Gagalin';
  color: #0f172a;
  text-shadow: 0 2px 3px rgba(0,0,0,0.4);
}
.logo-text2, .logo-text-archery {
  font-family: 'Gagalin';
  color: #2563eb;
  text-shadow: 0 2px 3px rgba(0,0,0,0.4);
}
.logoTA {
  margin-top: 2vh;
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
  gap: 15px;
  font-family: 'Gagalin';
  width: 100%;
}
.page-title {
  font-family: 'Chewy';
  font-size: 3rem;
  color: #0f172a;
  text-align: center;
  width: 100%;
  margin-bottom: 15px;
}

.form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.form-group label {
  font-family: 'Chewy';
  font-size: 2rem;
  color: #0f172a;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 20px;
  border: 3px solid #0f172a;
  border-radius: 12px;
  font-size: 1.5rem;
  font-family: sans-serif;
  outline: none;
  background-color: #fff9c4;
  color: #0f172a;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #2563eb;
}

/* =========================================
   3. INDEX.HTML (Página de Inicio)
   ========================================= */
.main-container {
  max-width: 400px;
}
.logo {
  margin-top: 5vh;
  margin-bottom: 5vh;
  font-size: 2.5rem;
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.55;
}
.logo .logo-text2 {
  transform: translateY(-5px);
}
.auth-options {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.auth-options .btn {
  max-width: 300px;
  padding: 15px;
  font-size: 1.6rem;
}
.separator {
  font-family: 'Chewy';
  font-size: 1.8rem;
  color: #0f172a;
}
.main-container .watermark {
  font-size: 1.2rem;
}

/* =========================================
   4. REGISTRO.HTML
   ========================================= */
.main-container-reg {
  max-width: 500px;
}
.logo-text-vulpine, .logo-text-archery {
  font-size: 4.5rem;
}
.op-reg {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}
.op-reg .btn {
  max-width: 380px;
  padding: 20px;
  font-size: 2rem;
  margin-top: 15px;
}
.main-container-reg .watermark {
  font-size: 1.6rem;
}

/* =========================================
   5. CONFIRMACION.HTML
   ========================================= */
.code-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  width: 100%;
  margin: 20px 0;
}
.code-input {
  width: 65px;
  height: 90px;
  font-size: 3.5rem;
  font-family: 'Chewy', sans-serif;
  text-align: center;
  text-transform: uppercase;
  border: 3px solid #0f172a;
  border-radius: 12px;
  background-color: #ffffff;
  outline: none;
  transition: 0.3s;
}
.code-input:focus {
  border-color: #2563eb;
  transform: scale(1.05);
  background-color: #fff9c4;
}

/* =========================================
   6. ROL.HTML
   ========================================= */
.main-container-rol {
  max-width: 700px;
}
.main-container-rol .logoTA {
  padding-bottom: 80px;
}
.main-container-rol .watermark {
  font-size: 3rem;
  padding-bottom: 3vh;
}
.op-rol {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}
.op-rol .btn{
  max-width: 380px;
  padding: 20px;
  font-size: 4rem;
  margin-top: 15px;
}
.btnRol {
  display: flex;
  gap: 40px;
  width: 100%;
  justify-content: center;
}
.btnRol .btn {
  font-family: 'Chewy';
  background-color: white;
  color: black;
  border: 2px solid black;
}
.btnRol .btn:hover {
  background-color: #e0f2fe;
  color: #2563eb;
}
.btnRol .btn.selected {
  background-color: #2563eb;
  color: white;
}
.btnRol .btn.selected:hover {
  background-color: #1e4ed8;
}

/* =========================================
   7. DATOS.HTML
   ========================================= */
.main-container-datos {
  max-width: 500px;
}
.op-datos {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}
.op-datos .btn {
  max-width: 380px;
  padding: 20px;
  font-size: 2rem;
  margin-top: 15px;
}
.main-container-datos .watermark {
  font-size: 1.6rem;
}
.oculto {
  display: none !important;
}

/* =========================================
   8. DEPORTISTA.HTML (Actualizado con FAB y Tarjetas)
   ========================================= */
.main-container-deportista {
  width: 90%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 120px 0; /* Espacio inferior para que el menú no tape el contenido */
  margin: 0 auto;
}
.deportistaSaludo {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  gap: 10px;
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-family: 'Chewy', cursive;
}
.acordeon {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: transparent; /* Permite ver el fondo azul global */
  padding: 0;
}
.item {
  background-color: white;
  border-radius: 15px;
  width: 100%;
  box-sizing: border-box;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.headerDep {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 2rem;
  cursor: pointer;
  font-weight: bold;
  font-family: 'Chewy', cursive;
}
.icon-chevron {
  font-size: 2.5rem;
  transition: transform 0.3s;
}
.collapsed-item .icon-chevron {
  transform: rotate(180deg);
}
.collapsed-item .contentDep {
  display: none;
}
.contentDep {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
  font-family: 'Chewy', cursive;
}
.infoDeport {
  display: flex;
  justify-content: space-between;
  font-size: 1.6rem;
  font-weight: bold;
}
.objetivo, .feedCoach {
  background-color: #cffafe;
  border-radius: 10px;
  padding: 15px;
  font-size: 1.5rem;
  text-align: left;
  min-height: 50px;
}
.analisisCoach {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 15px;
  flex-wrap: wrap; /* Adaptable a móvil */
}
.analisisCoach .diana {
  width: 120px;
  flex-shrink: 0;
  object-fit: contain;
}
.feedCoach {
  flex-grow: 1;
  margin: 0;
}
.resVista {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
}
.resultados {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 1.6rem;
  font-weight: bold;
}
.vista {
  background: #cffafe;
  border: 1px solid #1a202c;
  border-radius: 8px;
  padding: 5px 15px;
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.2s;
}
.vista:hover {
  transform: scale(1.1);
}
.fab-container {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%); /* Centra el menú flotante en la pantalla */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  z-index: 1000;
}
.fab-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}
.fab-menu.mostrar {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.fab-option {
  background-color: white;
  color: #1a202c;
  font-family: 'Chewy', cursive;
  font-size: 1.4rem;
  padding: 10px 20px;
  border: 2px solid #1a202c;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s, background-color 0.2s;
  white-space: nowrap;
}
.fab-option:hover {
  background-color: #2563eb;
  color: white;
  border-color: #2563eb;
  transform: scale(1.05);
}
.fab-container .btn-circular {
  width: 70px;
  height: 70px;
  background-color: #2563eb;
  color: white;
  font-size: 4rem;
  line-height: 1;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  transition: transform 0.3s, background-color 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 5px; /* Centrado visual del símbolo '+' */
}
.fab-container .btn-circular.rotar {
  transform: rotate(45deg); /* Convierte el '+' en una 'X' */
  background-color: #ef4444; /* Cambia a rojo */
}

/* =========================================
   9. series.HTML
   ========================================= */
body {
  /* Fondo azul claro inspirado en tu imagen */
  background-color: #d1f4ff;
  margin: 0;
  padding: 20px 0;
  display: flex;
  justify-content: center;
}
.main-container-series{
  width: 90%;
  max-width: 800px; /* Evita que se estire demasiado en PC */
  min-height: 95vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  font-family: 'Chewy', cursive; /* Asegúrate de tener importada esta fuente */
  gap: 20px;
}
.seriesFecha,
.parametrosSeries,
.serie,
.seccion-estadisticas {
  width: 100%;
}
.serieDeportista{
  display: block;
  width: 100%;
  padding: 10px;
  font-size: 2.2rem;
  font-weight: bold;
  color: #1a202c;
}
.parametrosSeries{
  background-color: #ffffff;
  font-size: 1.2rem;
  padding: 15px 20px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.parametrosSeries label{
  white-space: nowrap;
  font-weight: bold;
}
.serie{
  padding: 20px;
  background-color: #ffffff;
  border-radius: 15px;
}
.tablaDiana{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.tablaContainer{
  flex-grow: 1;
}
.serie table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 5px;
  text-align: center;
}
.serie th{
  padding: 8px;
  font-size: 1.5rem;
}
.serie td{
  padding: 10px;
  font-size: 1.5rem;
  font-weight: bold;
}
.datos1, .datos2{
  font-size: 1.2rem;
  margin-top: 5px;
  font-weight: bold;
}
.serie .diana{
  width: 150px;
  flex-shrink: 0;
}
.seccion-estadisticas {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
}
.contenedor-grafico {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 15px;
  flex-grow: 1;
  display: flex;
  align-items: center;
  /* 🔥 ESTA LÍNEA ES LA CLAVE PARA QUE NO SE DESBORDE 🔥 */
  min-width: 0;
}
.titulo-grafico {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 1.5rem;
  font-weight: bold;
  margin-right: 15px;
  text-align: center;
  flex-shrink: 0; /* Evita que el texto se aplaste */
}
.canvas-container {
  position: relative;
  flex-grow: 1;
  height: 200px;
  min-width: 0; /* Mantiene a raya el Chart.js */
}
canvas#miGrafico {
  width: 100% !important;
  height: 100% !important;
}
.btn-circular {
  width: 85px; /* Ligeramente más pequeño para no saturar */
  height: 85px;
  background-color: #2563eb;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0; /* Evita que el botón se deforme */
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}
.btn-circular:hover {
  transform: scale(1.05);
}
.watermark {
  font-size: 1.2rem;
  color: #64748b;
  font-weight: bold;
}

/* =========================================
   MEDIA QUERIES (Responsividad)
   ========================================= */
@media (min-width: 481px) {
  .logo-text-vulpine, .logo-text-archery { font-size: 5.5rem; }
  .page-title { font-size: 3.5rem; }
  .form-group label { font-size: 2.3rem; }

  .main-container { max-width: 500px; }
  .logo { font-size: 3rem; }
  .auth-options .btn { font-size: 1.8rem; }

  .main-container-reg, .main-container-datos { max-width: 600px; }
  .op-reg .btn, .op-datos .btn { font-size: 2.2rem; max-width: 450px; }

  .code-input {
    width: 50px;
    height: 75px;
    font-size: 2.8rem;
  }
  .code-container {
    gap: 8px;
  }
}
@media (max-width: 600px){
  .parametrosSeries{
    flex-wrap:wrap; /* en celular sí baja */
    justify-content:center;
    gap:10px;
  }
}
@media (min-width: 1025px) {
  .logo-text-vulpine, .logo-text-archery { font-size: 6.5rem; }
  .page-title { font-size: 4rem; }
  .form-group label { font-size: 2.6rem; }
  .form-group input, .form-group select { font-size: 1.8rem; padding: 25px; } /* Ajuste también para el select */

  .main-container { max-width: 600px; }
  .logo { font-size: 3.5rem; }
  .auth-options .btn { font-size: 2rem; padding: 18px; max-width: 350px; }

  .main-container-reg, .main-container-datos { max-width: 800px; }
  .op-reg .btn, .op-datos .btn { font-size: 2.5rem; padding: 25px; max-width: 500px; }
}
