/* Estilos del Temporizador Visual de Cuenta Atrás - Fijate Tools */

:root {
  --bg-app: #080d1a;
  --bg-card: #12192b;
  --bg-card-secondary: #1a243a;
  --bg-card-hover: #22304d;
  --border-color: #25334e;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-color: #ef4444;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-secondary: #f1f5f9;
  --bg-card-hover: #e2e8f0;
  --border-color: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

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

body {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
}

.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.tool-main-content {
  flex: 1;
  min-width: 0;
}

.card-main {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
}

/* Modo pantalla completa en contenedor */
.card-main:fullscreen {
  max-width: 100%;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--bg-app);
  padding: 2rem;
}

/* Barra de controles superiores rápidos (Sonido, Números, Pantalla completa) */
.timer-top-options {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn-option-toggle {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-option-toggle:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.btn-option-toggle.active {
  color: #38bdf8;
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

/* Contenedor del reloj Canvas */
.timer-canvas-box {
  width: 340px;
  height: 340px;
  margin: 0 auto 1.5rem;
  position: relative;
  touch-action: none;
}

#timer-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

/* Cifras numéricas grandes */
.timer-digits-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

/* Botones principales de acción */
.timer-actions-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-timer-main {
  min-height: 52px;
  min-width: 160px;
  background: var(--accent-color);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.btn-timer-main:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-timer-main.is-running {
  background: #f59e0b;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.btn-timer-reset {
  min-height: 52px;
  padding: 0 1.25rem;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-timer-reset:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

/* Presets de duración */
.presets-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.presets-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.btn-preset-time {
  min-height: 38px;
  padding: 0 0.9rem;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-preset-time:hover {
  border-color: var(--text-muted);
}

.btn-preset-time.active {
  background: var(--text-main);
  color: var(--bg-card);
  border-color: transparent;
}

/* Paleta de colores para el disco */
.color-swatches-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.btn-color-pick {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-color-pick:hover {
  transform: scale(1.15);
}

.btn-color-pick.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  .card-main {
    padding: 1.25rem 1rem;
  }

  .timer-canvas-box {
    width: 280px;
    height: 280px;
  }

  .timer-digits-text {
    font-size: 2rem;
  }

  .timer-actions-row {
    flex-direction: column;
  }

  .btn-timer-main, .btn-timer-reset {
    width: 100%;
  }
}
