/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0f;
  --bg-card: #16161e;
  --bg-card-hover: #1e1e2a;
  --bg-elevated: #1c1c28;
  --bg-input: #12121a;

  --text: #f0f0f5;
  --text-secondary: #8e8ea0;
  --text-tertiary: #5a5a6e;

  --accent: #FF6B35;
  --accent-dim: rgba(255, 107, 53, 0.15);
  --accent-glow: rgba(255, 107, 53, 0.3);

  --success: #58CC02;
  --success-dim: rgba(88, 204, 2, 0.15);
  --warning: #FDCB6E;
  --danger: #FF7675;

  --purple: #7C5CFC;
  --purple-dim: rgba(124, 92, 252, 0.15);
  --blue: #00B4D8;
  --blue-dim: rgba(0, 180, 216, 0.15);
  --pink: #E84393;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);

  --nav-height: 72px;
  --header-height: 56px;
  --sidebar-width: 220px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html {
  font-family: var(--font);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  height: 100%;
}

body {
  height: 100%;
  overflow: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* === APP SHELL === */
#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

/* === HEADER === */
.header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.header-stat .icon {
  font-size: 1rem;
}

.header-stat .value {
  color: var(--text);
}

/* === SCREEN CONTAINER === */
.screen-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-height) + 16px);
  -webkit-overflow-scrolling: touch;
}

.screen {
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === BOTTOM NAV === */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-elevated);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  min-width: 64px;
}

