/**
 * MASTER.CSS
 * Clean, mobile-first styling.
 */

:root {
  --primary: #3B82F6;
  --primary-hover: #2563EB;
  --secondary: #1E293B;
  --secondary-hover: #273449;
  --danger: #E74C3C;
  --danger-hover: #C0392B;
  --success: #27AE60;
  --accent: #3B82F6;
  --bg-light: #1E293B;
  --bg-main: #0F172A;
  --text: #F1F5F9;
  --text-light: #94A3B8;
  --text-dark: #F1F5F9;
  --border: #334155;
  --spacing: 1rem;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* LAYOUT */
#app {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: var(--bg-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: var(--spacing);
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* TAB NAVIGATION */
.tabs {
  display: flex;
  border-bottom: none;
  background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-main) 100%);
  padding: 0.5rem 0.5rem;
  margin: 0;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.3);
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 0 0 auto;
  padding: 0.8rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  min-width: fit-content;
  border-radius: 6px;
  position: relative;
}

.tab-btn:hover {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
}

.tab-btn.active {
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, #2563EB 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  font-weight: 800;
  letter-spacing: 0.8px;
}

/* SVG ICONS */
.icon-header {
  width: 28px;
  height: 28px;
  display: inline-block;
  margin-right: 0.5rem;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
}

.icon-tab {
  width: 20px;
  height: 20px;
  display: inline-block;
  margin-right: 0.5rem;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  transition: all 0.3s ease;
}

.tab-btn:hover .icon-tab {
  stroke: var(--primary);
}

.tab-btn.active .icon-tab {
  stroke: white;
}

/* SCREEN CONTAINERS */
.screen {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

#today-screen,
#history-screen {
  display: none;
}

/* BUTTONS */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-icon-delete {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 25px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary) 0%, #003A7A 100%);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #0D62B0 0%, #004E89 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 78, 137, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #B8291F 100%);
  color: white;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
}

.btn-danger:hover {
  background: linear-gradient(135deg, var(--danger-hover) 0%, #8B1F17 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-danger-small {
  background: linear-gradient(135deg, var(--danger) 0%, #B8291F 100%);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.btn-danger-small:hover {
  background: linear-gradient(135deg, var(--danger-hover) 0%, #8B1F17 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-icon-delete {
  background: transparent;
  color: var(--danger);
  border: 2px solid var(--danger);
  padding: 0.5rem 1rem;
  font-size: 1rem;
  justify-self: end; /* Align to the right in grid */
  align-self: center; /* Center vertically */
}

.btn-icon-delete:hover {
  background: var(--danger);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.full-width {
  width: 100%;
  margin-top: var(--spacing);
}

/* INPUTS */
.input-label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.input-field {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background-color: rgba(59, 130, 246, 0.05);
  transition: all 0.2s ease;
}

.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background-color: rgba(59, 130, 246, 0.1);
}

textarea.input-field {
  resize: vertical;
}

select.input-field {
  cursor: pointer;
}

.add-form .input-label:first-of-type {
  margin-top: 0;
}

/* HEART RATE INPUT - Preferred for calorie calculation */
#cal-heart-rate {
  border-color: #28a745;
  background: rgba(40, 167, 69, 0.02);
}

#cal-heart-rate:focus {
  outline: none;
  border-color: #28a745;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.15);
}

/* MODE SELECTION */
.mode-selection-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mode-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
  padding: 0.4rem 0.6rem;
  background: var(--bg-light);
  border-radius: 3px;
}

/* SAVE STATUS */
.save-status {
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  display: inline-block;
  margin-left: 0.5rem;
  min-width: 80px;
  text-align: center;
}

.save-status.saving {
  color: #ff9800;
  background: rgba(255, 152, 0, 0.1);
}

.save-status.saved {
  color: var(--success);
  background: rgba(40, 167, 69, 0.1);
}

.save-status.failed {
  color: var(--danger);
  background: rgba(220, 53, 69, 0.1);
}

/* TODAY SCREEN */
.today-header {
  margin-bottom: var(--spacing);
  padding-bottom: var(--spacing);
  border-bottom: 1px solid var(--border);
}

.today-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--primary);
}

