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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #111;
  color: #f0f0f0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Screens */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  padding: 20px;
}

.screen.active {
  display: flex;
}

/* HOME SCREEN */
.app-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 48px;
  color: #fff;
}

.home-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 300px;
}

.workout-btn {
  padding: 18px 32px;
  font-size: 1.3rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  background: #e85d26;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.workout-btn:active {
  background: #c94d1e;
  transform: scale(0.97);
}

.disclaimer {
  position: absolute;
  bottom: 32px;
  font-size: 0.8rem;
  color: #777;
  text-align: center;
  padding: 0 24px;
  font-style: italic;
}

/* WORKOUT SCREEN */
#workout-screen {
  justify-content: flex-start;
  padding-top: 16px;
  gap: 8px;
}

.hangboard-container {
  width: 100%;
  max-width: 400px;
}

#hangboard-svg {
  width: 100%;
  height: auto;
}

/* SVG hold styles */
.hold {
  fill: #7A5A1A;
  stroke: #5C4210;
  stroke-width: 1.5;
  transition: fill 0.3s, filter 0.3s;
}

.hold.highlighted {
  fill: #ff6b2b;
  stroke: #ff8c52;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(255, 107, 43, 0.6));
}

.hold-label {
  transition: fill 0.3s;
}

.hold-label.visible {
  fill: #fff;
}

.workout-info {
  text-align: center;
}

.workout-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.set-progress {
  font-size: 0.95rem;
  color: #888;
  margin-top: 2px;
}

.phase-label {
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  min-height: 2rem;
  color: #fff;
}

.phase-label.hang {
  color: #ff6b2b;
}

.phase-label.rest {
  color: #4a9eff;
}

.phase-label.switch {
  color: #ffc107;
}

.timer-display {
  font-size: 8rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #fff;
  min-height: 9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-display.hang {
  color: #ff6b2b;
}

.timer-display.rest {
  color: #4a9eff;
}

.timer-display.switch {
  color: #ffc107;
}

.stop-btn {
  margin-top: auto;
  margin-bottom: 24px;
  padding: 12px 40px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid #555;
  border-radius: 8px;
  background: transparent;
  color: #999;
  cursor: pointer;
}

.stop-btn:active {
  background: #333;
}

/* COMPLETE SCREEN */
.complete-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 40px;
  color: #4a9eff;
}

#complete-screen .workout-btn {
  background: #333;
}

#complete-screen .workout-btn:active {
  background: #444;
}
