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

:root {
  --bg-primary: #0b0d12;
  --bg-secondary: #14171f;
  --bg-card: #1a1d26;
  --bg-hover: #222633;
  --text-primary: #f0f2f5;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent: #4ade80;
  --accent-hover: #22c55e;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --border: #2d3142;
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.app-shell {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.app-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 24px 0;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}

.app-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.subhead {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 20px;
}

.overall-progress {
  max-width: 400px;
  margin: 0 auto;
}

.progress-track {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #22d3ee);
  transition: width 0.3s ease;
}

#overall-progress-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Days Grid */
.days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.day-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border-left: 4px solid var(--accent);
  transition: transform 0.2s, box-shadow 0.2s;
}

.day-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.day-card.completed {
  border-left-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(74, 222, 128, 0.1) 100%);
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.day-number {
  font-size: 18px;
  font-weight: 700;
}

.day-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.day-focus {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.day-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mini-progress {
  flex: 1;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.mini-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.mini-text {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 36px;
}

.btn {
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn:hover {
  background: var(--bg-secondary);
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

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

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-workout {
  width: 100%;
  padding: 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-workout:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 101;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.btn-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
}

/* Checklist Section */
.checklist-section {
  margin-bottom: 24px;
}

.checklist-section h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.checklist-items {
  list-style: none;
}

.checklist-item {
  margin-bottom: 8px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.checkbox-label:hover {
  background: var(--bg-hover);
}

.checklist-checkbox {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.check-text {
  font-size: 15px;
  line-height: 1.5;
}

/* Workout Section */
.workout-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.workout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.workout-header h3 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.workout-block {
  margin-bottom: 20px;
}

.workout-block h4 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--accent);
}

.exercise-list {
  list-style: none;
}

.exercise-item {
  margin-bottom: 8px;
}

.exercise-check {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.exercise-check:hover {
  background: var(--bg-hover);
}

.exercise-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.ex-name {
  font-weight: 600;
  flex: 1;
  min-width: 150px;
}

.ex-reps {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.ex-tip {
  width: 100%;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  padding-left: 26px;
}

.hold-badge {
  font-size: 10px;
  font-weight: 700;
  background: #f59e0b;
  color: #000;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

/* Guided Overlay */
.guided-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.guided-overlay[hidden] {
  display: none;
}

.guided-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.guided-header {
  text-align: center;
  margin-bottom: 40px;
}

.guided-header .eyebrow {
  margin-bottom: 12px;
}

.guided-header h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

#guided-progress {
  color: var(--text-muted);
  font-size: 14px;
}

.guided-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.prescription {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}

.tip {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 400px;
}

.timer-container {
  margin-top: 32px;
}

.timer-display {
  font-size: 64px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.guided-footer {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 24px;
}

.guided-footer .btn {
  padding: 14px 24px;
  font-size: 16px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .app-shell {
    padding: 16px;
  }

  .app-header h1 {
    font-size: 26px;
  }

  .days-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-height: 95vh;
  }

  .prescription {
    font-size: 36px;
  }

  .timer-display {
    font-size: 48px;
  }

  .guided-footer .btn {
    padding: 12px 18px;
    font-size: 14px;
  }
}
.challenge-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
}

.challenge-item small {
  color: var(--text-secondary);
}

.workout-content {
  margin-top: 12px;
}

.workout-actions {
  margin-top: 12px;
}

.challenge-empty {
  list-style: none;
  color: var(--text-muted);
  font-size: 13px;
  padding: 10px;
}