.today-footer {
  margin-top: var(--spacing) * 2;
  padding-top: var(--spacing);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
  position: sticky;
  bottom: 0;
  background: var(--bg-main);
  padding-bottom: var(--spacing);
}

.session-info {
  background: var(--bg-light);
  padding: var(--spacing);
  border-radius: 4px;
  margin-bottom: var(--spacing);
}

.exercises-container {
  margin-top: var(--spacing);
}

.exercise-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: var(--spacing);
  margin-bottom: var(--spacing);
}

.exercise-card h4 {
  margin: var(--spacing) 0 0.5rem 0;
  font-size: 1rem;
  color: var(--text);
}

.heart-rate-section {
  margin-top: var(--spacing);
  padding: 0.75rem;
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 3px;
}

.heart-rate-note {
  margin: 0 0 0.5rem 0;
  font-size: 0.8rem;
  color: #856404;
  font-style: italic;
}

.heart-rate-section label {
  display: block;
  margin-top: 0.5rem;
}

.heart-rate-section label:first-of-type {
  margin-top: 0.5rem;
}

.entries-container {
  margin-top: var(--spacing);
  padding: 0.5rem 0;
}

.entries-container h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.entry-row {
  display: grid;
  grid-template-columns: 90px 110px 85px 85px 95px 95px 105px auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-light);
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* Bodyweight mode (no weight column) */
.entry-row.bodyweight {
  grid-template-columns: 90px 85px 85px 95px 95px 105px auto;
}

/* Timed mode (different layout) */
.entry-row.timed {
  grid-template-columns: 120px 85px 95px 95px 105px auto;
}

/* Cardio mode */
.entry-row.cardio {
  grid-template-columns: 120px 85px 95px 95px 105px auto;
}

.entry-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0; /* Prevents overflow */
}

.entry-field-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.entry-input {
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background-color: rgba(59, 130, 246, 0.05);
  width: 100%; /* Fill grid column */
  box-sizing: border-box;
}

.entry-input-small {
  font-size: 0.85rem;
}

.entry-input:focus {
  outline: none;
  border-color: var(--primary);
}

.set-calories {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.6rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
  justify-self: start; /* Align to the left within grid column */
}

/* HISTORY SCREEN */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing);
  padding-bottom: var(--spacing);
  border-bottom: 1px solid var(--border);
}

.history-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
}

.session-item-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.5rem;
}

.session-item {
  flex: 1;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: var(--spacing);
  cursor: pointer;
  transition: all 0.2s;
}

.session-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.session-item h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.session-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-light);
}

.session-exercises {
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}

.session-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
}

/* ADD SCREEN */
.add-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
}

.add-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.add-form {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 10px;
  max-width: 100%;
  margin-top: 1.5rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.add-form .button-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.add-form button {
  padding: 1rem 2rem;\n  font-size: 1rem;\n  font-weight: 600;\n  border-radius: 25px;\n  transition: all 0.3s ease;\n}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: var(--spacing);
}

.button-group button {
  width: 100%;
}

.button-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: var(--spacing) * 2;
}

.button-group-vertical button {
  width: 100%;
  padding: 0.75rem 1rem;
}

.button-row {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  width: 100%;
}

.button-row button {
  flex: 1;
  min-width: 0;
}

.no-session-view {
  padding: var(--spacing) * 2;
  text-align: center;
}

.no-session-view h2 {
  margin-top: 0;
  color: var(--text);
}

.no-session-view p {
  color: var(--text-light);
  margin-bottom: var(--spacing);
}

/* STATS SCREEN */
.stats-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.stats-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* Stats Filter */
.stats-filter {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 8px;
  flex-wrap: wrap;
}

.filter-label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-light);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Grouped Stats Layout */
.stats-groups {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

.stats-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.group-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
}

.group-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem;
}

.summary-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.2s ease;
}

