:root {
  /* Paleta de colores Premium Oscuro-Neón */
  --bg-color: #08090c;
  --bg-surface: #12141c;
  --bg-surface-glass: rgba(18, 20, 28, 0.7);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-neon-primary: rgba(57, 255, 20, 0.2);
  --border-neon-secondary: rgba(0, 240, 255, 0.2);
  
  --primary: #39ff14;         /* Verde Neón Deportivo */
  --primary-glow: rgba(57, 255, 20, 0.45);
  --secondary: #00f0ff;       /* Cian Neón Tecnológico */
  --secondary-glow: rgba(0, 240, 255, 0.45);
  --accent: #ff007f;          /* Rosa Neón Energético */
  --accent-glow: rgba(255, 0, 127, 0.4);
  
  --text-primary: #f5f6fa;
  --text-secondary: #8e92a4;
  --text-muted: #4e5264;
  
  --success: #00e676;
  --warning: #ffb300;
  --danger: #ff1744;
  
  --card-radius: 18px;
  --btn-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  --shadow-neon-primary: 0 0 15px var(--primary-glow);
  --shadow-neon-secondary: 0 0 15px var(--secondary-glow);
}

/* Light theme overrides */
body.light-theme {
  --bg-color: #f5f6f9;
  --bg-surface: #ffffff;
  --bg-surface-glass: rgba(255, 255, 255, 0.85);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-neon-primary: rgba(21, 204, 0, 0.2);
  --border-neon-secondary: rgba(0, 158, 168, 0.2);
  --primary: #15cc00;         /* Verde denso */
  --primary-glow: rgba(21, 204, 0, 0.45);
  --secondary: #009ea8;       /* Cian denso */
  --secondary-glow: rgba(0, 158, 168, 0.45);
  --accent: #e91e63;          /* Rosa denso */
  --accent-glow: rgba(233, 30, 99, 0.4);
  
  --text-primary: #1a1c24;
  --text-secondary: #5c6070;
  --text-muted: #8b8f9e;

  --shadow-neon-primary: 0 0 15px var(--primary-glow);
  --shadow-neon-secondary: 0 0 15px var(--secondary-glow);
}

/* Specific light theme component overrides */
body.light-theme .form-input {
  background: rgba(0, 0, 0, 0.03);
}

body.light-theme .form-input:focus {
  background: rgba(0, 0, 0, 0.01);
}

body.light-theme .exercise-setup-card {
  background: rgba(0, 0, 0, 0.015);
}

body.light-theme .series-input-wrapper {
  background: rgba(0, 0, 0, 0.03);
}

body.light-theme .chart-container {
  background: rgba(0, 0, 0, 0.015);
}

body.light-theme .settings-feature-card {
  background: rgba(0, 0, 0, 0.015);
}

body.light-theme .rest-hud {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), var(--shadow-neon-secondary);
}


/* Reset de estilos */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #000;
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

/* Contenedor tipo Simulador Móvil */
.phone-shell {
  width: 100%;
  max-width: 450px;
  height: 100vh;
  max-height: 900px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-glass);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
}

@media (min-width: 480px) {
  .phone-shell {
    height: 92vh;
    border-radius: 40px;
    border: 4px solid #1a1e29;
    box-shadow: 0 0 0 10px #11141b, 0 20px 40px rgba(0,0,0,0.8);
  }
}

/* Header superior */
header {
  padding: 24px 20px 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, var(--bg-color), var(--bg-surface-glass));
  z-index: 10;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  font-weight: 400;
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
}

/* Contenido Principal con Scroll */
main {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 90px 20px; /* Margen inferior para no tapar la barra de nav */
  scrollbar-width: none; /* Firefox */
}

main::-webkit-scrollbar {
  display: none; /* Safari & Chrome */
}

/* Barra de Navegación Inferior */
.nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px 10px 10px;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  transition: var(--transition-bounce);
  cursor: pointer;
  width: 60px;
  height: 55px;
  border-radius: 16px;
  position: relative;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: var(--transition-bounce);
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active svg {
  stroke: var(--primary);
  transform: translateY(-4px) scale(1.15);
  filter: drop-shadow(0 0 5px var(--primary-glow));
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0px;
  width: 5px;
  height: 5px;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary);
}

/* Vistas de Pestañas */
.view-panel {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.view-panel.active {
  display: block;
}

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

/* Tarjetas y Paneles Glassmorphism */
.glass-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--card-radius);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-bounce);
}

.glass-card:active {
  transform: scale(0.98);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  opacity: 0.7;
}

.glass-card.neon-border-green {
  border-color: var(--border-neon-primary);
}
.glass-card.neon-border-cyan {
  border-color: var(--border-neon-secondary);
}

/* Encabezados */
h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Botones Premium */
.btn {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  border-radius: var(--btn-radius);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-bounce);
  width: 100%;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #29cc0e);
  color: #000;
  font-weight: 700;
  border: none;
  box-shadow: var(--shadow-neon-primary);
}

.btn-primary:active {
  transform: scale(0.96);
  box-shadow: 0 0 5px var(--primary-glow);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), #00b8c4);
  color: #000;
  font-weight: 700;
  border: none;
  box-shadow: var(--shadow-neon-secondary);
}

