:root {
  --bg-dark: #0b0b0d;
  --bg-card: #16171a;
  --accent: #FFD43B;
  --accent-soft: #FFD43B80;
  --text-light: #ffffff;
  --text-muted: #a1a1a1;
  --font-main: 'Montserrat', sans-serif;
}

* { font-family: var(--font-main); box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at top, #0b0b0d 0%, #121212 100%);
  color: var(--text-light);
}

.fade-in { animation: fadeIn 0.4s ease-in-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dashboard {
  padding: 20px;
  padding-bottom: 80px; /* espacio para navbar */
  max-width: 600px;
  margin: 0 auto;
  background: radial-gradient(circle at top, #0b0b0d 0%, #121212 100%);
}

.header { text-align: center; margin-bottom: 16px; }
.header h2 { font-weight: 600; letter-spacing: 0.5px; }

.card {
  background: linear-gradient(145deg, #1a1a1a, #121212);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(255 212 59 / 0.4);
  animation: fadeIn 0.4s ease-in-out;
}

/* WOD */
.wod-card h3 { color: var(--accent); margin-bottom: 10px; }
.wod-desc { white-space: pre-line; line-height: 1.6; color: var(--text-light); margin-bottom: 12px; }
.timestamp { font-size: 0.85rem; color: var(--text-muted); }

/* TIMER */
.timer-section { text-align: center; }
.timer-circle { position: relative; width: 180px; height: 180px; margin: 0 auto 20px; }
.progress-ring__circle {
  fill: transparent; stroke: var(--accent); stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 0.2s;
}
.timer-display {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 2rem; font-weight: 600;
}
.timer-buttons { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }

button { transition: background 0.3s ease, transform 0.1s ease; }
button:active { transform: scale(0.97); }

.btn-primary, .btn-secondary, .btn-save {
  border: none; padding: 12px 24px; border-radius: 10px; font-weight: 600; cursor: pointer;
  transition: box-shadow 0.3s ease;
}
.btn-primary { 
  background-color: var(--accent); 
  color: var(--bg-dark); 
  box-shadow: 0 0 8px var(--accent-soft);
}
.btn-primary:hover {
  box-shadow: 0 0 14px var(--accent-soft);
}
.btn-secondary { 
  background-color: #2a2b2e; 
  color: var(--text-light);
  box-shadow: 0 0 6px rgba(255 212 59 / 0.3);
}
.btn-secondary:hover {
  box-shadow: 0 0 12px var(--accent-soft);
}
.btn-save { background-color: #1f9d85; color: var(--text-light); width: 100%; margin-top: 10px; }
.btn-save:disabled { background-color: #333; color: #777; cursor: not-allowed; }

/* TOGGLE RX / Scaled */
.toggle-wrapper { display: flex; justify-content: center; margin-bottom: 20px; }
.toggle { display: none; }
.toggle-label {
  position: relative; width: 160px; height: 44px; background-color: #2a2b2e; border-radius: 22px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 14px; cursor: pointer;
}
.toggle-option { font-weight: 600; font-size: 0.9rem; width: 50px;}
.toggle-slider {
  position: absolute; top: 4px; left: 4px; width: 74px; height: 36px;
  background-color: rgb(255 212 59 / 25%); border-radius: 18px; transition: transform 0.3s;
}
.toggle:checked + .toggle-label .toggle-slider { transform: translateX(78px); }

/* LEADERBOARD */
.view { display: none; }
.view.active { display: block; }

.leaderboard-list { display: flex; flex-direction: column; gap: 10px; }
.leaderboard-item {
  display: flex; justify-content: space-between; align-items: center;
  background: #1e1f22; padding: 12px 16px; border-radius: 12px; font-size: 0.95rem;
}

/* PERFIL */
.profile-info { text-align: center; }
.profile-avatar { 
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    flex-direction: column;
    align-items: center;
}
.avatar-circle {
  width: 80px; height: 80px; background-color: var(--accent); color: var(--bg-dark);
  border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 2rem; font-weight: 600;
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px var(--accent-soft);
}
.user-name { font-size: 1.3rem; font-weight: 600; margin: 8px 0; }
.user-email { font-size: 0.9rem; color: #bbb; margin-bottom: 20px; }
.full-btn { width: 100%; }

/* NAVBAR */
.navbar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 64px; 
  background: linear-gradient(145deg, #1a1a1a, #121212);
  display: flex; justify-content: space-around; align-items: center; border-top: 1px solid #222;
  animation: fadeIn 0.4s ease-in-out;
}
.navbar button {
  flex: 1; background: none; border: none; color: var(--text-muted);
  font-weight: 600; font-size: 0.9rem; cursor: pointer; height: 100%;
}
.navbar button.active { 
  color: var(--accent); 
  border-top: 2px solid var(--accent); 
  text-shadow: 0 0 6px var(--accent-soft);
}

/* Desktop pequeños */
@media (min-width: 600px) { .timer-display { font-size: 2.6rem; } }

/* LOGIN */
.login-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: var(--bg-dark);
  padding: 20px;
}

.login-card {
  background: linear-gradient(145deg, #1a1a1a, #121212);
  padding: 30px 24px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(255 212 59 / 0.4);
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: fadeIn 0.4s ease-in-out;
}

.login-logo {
  font-size: 1.6rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
}

.login-card h2 {
  color: var(--text-light);
  margin-bottom: 20px;
  font-weight: 500;
}

.login-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  border: none;
  border-radius: 10px;
  background-color: #2a2b2e;
  color: var(--text-light);
  font-size: 1rem;
}

.login-input::placeholder {
  color: var(--text-muted);
}

.login-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  background-color: var(--accent);
  color: var(--bg-dark);
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 8px var(--accent-soft);
}

.login-btn:hover {
  background-color: #E5C32A;
  box-shadow: 0 0 12px var(--accent-soft);
}

.login-footer {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}