.summary-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.summary-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.summary-label {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.chart-section {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
}

.chart-section h3 {
  margin: 0 0 var(--spacing) 0;
  font-size: 1.1rem;
  color: var(--text);
}

.chart-section canvas {
  max-height: 300px;
}

/* EMPTY STATE */
.empty-msg {
  text-align: center;
  color: var(--text-light);
  padding: var(--spacing) 0;
  font-style: italic;
}

/* FOOTER */
footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  padding: var(--spacing);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* RESPONSIVE */
@media (max-width: 600px) {
  :root {
    --spacing: 0.75rem;
  }

  header h1 {
    font-size: 1.2rem;
  }

  .tab-btn {
    padding: 0.75rem 0.9rem;
    font-size: 0.8rem;
    min-width: fit-content;
  }

  .entry-row,
  .entry-row.bodyweight,
  .entry-row.timed,
  .entry-row.cardio {
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 0.5rem;
  }

  .entry-field-label {
    font-size: 0.65rem;
  }

  .entry-input {
    font-size: 0.85rem;
  }

  .history-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .history-header h2 {
    margin-bottom: 0;
  }

  .history-header button {
    width: 100%;
  }

  .button-group {
    flex-direction: column;
  }

  .button-group button {
    width: 100%;
  }

  .screen {
    padding: 1rem;
  }

  .stats-filter {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .filter-btn {
    flex: 1;
    min-width: 70px;
  }

  .summary-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .summary-card {
    padding: 1rem;
  }

  .summary-value {
    font-size: 1.5rem;
  }

  .group-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .charts-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .chart-section {
    padding: 1rem;
  }

  .chart-section canvas {
    max-height: 250px;
  }
}

/* ACCESSIBILITY */
button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* WORKOUT PLANNER STYLES */
.workout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.workout-header h2 {
  margin: 0;
}

.workout-actions {
  display: flex;
  gap: 0.5rem;
}

.workout-name-input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  color: var(--text);
  background-color: rgba(59, 130, 246, 0.05);
  font-family: inherit;
  transition: all 0.2s ease;
}

.workout-name-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background-color: rgba(59, 130, 246, 0.1);
}

.style-selector {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 8px;
}

.style-selector > label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
}

.radio-label input[type="radio"] {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
}

.radio-label span {
  color: var(--text);
}

.rest-settings {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 8px;
}

.rest-settings h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
}

.rest-input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rest-input-group label {
  flex: 1;
  font-weight: 500;
}

.rest-input {
  width: 100px;
  padding: 0.85rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  color: var(--text);
  background-color: rgba(59, 130, 246, 0.05);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.rest-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background-color: rgba(59, 130, 246, 0.1);
}

.exercise-list {
  margin-bottom: 1.5rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
  font-style: italic;
}