.nav-item .nav-icon {
  font-size: 1.4rem;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.nav-item .nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

.nav-item.active .nav-icon {
  opacity: 1;
}

.nav-item.active .nav-label {
  color: var(--accent);
}

/* === CARDS === */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.card-sm {
  padding: 14px 16px;
}

.card-interactive {
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.card-interactive:active {
  transform: scale(0.98);
  background: var(--bg-card-hover);
}

/* === FORMS === */
.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color 0.2s;
  resize: vertical;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  text-align: center;
}

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

.btn-primary:active {
  background: #e55a28;
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:active {
  background: rgba(255, 255, 255, 0.05);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 18px 32px;
  font-size: 1.1rem;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

/* === TYPOGRAPHY === */
.h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.h3 {
  font-size: 1rem;
  font-weight: 600;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

/* === SECTIONS === */
.section {
  margin-bottom: 28px;
}

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

/* === WORKOUT CARD === */
.workout-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.workout-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.workout-card-info {
  flex: 1;
  min-width: 0;
}

.workout-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 3px;
}

.workout-card-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
}

.workout-card-arrow {
  color: var(--text-tertiary);
  font-size: 1.2rem;
}

/* === EXERCISE LIST (in workout detail) === */
.exercise-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.exercise-row:last-child {
  border-bottom: none;
}

.exercise-row-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.exercise-row-info {
  flex: 1;
}

.exercise-row-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.exercise-row-detail {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* === WARMUP SWAP === */
.exercise-row-swappable {
  cursor: pointer;
  transition: background 0.15s;
  border-radius: var(--radius-xs);
  margin: 0 -8px;
  padding-left: 22px;
  padding-right: 8px;
}

.exercise-row-swappable:active {
  background: rgba(255, 255, 255, 0.04);
}

.warmup-swap-btn {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 50px;
  white-space: nowrap;
  pointer-events: none; /* row handles the click */
}

/* Warmup Picker Bottom Sheet */
.warmup-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

.warmup-picker-overlay.hidden {
  display: none;
}

.warmup-picker-sheet {
  background: var(--bg-elevated);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 20px;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.warmup-picker-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.warmup-picker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.warmup-picker-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.warmup-picker-option:active {
  background: var(--bg-card-hover);
}

.warmup-picker-option.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.warmup-picker-option-info {
  flex: 1;
  min-width: 0;
}

.warmup-picker-option-name {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.warmup-picker-option-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.warmup-picker-option-duration {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-tertiary);
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .exercise-row-swappable:hover {
    background: rgba(255, 255, 255, 0.04);
  }

  .warmup-picker-option:hover {
    background: var(--bg-card-hover);
  }

  .warmup-picker-option.selected:hover {
    background: var(--accent-dim);
  }
}

/* === TIME PICKER === */
.time-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.time-chip {
  padding: 10px 18px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s;
}

.time-chip.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.time-chip:active {
  transform: scale(0.95);
}

/* === ACTIVE WORKOUT === */
.workout-header {
  text-align: center;
  padding: 16px 0;
}

.workout-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  margin: 16px 0;
  overflow: hidden;
}

.workout-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.exercise-display {
  text-align: center;
  padding: 24px 0;
}

.exercise-display-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.exercise-display-name {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.exercise-display-set {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.timer-display {
  font-size: 4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  padding: 20px 0;
  text-align: center;
}

.timer-display.running {
  color: var(--accent);
}

.timer-display.resting {
  color: var(--blue);
}

.prompt-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.prompt-text {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}

.prompt-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.instructions-list {
  text-align: left;
  padding: 0 4px;
}

.instructions-list li {
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  list-style: none;
  display: flex;
  gap: 10px;
}

.instructions-list li::before {
  content: '→';
  color: var(--accent);
  flex-shrink: 0;
}

.workout-controls {
  display: flex;
  gap: 12px;
  padding: 16px 0;
}

.workout-controls .btn {
  flex: 1;
}

.btn-timer-start {
  background: var(--accent);
  color: #fff;
  padding: 20px;
  font-size: 1.15rem;
  border-radius: var(--radius);
}

.btn-timer-stop {
  background: var(--danger);
  color: #fff;
  padding: 20px;
  font-size: 1.15rem;
  border-radius: var(--radius);
}

.btn-skip {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.btn-rest-skip {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

/* === REST SCREEN === */
.rest-screen {
  text-align: center;
  padding: 40px 0;
}

.rest-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 8px;
}

.rest-next {
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.rest-next strong {
  color: var(--text);
}

/* === RATING === */
.rating-section {
  padding: 20px 0;
  text-align: center;
}

.rating-question {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.rating-star {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  transition: all 0.2s;
}

.rating-star.selected {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.rating-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 4px;
}

.rating-labels span {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

/* === WORKOUT COMPLETE === */
.complete-screen {
  text-align: center;
  padding-top: 20px;
}

.complete-icon {
  font-size: 4rem;
  margin-bottom: 12px;
}

.complete-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.complete-subtitle {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.complete-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.xp-earned {
  background: var(--accent-dim);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.xp-earned-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.xp-earned-label {
  font-size: 0.85rem;
  color: var(--accent);
  opacity: 0.8;
}

/* === PROGRESS / LEVEL BAR === */
.level-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.level-badge {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
}

.level-progress {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.level-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.level-xp-text {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

/* === STREAK === */
.streak-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.streak-count {
  font-size: 1.8rem;
  font-weight: 800;
}

.streak-unit {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.2;
}

.week-dots {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: space-between;
}

.week-dot {
  width: 40px;
  height: 40px;
  flex: 1;
  max-width: 48px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-tertiary);
}

.week-dot.completed {
  background: var(--success-dim);
  border-color: var(--success);
  color: var(--success);
}

.week-dot.today {
  border-color: var(--accent);
}

/* === HISTORY === */
.history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.history-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.history-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.history-xp {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
}

/* === EXERCISE LIBRARY === */
.exercise-lib-card {
  padding: 16px;
  margin-bottom: 10px;
}

.exercise-lib-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.exercise-lib-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.exercise-lib-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.exercise-lib-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.category-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.category-chip {
  padding: 8px 14px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.78rem;
  white-space: nowrap;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s;
}

.category-chip.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* === PROFILE === */
.profile-header {
  text-align: center;
  padding: 20px 0 28px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 12px;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.profile-stat {
  text-align: center;
}

.profile-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
}

.profile-stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.settings-group {
  margin-top: 20px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.settings-value {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.settings-input {
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xs);
  padding: 8px 12px;
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  width: 160px;
  text-align: right;
  transition: border-color 0.2s;
}

.settings-input:focus {
  border-color: var(--accent);
}

.settings-input::placeholder {
  color: var(--text-tertiary);
}

.interview-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  padding: 0 16px;
  line-height: 1.4;
}

/* === AUTH / ACCOUNT CARD === */
.auth-prompt {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.auth-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.auth-input:focus {
  border-color: var(--accent);
}

.auth-input::placeholder {
  color: var(--text-tertiary);
}

.auth-status {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-height: 1.2em;
}

.auth-status-success {
  color: var(--success);
}

.auth-status-error {
  color: var(--danger);
}

.auth-email {
  font-weight: 600;
  font-size: 0.95rem;
}

.auth-sync-status {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 4px;
}

.auth-signed-in .flex {
  margin-top: 12px;
}

/* === TOGGLE SWITCH === */
.toggle {
  width: 46px;
  height: 26px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle.on {
  background: var(--accent);
}

.toggle::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}

.toggle.on::after {
  transform: translateX(20px);
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 48px 20px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* === BADGE / TAG === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-accent {
  background: var(--accent-dim);
  color: var(--accent);
}

.badge-success {
  background: var(--success-dim);
  color: var(--success);
}

.badge-purple {
  background: var(--purple-dim);
  color: var(--purple);
}

.badge-blue {
  background: var(--blue-dim);
  color: var(--blue);
}

/* === UTILITIES === */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* === SCROLLBAR === */
.screen-container::-webkit-scrollbar {
  width: 0;
}

/* === WORKOUT BUILDER === */
.builder-exercise {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.builder-exercise:last-child {
  border-bottom: none;
}

.builder-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.builder-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.builder-value {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 20px;
  text-align: center;
}

/* === BACK BUTTON === */
.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 8px 0;
  margin-bottom: 12px;
}

.back-btn:active {
  color: var(--text);
}

/* === DIFFICULTY BADGE === */
.difficulty {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.difficulty-beginner { color: var(--success); }
.difficulty-intermediate { color: var(--warning); }
.difficulty-advanced { color: var(--danger); }

/* === TIPS CALLOUT === */
.tips-callout {
  background: var(--purple-dim);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 16px 0;
  border-left: 3px solid var(--purple);
}

.tips-callout-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--purple);
  margin-bottom: 6px;
}

.tips-callout-text {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === RECORDING TOGGLE === */
.recording-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.recording-toggle:active {
  background: var(--bg-card-hover);
}

.recording-toggle-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.recording-toggle-icon {
  font-size: 1.3rem;
}

.recording-toggle-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.recording-toggle-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 1px;
}

/* === VIDEO PREVIEW (during recording) === */
.video-preview-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 12px 0;
  background: #000;
  aspect-ratio: 4 / 3;
}

.video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  display: block;
}

.recording-indicator {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
}

.recording-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: recording-pulse 1.2s ease-in-out infinite;
}

@keyframes recording-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* === PLAYBACK (rating phase) === */
.playback-section {
  margin-bottom: 24px;
}

.playback-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.playback-video {
  width: 100%;
  border-radius: var(--radius);
  background: #000;
  max-height: 300px;
}

/* === AI REVIEW === */
.ai-review-section {
  margin: 16px 0 24px;
  text-align: center;
}

.ai-review-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 8px;
}

.ai-review-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.ai-review-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ai-review-error {
  color: var(--danger);
  font-size: 0.85rem;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.ai-feedback-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(124, 92, 252, 0.2);
  padding: 20px;
  margin: 16px 0 24px;
  text-align: left;
  animation: fadeIn 0.3s ease;
}

.ai-feedback-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--purple);
}

.ai-feedback-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ai-feedback-scores {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ai-score {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-score-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: 72px;
  flex-shrink: 0;
}

.ai-score-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.ai-score-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.ai-score-value {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  width: 28px;
  text-align: right;
}

.ai-feedback-list {
  margin-bottom: 14px;
}

.ai-feedback-list-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.ai-feedback-item {
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 4px 0;
}

.ai-feedback-item.strength {
  color: var(--success);
}

.ai-feedback-item.strength::before {
  content: '✓ ';
}

.ai-feedback-item.improvement {
  color: var(--text-secondary);
}

.ai-feedback-item.improvement::before {
  content: '→ ';
  color: var(--accent);
}

.ai-feedback-example {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 4px;
}

.ai-feedback-example-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
  font-style: italic;
}

/* === CONFETTI (post-workout celebration) === */
@keyframes confetti-fall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confetti-fall 2.5s ease-out forwards;
}

/* === HERO SECTION === */
.hero {
  text-align: center;
  padding: 32px 20px 24px;
}

.hero-brand {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}

.hero-brand .brand-accent {
  color: var(--accent);
}

.hero-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === STAT ROW (home page) === */
.stat-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.stat-row .stat-pill {
  flex: 1;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-pill-value {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-pill-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

/* === CTA SECTION === */
.cta-section {
  padding: 0 0 8px;
}

.cta-section .btn-primary {
  font-size: 1.15rem;
  padding: 20px 32px;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.cta-section .btn-primary:hover {
  box-shadow: 0 6px 28px rgba(255, 107, 53, 0.4);
  transform: translateY(-1px);
}

.cta-section .btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 12px rgba(255, 107, 53, 0.25);
}

/* === LIST CONTAINERS === */
.workout-list, .exercise-list, .history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* === WORKOUT GRID (2-col on wider screens) === */
.workout-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 500px) {
  .workout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .workout-grid .workout-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .workout-grid .workout-card-icon {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    border-radius: 12px;
  }

  .workout-grid .workout-card-meta {
    flex-wrap: wrap;
    gap: 6px;
  }

  .workout-grid .workout-card-arrow {
    display: none;
  }
}

/* === MEDIA QUERIES === */
@media (min-width: 601px) {
  #app {
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  }

  .screen {
    padding: 24px 28px;
  }
}

/* === DESKTOP LAYOUT === */
@media (min-width: 768px) {
  #app {
    max-width: 1200px;
    flex-direction: row;
  }

  /* Bottom nav becomes left sidebar */
  .bottom-nav {
    position: static;
    flex-direction: column;
    width: var(--sidebar-width);
    height: 100%;
    flex-shrink: 0;
    justify-content: flex-start;
    padding: 20px 0;
    gap: 4px;
    border-top: none;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    order: -1;
  }

  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px 20px;
    border-radius: 0;
    gap: 12px;
    width: 100%;
    min-width: unset;
  }

  .nav-item .nav-label {
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: normal;
  }

  .nav-item .nav-icon {
    font-size: 1.2rem;
  }

  /* Content area */
  .screen-container {
    padding-bottom: 16px;
  }

  .screen {
    padding: 28px 40px;
    max-width: 800px;
  }

  .screen-container::-webkit-scrollbar {
    width: 6px;
  }

  .screen-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
  }

  /* Grid layouts */
  .workout-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .exercise-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .workout-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .complete-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* === DESKTOP HOVER STATES === */
@media (hover: hover) and (pointer: fine) {
  .card-interactive:hover {
    background: var(--bg-card-hover);
    transform: translateY(-1px);
  }

  .btn-primary:hover {
    background: #ff7d4d;
  }

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

  .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .time-chip:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
  }

  .category-chip:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
  }

  .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .rating-star:hover {
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    transform: scale(1.1);
  }
}

/* ========================================
   SCENARIO PRACTICE
   ======================================== */

/* === SCENARIO LIST HEADER === */
.scenarios-header {
  text-align: center;
  padding: 24px 0 16px;
}

.scenarios-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.scenarios-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* === CATEGORY PILLS === */
.category-pills-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -20px;
  padding: 0 20px;
  scrollbar-width: none;
}

.category-pills-scroll::-webkit-scrollbar {
  display: none;
}

.category-pills {
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
  min-width: max-content;
}

.category-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  transition: all 0.2s;
}