.btn-secondary:active {
  transform: scale(0.96);
  box-shadow: 0 0 5px var(--secondary-glow);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #cc0066);
  color: var(--text-primary);
  font-weight: 700;
  border: none;
  box-shadow: 0 0 15px var(--accent-glow);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Vista de Inicio (Dashboard) */
.welcome-section {
  margin-top: 10px;
  margin-bottom: 24px;
}

.welcome-section h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.welcome-section p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 4px;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--card-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 8px;
}

.stat-val.primary {
  color: var(--primary);
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

.stat-val.secondary {
  color: var(--secondary);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Vista de Rutinas */
.routines-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.routine-list-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.routine-item-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.routine-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.routine-actions .btn {
  padding: 10px 14px;
  font-size: 13px;
}

/* Modales Premium */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: flex-end;
  z-index: 1000;
  transition: var(--transition);
}

.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.3s ease-out forwards;
}

.modal-content {
  width: 100%;
  background: var(--bg-surface);
  border-top: 2px solid var(--primary);
  border-radius: 28px 28px 0 0;
  padding: 24px 20px 40px 20px;
  max-height: 85%;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
  transform: translateY(100%);
  transition: var(--transition-bounce);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Formularios e Inputs */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--btn-radius);
  padding: 14px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

/* Select dropdown styling */
select.form-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #1a1d28;
  color: #f5f6fa;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e92a4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

select.form-input option {
  background-color: #1a1d28;
  color: #f5f6fa;
  padding: 10px 14px;
}

/* Light theme select overrides */
body.light-theme select.form-input {
  background-color: #f0f1f4;
  color: #1a1c24;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c6070' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

body.light-theme select.form-input option {
  background-color: #f0f1f4;
  color: #1a1c24;
}

/* Custom Dropdown Component (for language selector with flags) */
.custom-dropdown {
  position: relative;
}

.custom-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  font-family: 'Outfit', sans-serif;
}

.custom-dropdown-selected {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-dropdown-arrow {
  color: var(--text-secondary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.custom-dropdown.open .custom-dropdown-arrow {
  transform: rotate(180deg);
}

.flag-icon {
  width: 24px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #1a1d28;
  border: 1px solid var(--border-glass);
  border-radius: var(--btn-radius);
  padding: 6px;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.custom-dropdown.open .custom-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  transition: background 0.2s ease;
}

.custom-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.custom-dropdown-item.selected {
  background: rgba(57, 255, 20, 0.08);
  color: var(--primary);
}

/* Light theme custom dropdown */
body.light-theme .custom-dropdown-menu {
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

body.light-theme .custom-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.light-theme .custom-dropdown-item.selected {
  background: rgba(21, 204, 0, 0.08);
  color: var(--primary);
}

/* Lista de ejercicios interactivos en modales */
.exercises-setup-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.exercise-setup-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--card-radius);
  padding: 14px;
  position: relative;
}

.exercise-setup-card .remove-exercise-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
}

.exercise-grid-inputs {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

/* Panel de Entrenamiento Activo (Pantalla Completa) */
.active-workout-view {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-color);
  z-index: 500;
  flex-direction: column;
  padding: 20px;
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.active-workout-view.active {
  display: flex;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.workout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.workout-timer-box {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--border-neon-secondary);
  border-radius: 20px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--secondary);
}

.workout-timer-box svg {
  width: 16px;
  height: 16px;
  animation: spin 3s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.workout-scroller {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
  scrollbar-width: none;
}

.workout-scroller::-webkit-scrollbar {
  display: none;
}

/* Tarjeta de Ejercicio en Entrenamiento */
.workout-exercise-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--card-radius);
  padding: 16px;
  margin-bottom: 18px;
}

.exercise-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* Tabla de Series */
.series-table {
  width: 100%;
  border-collapse: collapse;
}

.series-table th {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  padding-bottom: 8px;
}

.series-table th:first-child {
  text-align: left;
}

.series-row {
  border-top: 1px solid var(--border-glass);
  transition: var(--transition);
}

.series-row.completed {
  background: rgba(57, 255, 20, 0.03);
}

.series-row td {
  padding: 8px 0;
  text-align: center;
}

.series-row td:first-child {
  text-align: left;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 14px;
  width: 40px;
}

/* Inputs y botones de tabla */
.series-input-wrapper {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  padding: 2px 4px;
}

.series-input {
  width: 40px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  outline: none;
}

.series-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 800;
}

/* Checkbox luminoso de serie */
.check-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid var(--text-muted);
  background: none;
  cursor: pointer;
  transition: var(--transition-bounce);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}

.check-btn.completed {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
  color: #000;
}

.check-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 3;
  fill: none;
}

/* Cronómetro de descanso (HUD flotante) */
.rest-hud {
  position: absolute;
  bottom: 95px;
  left: 20px;
  right: 20px;
  background: rgba(8, 9, 12, 0.95);
  border: 1px solid var(--border-neon-secondary);
  border-radius: 20px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), var(--shadow-neon-secondary);
  transform: translateY(150px);
  transition: var(--transition-bounce);
  z-index: 600;
  opacity: 0;
  pointer-events: none;
}