.exercise-card {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.exercise-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.exercise-number {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
  min-width: 2rem;
}

.exercise-name-input {
  flex: 1;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  background-color: rgba(59, 130, 246, 0.05);
}

.exercise-name-input:focus {
  border-color: var(--primary);
  outline: none;
}

.exercise-mode-badge {
  padding: 0.25rem 0.75rem;
  background: var(--bg-light);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.superset-badge {
  padding: 0.25rem 0.75rem;
  background: var(--primary);
  color: white;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  margin-left: 0.5rem;
}

.exercise-card-controls {
  display: flex;
  gap: 0.25rem;
}

.btn-icon {
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  line-height: 1;
  border: 1px solid var(--border);
  background: var(--bg-light);
  border-radius: 4px;
  cursor: pointer;
  color: var(--text);
}

.btn-icon:hover:not(:disabled) {
  background: var(--bg-light);
  border-color: var(--secondary);
}

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

.btn-icon.btn-danger {
  color: var(--danger);
  border-color: var(--danger);
}

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

.exercise-targets {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.target-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.target-input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
}

.target-input {
  width: 80px;
  padding: 0.85rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  font-size: 1rem;
  color: var(--text);
  background-color: rgba(59, 130, 246, 0.05);
  font-family: inherit;
  transition: all 0.2s ease;
}

.target-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background-color: rgba(59, 130, 246, 0.1);
}

.add-exercise-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.workout-bottom-actions {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
}

.workout-bottom-actions button {
  flex: 1;
}

.btn-large {
  padding: 1.2rem 2.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.btn-small {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  border-radius: 20px;
}

.quick-complete-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.quick-complete-buttons button {
  flex: 1;
  min-width: 100px;
}

/* WORKOUT RUNNER STYLES */
.runner-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.runner-title-row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.runner-title-row h2 {
  margin: 0;
  font-size: 1.5rem;
}

.elapsed-time {
  font-size: 4rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: white;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.runner-progress {
  font-size: 1rem;
  opacity: 0.9;
  margin-top: 0.5rem;
}

.runner-exercise-card {
  background: var(--bg-light);
  border: 3px solid var(--primary);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 78, 137, 0.3);
  color: var(--text);
}

.runner-exercise-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.runner-exercise-name > span:first-child {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.runner-targets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.target-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.target-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
}

.target-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.rest-timer-card {
  background: linear-gradient(135deg, var(--accent) 0%, #E6A300 100%);
  color: white;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  text-align: center;
  box-shadow: 0 6px 16px rgba(247, 184, 1, 0.3);
}

.rest-timer-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.rest-timer-display {
  font-size: 5rem;
  font-weight: 900;
  font-family: 'Courier New', monospace;
  line-height: 1;
  color: white;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.1em;
}

.rest-timer-display span:first-child {
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.rest-hr-input {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.rest-hr-input label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  text-align: left;
  font-weight: 500;
}

.rest-hr-input input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 1rem;
  text-align: center;
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.95);
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s ease;
}

.rest-hr-input input::placeholder {
  color: #999;
}

.rest-hr-input input:focus {
  outline: none;
  border-color: white;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
  background-color: white;
  transform: scale(1.02);
}

.actual-inputs-container {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.actual-input-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.actual-input-group:last-child {
  margin-bottom: 0;
}

.actual-input-group label {
  flex: 1;
  font-weight: 600;
  color: var(--text);
}

.actual-input {
  width: 120px;
  padding: 0.75rem;
  font-size: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  color: var(--text);
  background-color: rgba(59, 130, 246, 0.05);
  font-family: inherit;
  transition: all 0.2s ease;
}

.actual-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background-color: rgba(59, 130, 246, 0.1);
}

.runner-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.workout-complete {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--bg-light);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: var(--text);
}

.complete-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: celebration 0.6s ease-in-out;
}

@keyframes celebration {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2) rotate(10deg); }
}

.workout-complete h2 {
  color: var(--success);
  margin-bottom: 1rem;
}

.workout-complete p {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.workout-complete button {
  margin: 0.5rem;
}

/* Cooldown screen styles */
.workout-cooldown {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--bg-light);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: var(--text);
}

.cooldown-header {
  margin-bottom: 2rem;
}