.category-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(255, 107, 53, 0.3);
}

.category-pill-icon {
  font-size: 0.95rem;
}

/* === SCENARIO CATEGORY HEADER === */
.scenario-category-header {
  margin: 20px 0 16px;
}

.scenario-category-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.scenario-category-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* === SCENARIO TIMELINE === */
.scenario-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 40px;
}

.scenario-timeline-item {
  display: flex;
  gap: 16px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.scenario-timeline-item.locked {
  cursor: default;
  opacity: 0.55;
}

.timeline-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40px;
  flex-shrink: 0;
}

.timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(255, 107, 53, 0.35);
}

.timeline-line {
  width: 2px;
  flex: 1;
  min-height: 16px;
  background: rgba(255, 255, 255, 0.08);
  margin: 2px 0;
}

/* === SCENARIO CARD === */
.scenario-card {
  flex: 1;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}

.scenario-card-highlighted {
  background: linear-gradient(135deg, rgba(255, 183, 77, 0.12), rgba(255, 107, 53, 0.08));
  border-color: rgba(255, 183, 77, 0.25);
}

.scenario-card-content {
  flex: 1;
  min-width: 0;
}

.scenario-card-status {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 4px;
}

.scenario-card-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.scenario-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scenario-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.scenario-card-time {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.scenario-card-play {
  flex-shrink: 0;
}

.scenario-play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #fff;
  box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
  transition: transform 0.15s;
}