.rest-hud.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.rest-hud-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rest-timer-radial {
  font-size: 20px;
  font-weight: 800;
  color: var(--secondary);
  text-shadow: 0 0 8px var(--secondary-glow);
}

.rest-hud-text h4 {
  font-size: 13px;
  color: var(--text-secondary);
}

.rest-hud-text p {
  font-size: 11px;
  color: var(--text-muted);
}

.rest-hud-actions {
  display: flex;
  gap: 8px;
}

.rest-hud-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

/* Historial de entrenamientos */
.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.history-item-title {
  font-size: 16px;
  font-weight: 700;
}

.history-item-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.history-stats-mini {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-glass);
}

.history-stats-mini strong {
  color: var(--text-primary);
}

.history-exercises-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-ex-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.history-ex-row span:last-child {
  color: var(--text-secondary);
}

/* Gráficos de Estadísticas (SVG) */
.chart-container {
  width: 100%;
  height: 200px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--card-radius);
  margin-top: 14px;
  padding: 10px;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.chart-svg {
  width: 100%;
  height: 100%;
}

.chart-line {
  fill: none;
  stroke: var(--secondary);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--secondary-glow));
  animation: drawLine 1.5s ease-out forwards;
}

.chart-points circle {
  fill: var(--bg-color);
  stroke: var(--primary);
  stroke-width: 3;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.chart-points circle:hover {
  r: 7;
  fill: var(--primary);
}

.chart-grid {
  stroke: var(--border-glass);
  stroke-width: 1;
}

.chart-labels-y {
  font-size: 8px;
  fill: var(--text-muted);
  text-anchor: end;
}

.chart-labels-x {
  font-size: 8px;
  fill: var(--text-muted);
  text-anchor: middle;
}

/* Selector de ejercicio para las estadísticas */
.stats-selector {
  margin-bottom: 16px;
}

/* Toast/Notificaciones */
.toast {
  position: absolute;
  top: 24px;
  left: 20px;
  right: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-neon-primary);
  border-radius: var(--btn-radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5), var(--shadow-neon-primary);
  transform: translateY(-100px);
  opacity: 0;
  transition: var(--transition-bounce);
  z-index: 2000;
}

.toast.active {
  transform: translateY(0);
  opacity: 1;
}

.toast svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.5;
}

/* Botón de Ajustes en Cabecera */
.btn-settings-header {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-bounce);
  outline: none;
}

.btn-settings-header:active {
  transform: scale(0.9);
}

.btn-settings-header svg {
  transition: transform 0.4s ease, color 0.3s ease, filter 0.3s ease;
}

.btn-settings-header:hover svg {
  transform: rotate(45deg);
  color: var(--primary);
  filter: drop-shadow(0 0 5px var(--primary-glow));
}

/* Tarjetas de características futuras en Ajustes */
.settings-feature-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--card-radius);
  padding: 14px 16px;
  transition: var(--transition);
}

.settings-feature-card.disabled {
  opacity: 0.55;
}

.settings-feature-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.settings-feature-info svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.settings-feature-info h5 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.settings-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  border: 1px solid rgba(255, 0, 127, 0.35);
  background: rgba(255, 0, 127, 0.08);
  padding: 2px 7px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(255, 0, 127, 0.2);
}

/* Tooltip flotante del gráfico */
.chart-tooltip {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border-neon-secondary);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5), var(--shadow-neon-secondary);
  pointer-events: none;
  white-space: nowrap;
  z-index: 50;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chart-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.chart-tooltip span {
  color: var(--secondary);
}

/* Autocomplete Suggestions */
.autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  margin-top: 4px;
}

.autocomplete-suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition);
  text-align: left;
}

.autocomplete-suggestion-item:last-child {
  border-bottom: none;
}

.autocomplete-suggestion-item:hover,
.autocomplete-suggestion-item.active {
  background: rgba(57, 255, 20, 0.15);
  color: var(--primary);
}

/* Info Button Style */
.btn-ex-info {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-neon-primary);
  background: rgba(57, 255, 20, 0.05);
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition-bounce);
}

.btn-ex-info:hover {
  transform: scale(1.1);
  background: rgba(57, 255, 20, 0.15);
  box-shadow: var(--shadow-neon-primary);
}

.btn-ex-info:active {
  transform: scale(0.95);
}

/* Small info icon for workout view */
.btn-ex-info-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-neon-primary);
  background: rgba(57, 255, 20, 0.05);
  color: var(--primary);
  cursor: pointer;
  margin-left: 8px;
  vertical-align: middle;
  transition: var(--transition);
}

.btn-ex-info-inline:hover {
  background: rgba(57, 255, 20, 0.2);
  box-shadow: 0 0 5px var(--primary);
}

.btn-ex-info-inline svg {
  display: block;
}

/* Scrollbar styling for autocomplete */
.autocomplete-suggestions::-webkit-scrollbar {
  width: 6px;
}
.autocomplete-suggestions::-webkit-scrollbar-track {
  background: transparent;
}
.autocomplete-suggestions::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 3px;
}