.cooldown-header h2 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.cooldown-header p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.cooldown-stats {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

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

.stat-row label {
  text-align: left;
  font-weight: 600;
  color: var(--text);
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.cooldown-timer {
  font-family: 'Courier New', monospace;
}

.cooldown-optional {
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: 8px;
  margin-bottom: 2rem;
}

.cooldown-optional p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.cooldown-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cooldown-actions button {
  width: 100%;
}

/* Complete screen stats */
.complete-stats {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  text-align: left;
}

.complete-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.complete-stat:last-child {
  border-bottom: none;
}

.stat-label {
  font-weight: 600;
  color: var(--text);
}

.complete-stat .stat-value {
  text-align: right;
  font-weight: 700;
  color: var(--primary);
}

/* Responsive adjustments for workout planner */
@media (max-width: 600px) {
  .workout-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .workout-actions {
    width: 100%;
  }

  .workout-actions button {
    flex: 1;
  }

  .exercise-card-header {
    flex-wrap: wrap;
  }

  .exercise-targets {
    flex-direction: column;
  }

  .target-input-group {
    flex-direction: row;
    align-items: center;
  }

  .target-input-group label {
    flex: 1;
  }

  .workout-bottom-actions {
    flex-direction: column;
  }

  /* Runner responsive */
  .runner-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .runner-targets {
    grid-template-columns: 1fr;
  }

  .actual-input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .actual-input-group label {
    text-align: left;
  }

  .actual-input {
    width: 100%;
  }

  .rest-timer-display {
    font-size: 3rem;
  }
}

/* TEMPLATES STYLES */
.templates-header {
  margin-bottom: 2rem;
}

.templates-header h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.templates-subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
}

.templates-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.templates-empty .empty-icon {
  font-size: 4rem;
}

.templates-list {
  display: grid;
  gap: 1.5rem;
}

.template-card {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  color: var(--text);
}

.template-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.template-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.template-name {
  font-size: 1.4rem;
  margin: 0;
  color: var(--text-dark);
  flex: 1;
}

.template-actions {
  display: flex;
  gap: 0.5rem;
}

.template-metadata {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.template-badge {
  background: var(--primary);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.template-stat {
  color: var(--text-light);
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-light);
  border-radius: 4px;
}

.template-exercises {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.template-exercises p {
  margin: 0;
  color: var(--text-dark);
  font-size: 0.95rem;
  line-height: 1.5;
}

.template-details {
  margin-top: 1rem;
}

.template-details summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
  padding: 0.5rem;
  user-select: none;
}

.template-details summary:hover {
  text-decoration: underline;
}

.template-details-content {
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 6px;
  margin-top: 0.5rem;
}

.template-detail-exercise {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

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

.detail-exercise-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.detail-exercise-number {
  font-weight: 700;
  color: var(--primary);
  min-width: 1.5rem;
}

.detail-exercise-name {
  font-weight: 600;
  color: var(--text-dark);
  flex: 1;
}

.badge-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.detail-exercise-targets {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-light);
}

.template-footer {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-light);
}

.template-footer small {
  flex: 1;
}

@media (max-width: 768px) {
  .template-card-header {
    flex-direction: column;
  }

  .template-actions {
    width: 100%;
  }

  .template-actions button {
    flex: 1;
  }

  .detail-exercise-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* PROFILE & ACHIEVEMENTS */
.profile-header {
  padding: 1.5rem 1rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}

.profile-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

.profile-stats {
  padding: 1.5rem 1rem;
  margin-bottom: 2rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--bg-light) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.stat-unit {
  font-size: 0.75rem;
  color: var(--text-light);
  opacity: 0.7;
}

.achievements-section {
  padding: 0 1rem 2rem 1rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  color: var(--text);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.achievement-category {
  margin-bottom: 2rem;
}

.category-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.badges-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.achievement-badge {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  opacity: 0.5;
  cursor: not-allowed;
}

.achievement-badge.unlocked {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-color: var(--primary);
  opacity: 1;
  cursor: default;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  transform: scale(1.05);
}

.badge-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.badge-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.badge-desc {
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.3;
}

.achievement-badge.locked .badge-name,
.achievement-badge.locked .badge-desc {
  color: var(--text-light);
}

/* USER ACCOUNT & DATA MANAGEMENT */
.user-section {
  padding: 0 1rem 2rem 1rem;
  margin-bottom: 2rem;
}

.auth-section,
.data-section {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* Inline Notifications */
.notifications-container-inline {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inline-notification {
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 250px;
  font-weight: 600;
  animation: slideInRight 0.3s ease;
  white-space: nowrap;
}

.inline-notification.fade-out {
  animation: slideOutRight 0.3s ease forwards;
}

.user-info {
  margin-bottom: 1rem;
}

.user-email {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.sign-in-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

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

.sync-controls,
.data-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.btn {
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background: var(--bg-main);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--secondary);
  border-color: var(--primary);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-hover) 100%);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--danger-hover) 0%, var(--danger) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-google {
  background: white;
  color: #333;
  border: 1px solid #ddd;
}

.btn-google:hover:not(:disabled) {
  background: #f8f8f8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.auth-note,
.data-note,
.sync-info {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.75rem;
  line-height: 1.4;
}

.data-stats {
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-main);
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sync-info {
  font-style: italic;
  text-align: center;
}

/* ACHIEVEMENT NOTIFICATIONS */
.notifications-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  pointer-events: none;
  padding: 20px;
}

.achievement-notification {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 50px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  min-width: 320px;
  max-width: 500px;
  text-align: center;
  animation: celebrationPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  cursor: default;
  backdrop-filter: blur(10px);
}

.achievement-notification::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 20px;
  z-index: -1;
  animation: pulseGlow 2s ease-in-out infinite;
}

.achievement-notification.achievement-bg {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.98) 0%, rgba(79, 102, 224, 0.98) 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  position: relative;
}

.achievement-notification.fade-out {
  animation: celebrationOut 0.4s ease-in forwards;
}

.notification-icon {
  font-size: 64px;
  flex-shrink: 0;
  animation: iconBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 700;
  font-size: 20px;
  color: white;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: slideDown 0.6s ease-out 0.2s both;
}

.notification-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  animation: slideDown 0.6s ease-out 0.3s both;
}