.scenario-timeline-item.unlocked:active .scenario-play-btn {
  transform: scale(0.92);
}

/* === SCENARIO DETAIL / BRIEFING === */
.scenario-detail-header {
  margin-bottom: 8px;
}

.scenario-briefing {
  padding-bottom: 24px;
}

.scenario-briefing-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.scenario-briefing-time {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.scenario-briefing-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.scenario-briefing-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.scenario-context-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  border-left: 3px solid var(--accent);
}

.scenario-context-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 8px;
}

.scenario-context-text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
}

.scenario-tips-card {
  background: var(--purple-dim);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  border-left: 3px solid var(--purple);
}

.scenario-tips-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--purple);
  margin-bottom: 8px;
}

.scenario-tips-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === FLOW PREVIEW === */
.scenario-flow-preview {
  margin-top: 20px;
}

.scenario-flow-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.scenario-flow-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scenario-flow-step {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scenario-flow-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.scenario-flow-step-text {
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.scenario-detail-cta {
  padding-top: 8px;
}

.btn-lg {
  padding: 18px 28px;
  font-size: 1.05rem;
}

/* === SCENARIO PRACTICE === */
.scenario-practice-screen {
  padding-bottom: 40px;
}

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

/* === PHASE DOTS === */
.scenario-phase-dots {
  display: flex;
  gap: 6px;
}

.phase-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  transition: all 0.2s;
}

.phase-dot.active {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255, 107, 53, 0.4);
}

