/* Padelbility — Pre-Match Warm-Up Player */

:root {
  --wu-phase-color: #DEFF4A;
}

/* ── Layout ──────────────────────────────────────── */
.wu-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--pb-bg);
  font-family: 'Archivo', sans-serif;
  color: var(--pb-ink);
  overflow: hidden;
}

/* ── Top Bar ─────────────────────────────────────── */
.wu-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
  flex-shrink: 0;
}

.wu-back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--pb-mute);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.15s;
}
.wu-back:hover { color: var(--pb-ink); }

#wu-phase-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.wu-phase-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pb-line2);
  transition: all 0.3s;
}
.wu-phase-dot--active {
  background: var(--wu-phase-color);
  width: 22px;
  border-radius: 4px;
}
.wu-phase-dot--done {
  background: var(--pb-mute);
}

.wu-phase-label-top {
  font-size: 12px;
  font-weight: 600;
  color: var(--pb-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Phase Header ────────────────────────────────── */
.wu-phase-header {
  padding: 20px 24px 0;
  flex-shrink: 0;
}

.wu-phase-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wu-phase-color);
  margin-bottom: 4px;
}

.wu-phase-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--pb-ink);
}

.wu-phase-progress {
  height: 3px;
  background: var(--pb-line2);
  border-radius: 2px;
  overflow: hidden;
}

.wu-phase-bar-fill {
  height: 100%;
  background: var(--wu-phase-color);
  border-radius: 2px;
  transition: width 0.5s ease;
  width: 0%;
}

/* ── Player Body ─────────────────────────────────── */
#wu-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 32px;
}

/* ── Timer ───────────────────────────────────────── */
.wu-timer-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 28px auto 24px;
  flex-shrink: 0;
}

.wu-timer-svg {
  width: 160px;
  height: 160px;
  transform: rotate(-90deg);
}

.wu-timer-track {
  fill: none;
  stroke: var(--pb-surface2);
  stroke-width: 6;
}

#wu-timer-ring {
  transition: opacity 0.3s;
}

#wu-timer-arc {
  fill: none;
  stroke: var(--wu-phase-color);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s linear, stroke 0.4s;
}

.wu-timer-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#wu-ex-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 4px;
}

#wu-timer-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--pb-ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ── Exercise Info ───────────────────────────────── */
.wu-ex-info {
  width: 100%;
  max-width: 400px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wu-ex-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pb-faint);
}

#wu-ex-name {
  font-size: 26px;
  font-weight: 800;
  color: var(--pb-ink);
  line-height: 1.15;
  margin: 0;
  transition: opacity 0.3s;
}

#wu-ex-cue {
  font-size: 14px;
  color: var(--pb-mute);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

/* ── Controls ────────────────────────────────────── */
.wu-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
}

.wu-ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--pb-line2);
  background: var(--pb-surface);
  color: var(--pb-mute);
  cursor: pointer;
  transition: all 0.15s;
}
.wu-ctrl-btn:hover { color: var(--pb-ink); border-color: var(--pb-mute); }

#wu-pause-btn {
  width: 64px;
  height: 64px;
  background: var(--wu-phase-color);
  color: #0B0D10;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 0 24px color-mix(in srgb, var(--wu-phase-color) 30%, transparent);
}
#wu-pause-btn:hover { opacity: 0.9; transform: scale(1.04); }

/* ── Phase Transition Screen ─────────────────────── */
#wu-transition {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 24px;
  text-align: center;
  min-height: 60vh;
}

.wu-transition-check {
  font-size: 56px;
  margin-bottom: 20px;
  color: var(--pb-good);
  animation: wu-pop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

.wu-transition-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
}

.wu-transition-sub {
  font-size: 14px;
  color: var(--pb-mute);
  margin: 0 0 32px;
}

.wu-transition-next-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wu-phase-color);
  margin-bottom: 6px;
}

.wu-transition-next-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--pb-ink);
  margin: 0 0 36px;
}

#wu-next-phase-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--wu-phase-color);
  color: #0B0D10;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Archivo', sans-serif;
}
#wu-next-phase-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Complete Screen ─────────────────────────────── */
#wu-complete {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 24px;
  text-align: center;
  min-height: 60vh;
}

.wu-complete-emoji {
  font-size: 64px;
  margin-bottom: 20px;
  color: var(--pb-accent);
  animation: wu-pop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}

.wu-complete-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 12px;
}

.wu-complete-sub {
  font-size: 15px;
  color: var(--pb-mute);
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto 36px;
}

.wu-complete-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 36px;
}

.wu-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.wu-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--wu-phase-color);
  --wu-phase-color: #DEFF4A;
}

.wu-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pb-mute);
}

.wu-cta-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
}

.wu-cta-primary {
  display: block;
  padding: 15px 28px;
  background: #DEFF4A;
  color: #0B0D10;
  font-weight: 700;
  font-size: 15px;
  border-radius: 100px;
  text-decoration: none;
  text-align: center;
  transition: all 0.15s;
}
.wu-cta-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.wu-cta-secondary {
  display: block;
  padding: 13px 28px;
  background: transparent;
  color: var(--pb-mute);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--pb-line2);
  border-radius: 100px;
  text-decoration: none;
  text-align: center;
  transition: all 0.15s;
}
.wu-cta-secondary:hover { color: var(--pb-ink); border-color: var(--pb-mute); }

/* ── Animations ──────────────────────────────────── */
@keyframes wu-pop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── Mobile tweaks ───────────────────────────────── */
@media (max-width: 380px) {
  #wu-ex-name { font-size: 22px; }
  .wu-timer-wrap { width: 140px; height: 140px; }
  .wu-timer-svg { width: 140px; height: 140px; }
}

@media (min-height: 750px) {
  .wu-timer-wrap { margin: 36px auto 32px; }
  #wu-ex-name { font-size: 28px; }
}