@keyframes celebrationPop {
  0% {
    opacity: 0;
    transform: scale(0.5) translateY(-30px);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes celebrationOut {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
}

@keyframes iconBounce {
  0% {
    transform: scale(0) translateY(-20px);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

@keyframes slideInCenter {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* MANUAL ENTRY FORM MODAL */
/* Exercise input rows */
.button-group {
  display: flex;
  gap: 12px;
  flex-direction: column;
  margin-top: 20px;
}

.full-width {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #4285F4, #357ae8);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #357ae8, #2d63d0);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

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

/* Responsive design */
@media (max-width: 600px) {
  .manual-entry-modal {
    padding: 20px;
  }

  .manual-entry-header {
    margin-bottom: 20px;
  }

  .exercise-input-row {
    grid-template-columns: 1fr 70px 70px 70px 35px;
    gap: 8px;
  }

  .exercise-input {
    font-size: 0.8rem;
    padding: 8px;
  }

  .exercise-input::placeholder {
    font-size: 0.75rem;
  }
}

/* CUSTOM CONFIRMATION MODAL */
.confirm-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-modal-box {
  background: #1a2332;
  border: 1px solid #2a3d50;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  padding: 30px;
  max-width: 400px;
  width: 100%;
  animation: slideInCenter 0.3s ease-out;
}

.confirm-modal-message {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 25px 0;
  text-align: center;
}

.confirm-modal-buttons {
  display: flex;
  gap: 12px;
  flex-direction: column;
}

.confirm-ok-btn,
.confirm-cancel-btn {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.confirm-ok-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
}

.confirm-ok-btn:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.confirm-cancel-btn {
  background: #666;
  color: white;
}

.confirm-cancel-btn:hover {
  background: #555;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 102, 102, 0.3);
}

/* CUSTOM PROMPT/SELECTION MODAL */
.prompt-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.prompt-modal-box {
  background: #1a2332;
  border: 1px solid #2a3d50;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  padding: 30px;
  max-width: 450px;
  width: 100%;
  animation: slideInCenter 0.3s ease-out;
}

.prompt-modal-title {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 20px 0;
  text-align: center;
}

.prompt-modal-options {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #2a3d50;
  border-radius: 8px;
  padding: 15px;
  margin: 0 0 20px 0;
  max-height: 200px;
  overflow-y: auto;
}

.prompt-modal-option {
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 8px;
  margin: 5px 0;
  font-family: monospace;
  border-left: 3px solid transparent;
  padding-left: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.prompt-modal-option:hover {
  background: rgba(59, 130, 246, 0.15);
  border-left-color: var(--primary);
  padding-left: 12px;
}

.prompt-modal-input {
  width: 100%;
  padding: 12px;
  margin: 0 0 20px 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #2a3d50;
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 1rem;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.prompt-modal-input:focus {
  outline: none;
  border-color: #4CAF50;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.2);
}

.prompt-modal-buttons {
  display: flex;
  gap: 12px;
  flex-direction: row;
}

.prompt-modal-btn {
  flex: 1;
  padding: 12px;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.prompt-modal-btn-ok {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
}

.prompt-modal-btn-ok:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.prompt-modal-btn-cancel {
  background: #666;
  color: white;
}

.prompt-modal-btn-cancel:hover {
  background: #555;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 102, 102, 0.3);
}

/* Countdown Overlay */
.countdown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.countdown-overlay.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

.countdown-display {
  font-size: 15rem;
  font-weight: 900;
  color: var(--primary);
  font-family: 'Courier New', monospace;
  animation: countdownPulse 1s ease;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
}

.countdown-display.go-text {
  font-size: 12rem;
  color: #4ade80;
  animation: goPulse 0.6s ease;
  text-shadow: 0 0 40px rgba(74, 222, 128, 0.8);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes countdownPulse {
  0% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.9;
  }
}

@keyframes goPulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