.phase-dot.completed {
  background: var(--success);
  font-size: 0.45rem;
  color: #fff;
}

/* === SCENARIO PROMPT BANNER === */
.scenario-prompt-banner {
  background: linear-gradient(135deg, rgba(255, 183, 77, 0.1), rgba(255, 107, 53, 0.06));
  border: 1px solid rgba(255, 183, 77, 0.15);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.scenario-prompt-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 6px;
}

.scenario-prompt-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}

/* === RECORDING TIMER OVERLAY === */
.recording-timer {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.scenario-recording-controls {
  margin-top: 16px;
}

/* === REVIEW PHASE === */
.scenario-review-title {
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 4px;
}

.scenario-review-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
}

.scenario-review-actions {
  margin-top: 20px;
}

/* === Q&A CHAT === */
.qa-chat-container {
  display: flex;
  flex-direction: column;
  min-height: 60vh;
}

.qa-chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0;
  overflow-y: auto;
  max-height: 50vh;
}

.qa-message {
  display: flex;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}

.qa-message-ai {
  align-self: flex-start;
}

.qa-message-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.qa-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.qa-message-bubble {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 80%;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.qa-message-ai .qa-message-bubble {
  border-bottom-left-radius: 4px;
}

.qa-message-user .qa-message-bubble {
  background: var(--accent-dim);
  border-color: rgba(255, 107, 53, 0.15);
  border-bottom-right-radius: 4px;
}

.qa-coaching-bubble {
  background: rgba(0, 180, 216, 0.08);
  border-color: rgba(0, 180, 216, 0.2);
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-left: 3px solid var(--blue, #00b4d8);
}

/* === Q&A TYPING INDICATOR === */
.qa-typing {
  display: flex;
  gap: 4px;
  padding: 14px 18px;
}

.qa-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
  animation: qa-typing-bounce 1.4s ease-in-out infinite;
}

.qa-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.qa-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes qa-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* === Q&A RESPONSE AREA === */
.qa-response-area {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.qa-response-prompt {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-align: center;
}

.qa-record-controls {
  margin-bottom: 12px;
}

.qa-review-response {
  margin-top: 12px;
}

.qa-audio-playback {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.qa-response-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.qa-complete-cta {
  margin-top: 24px;
}

/* === SCENARIO COMPLETE === */
.scenario-complete {
  text-align: center;
  padding-top: 32px;
}

.scenario-complete .ai-feedback-card {
  text-align: left;
}

.scenario-complete-actions {
  margin-top: 28px;
}

/* === HOVER STATES FOR SCENARIO === */
@media (hover: hover) and (pointer: fine) {
  .scenario-timeline-item.unlocked:hover .scenario-card {
    background: var(--bg-card-hover);
    transform: translateY(-1px);
  }

  .scenario-timeline-item.unlocked:hover .scenario-card-highlighted {
    background: linear-gradient(135deg, rgba(255, 183, 77, 0.18), rgba(255, 107, 53, 0.12));
  }

  .category-pill:hover:not(.active) {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
  }
}

/* ========================================
   INTERVIEW DRILL
   ======================================== */

.drill-screen {
  animation: fadeIn 0.2s ease;
}

.drill-field-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drill-recording-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--danger);
  animation: recording-pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

.drill-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.8s linear infinite;
}

.drill-timer {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   NEW FEATURES — Filler Analysis, WHOOP Dashboard, Curriculum
   ============================================================ */

/* === FILLER MARKS (highlighted transcript) === */
.filler-mark {
  background: rgba(255, 107, 53, 0.25);
  color: var(--accent);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 600;
}

/* === FILLER & PACE SUMMARY PILLS (in AI feedback) === */
.filler-summary,
.pace-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  margin: 8px 0;
}

.filler-count,
.pace-wpm {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.filler-label,
.pace-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* === TRANSCRIPT DETAILS (collapsible) === */
.transcript-details {
  margin: 10px 0;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.transcript-details summary {
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.transcript-details summary::before {
  content: '▶ ';
  font-size: 0.65rem;
}

.transcript-details[open] summary::before {
  content: '▼ ';
}

.transcript-text {
  padding: 0 14px 12px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* === LIVE TRANSCRIPT (during active set) === */
.live-transcript-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 12px 0;
}

.live-transcript-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.live-transcript-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
  min-height: 1.5em;
  font-style: italic;
}

/* === TONGUE TWISTER RESULT (rating screen) === */
.twister-result-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.twister-result-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
}

.twister-result-status.match {
  color: var(--success);
}

.twister-result-status.mismatch {
  color: var(--text-secondary);
}

.twister-status-icon {
  font-size: 1.2rem;
}

.twister-prompt-label,
.twister-transcript-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 2px;
  margin-top: 8px;
}

.twister-prompt-text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
}

