/* ========================================================
   Mindful Zen — Breathing / meditation timers (/breathe.html)
   1 / 3 / 5 / 10 minute sessions with animated breath circle.
   ======================================================== */

.br-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* ─── LANDING ─── */
.br-header {
  text-align: center;
  margin-bottom: 32px;
}
.br-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--mag-ink, #1a1a1a);
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}
.br-subtitle {
  font-size: 15px;
  color: var(--mag-ink-soft, #555);
  margin: 0;
}

.br-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.br-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 22px 24px;
  background: var(--mag-card, #fff);
  border: 1px solid var(--mag-border, #e5e5e5);
  border-radius: 18px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.br-pick::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #7c3aed, #5eead4);
  opacity: 0.3;
  transition: opacity 0.2s, height 0.2s;
}
.br-pick:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.12);
  border-color: #7c3aed;
}
.br-pick:hover::before { opacity: 1; height: 6px; }

.br-pick-emoji {
  font-size: 36px;
  margin-bottom: 8px;
  line-height: 1;
}
.br-pick-mins {
  font-size: 56px;
  font-weight: 900;
  background: linear-gradient(135deg, #7c3aed, #0d9488);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  letter-spacing: -2px;
}
.br-pick-unit {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mag-ink-soft, #888);
  margin-top: 4px;
}
.br-pick-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--mag-ink, #1a1a1a);
  margin-top: 14px;
}
.br-pick-desc {
  font-size: 12.5px;
  color: var(--mag-ink-soft, #666);
  margin-top: 6px;
  line-height: 1.5;
}
.br-tip {
  text-align: center;
  font-size: 13px;
  color: var(--mag-ink-soft, #888);
  font-style: italic;
}

/* ─── ACTIVE SESSION (centered card, not fullscreen overlay) ─── */
.br-session {
  max-width: 560px;
  margin: 24px auto 32px;
  padding: 56px 24px 40px;
  background: var(--mag-card, #fff);
  border: 1px solid var(--mag-border, #e5e5e5);
  border-radius: 24px;
  box-shadow:
    0 30px 80px rgba(124, 58, 237, 0.12),
    0 8px 24px rgba(13, 148, 136, 0.08);
  background-image: radial-gradient(ellipse at center top,
    rgba(124, 58, 237, 0.06) 0%,
    rgba(13, 148, 136, 0.03) 40%,
    transparent 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.br-circle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  width: 100%;
}
.br-circle {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    rgba(124, 58, 237, 0.85),
    rgba(13, 148, 136, 0.7) 60%,
    rgba(94, 234, 212, 0.5) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 1px;
  box-shadow:
    0 0 60px rgba(124, 58, 237, 0.35),
    0 0 120px rgba(94, 234, 212, 0.2),
    inset 0 0 40px rgba(255, 255, 255, 0.18);
  /* Default: gentle pulse — overridden per pattern via JS-set duration vars */
  animation: brPulse var(--cycle, 16s) ease-in-out infinite;
  transition: transform 0.4s;
}
@keyframes brPulse {
  0%   { transform: scale(0.7); }    /* end of exhale  */
  25%  { transform: scale(1.12); }   /* peak of inhale */
  50%  { transform: scale(1.12); }   /* hold full      */
  75%  { transform: scale(0.7); }    /* end of exhale  */
  100% { transform: scale(0.7); }
}
/* Reduced-motion users get a subtle scale shift only */
@media (prefers-reduced-motion: reduce) {
  .br-circle { animation: none; transform: scale(1); }
}

.br-cue {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: lowercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.br-meta {
  text-align: center;
  margin: 0;
}
.br-time {
  font-size: 32px;
  font-weight: 800;
  color: var(--mag-ink, #1a1a1a);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.br-pattern {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--mag-ink-soft, #888);
  text-transform: uppercase;
  margin-top: 4px;
}

/* ─── Music player strip (between timer and finish button) ─── */
.br-player {
  width: 100%;
  max-width: 460px;
  padding: 12px 14px;
  background: rgba(124, 58, 237, 0.05);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.br-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.br-player-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--mag-ink-soft, #555);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}
.br-player-btn:hover {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}
.br-player-play {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #7c3aed, #0d9488);
  color: #fff;
}
.br-player-play:hover {
  filter: brightness(1.1);
  background: linear-gradient(135deg, #7c3aed, #0d9488);
  color: #fff;
}
.br-player-info {
  flex: 1;
  min-width: 0;
}
.br-player-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mag-ink, #1a1a1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.br-player-progress {
  height: 3px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.br-player-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c3aed, #5eead4);
  border-radius: 999px;
  transition: width 0.2s linear;
}
.br-player-vol {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--mag-ink-soft, #888);
}
.br-player-vol input[type="range"] {
  width: 56px;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  outline: none;
}
.br-player-vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #7c3aed;
  border-radius: 50%;
  cursor: pointer;
}
.br-player-vol input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #7c3aed;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

@media (max-width: 540px) {
  .br-player { padding: 10px 10px; }
  .br-player-vol { display: none; }  /* hide volume on small screens */
  .br-player-title { font-size: 11px; }
}

.br-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.br-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 26px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.br-btn-primary {
  background: linear-gradient(135deg, #7c3aed, #0d9488);
  color: #fff;
}
.br-btn-primary:hover { filter: brightness(1.08); }
.br-btn-stop {
  background: rgba(0, 0, 0, 0.08);
  color: var(--mag-ink, #1a1a1a);
}
.br-btn-stop:hover { background: rgba(0, 0, 0, 0.14); }
.br-btn-ghost {
  background: transparent;
  color: var(--mag-ink, #1a1a1a);
  border-color: var(--mag-border, #e5e5e5);
}
.br-btn-ghost:hover { border-color: var(--mag-red, #d3000a); color: var(--mag-red, #d3000a); }

/* ─── DONE screen ─── */
.br-done {
  text-align: center;
  padding: 80px 20px 60px;
  max-width: 580px;
  margin: 0 auto;
}
.br-done-icon { font-size: 64px; line-height: 1; margin-bottom: 18px; }
.br-done h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--mag-ink, #1a1a1a);
  margin: 0 0 12px;
}
.br-done-text {
  font-size: 15px;
  color: var(--mag-ink-soft, #555);
  line-height: 1.6;
  margin: 0 0 6px;
}
.br-done-stats {
  font-size: 13px;
  color: var(--mag-ink-soft, #888);
  margin: 0 0 28px;
  font-variant-numeric: tabular-nums;
}
.br-done-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 540px) {
  .br-circle { width: 200px; height: 200px; }
  .br-pick-mins { font-size: 48px; }
  .br-time { font-size: 28px; }
  .br-title { font-size: 26px; }
  .br-session { padding: 36px 16px 28px; margin: 12px auto 20px; gap: 24px; }
  .br-circle-wrap { min-height: 240px; }
}
