/* Mobile-first boxing drills app – dark theme, high contrast */

:root {
  --bg: #1a1a1a;
  --surface: #2d2d2d;
  --text: #f5f5f5;
  --text-muted: #b0b0b0;
  --accent: #e63946;
  --accent-hover: #ff5564;
  --border: #404040;
  --min-tap: 44px;
  --font-sans: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(0.9375rem, 2.5vw, 1rem);
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}

.app {
  max-width: 28rem;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 1.5rem);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 4vw, 1.75rem);
}

/* Round counter */
.round-header {
  text-align: center;
}

.round-counter {
  margin: 0;
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Timer section */
.timer-section {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: clamp(1rem, 4vw, 1.5rem);
  text-align: center;
}

.phase-label {
  margin: 0 0 0.25rem;
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.countdown {
  margin: 0;
  font-size: clamp(3rem, 12vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* Drill section */
.drill-section {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: clamp(1rem, 4vw, 1.5rem);
  text-align: center;
}

.drill-combo {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  word-break: break-word;
}

/* Buttons – touch-friendly (min 44px) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--min-tap);
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:not(:disabled):active {
  transform: scale(0.98);
}

.btn-combo {
  width: 100%;
  background: var(--border);
  color: var(--text);
}

.btn-combo:hover:not(:disabled) {
  background: #505050;
}

/* Controls */
.controls-section {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-primary {
  flex: 1;
  min-width: 0;
  background: var(--accent);
  color: var(--text);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: #3a3a3a;
  border-color: #505050;
}

/* Config */
.config-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.config-label {
  font-weight: 500;
}

.config-select {
  min-height: var(--min-tap);
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23b0b0b0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.config-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Workout complete message */
.workout-complete {
  text-align: center;
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  font-weight: 700;
  color: var(--accent);
  padding: 1rem;
}

.workout-complete[hidden] {
  display: none;
}

/* Rest phase – optional visual distinction */
.timer-section.is-rest .phase-label {
  color: var(--accent);
}

.timer-section.is-rest .countdown {
  color: var(--accent);
}