.twister-transcript-text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
  font-style: italic;
}

/* === WHOOP SESSION REACTION CARD === */
.reaction-card {
  border-radius: var(--radius);
  border: 1px solid;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.reaction-tone {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.reaction-headline {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 8px;
}

.reaction-callout {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === PERFORMANCE SCREEN === */
.perf-header {
  padding-bottom: 8px;
}

.perf-tab-row {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.perf-tab {
  flex: 1;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}

.perf-tab.active {
  background: var(--bg-card);
  color: var(--text);
}

/* === WHOOP STATS ROW === */
.whoop-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.whoop-stat {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}

.whoop-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.whoop-stat-label {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === SKILL RINGS === */
.skill-rings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  justify-items: center;
}

.skill-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.skill-ring {
  overflow: visible;
}

.skill-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 5;
}

.skill-ring-fill {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.skill-ring-text {
  fill: var(--text);
  font-size: 10px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  font-family: var(--font);
}

.skill-ring-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: center;
}

/* === INSIGHT CARD === */
.insight-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--purple-dim);
  border: 1px solid rgba(124, 92, 252, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.insight-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.insight-text {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === TREND CHART === */
.chart-container {
  position: relative;
  min-height: 160px;
}

.trend-chart {
  display: block;
  width: 100%;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  text-align: center;
  padding: 0 20px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.chart-legend-item {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  color: var(--cat-color, var(--text-secondary));
  border: 1px solid var(--cat-color, rgba(255,255,255,0.1));
  opacity: 0.6;
  transition: opacity 0.15s;
}

.chart-legend-item.active {
  opacity: 1;
}

/* === STREAK CALENDAR === */
.calendar-container {
  overflow-x: auto;
}

.streak-calendar {
  display: block;
}

/* === HISTORY LIST (in performance log tab) === */
.history-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.history-score {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
}

/* === HOME: FOCUS CARD === */
.focus-card {
  padding: 14px 16px;
}

.focus-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.focus-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.focus-card-info {
  flex: 1;
}

.focus-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 2px;
}

.focus-card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.focus-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.focus-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.focus-progress-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

/* === INLINE EMPTY STATE === */
.empty-state-inline {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-align: center;
  padding: 12px 0;
}
