/* Progress Bar */
.progress-bar-container {
  background-color: #eee;
  border-radius: 8px;
  overflow: hidden;
  height: 20px;
  margin-bottom: 10px;
  position: relative;
}

.progress-bar {
  height: 100%;
  background-color: #27ae60;
  width: 0%;
  transition: width 0.5s ease;
}

.progress-text {
  display: block;
  margin-top: 5px;
  font-weight: bold;
  text-align: right;
  color: #2c3e50;
  font-size: 0.9em;
}

.tracker-container {
  max-width: 700px;
  margin: 30px auto;
  background-color: #fff;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.tracker-container h2 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.week-progress {
  margin-bottom: 20px;
}

.reset-section {
  text-align: center;
  margin-top: 30px;
}

#reset-progress {
  background-color: #e74c3c;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

#reset-progress:hover {
  background-color: #c0392b;
}

.note {
  font-size: 0.9em;
  color: #7f8c8d;
  margin-top: 5px;
  text-align: center;
}

.go-tracker {
  text-align: center;
  margin-top: 30px;
}

.go-tracker-btn {
  display: inline-block;
  background-color: #3498db;
  color: #fff;
  text-decoration: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.go-tracker-btn:hover {
  background-color: #2c80c4;
}

.return-workouts {
  text-align: center;
  margin-top: 25px;
}

.return-btn {
  display: inline-block;
  background-color: #27ae60;
  color: #fff;
  text-decoration: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.return-btn:hover {
  background-color: #219150;
}


/* --- HERO SECTION --- */
.hero {
  background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)), url('../assets/images/fitness-bg.jpg') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 100px 20px;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.hero p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 25px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.hero-btn.primary {
  background-color: #27ae60;
  color: #fff;
}

.hero-btn.primary:hover {
  background-color: #219150;
}

.hero-btn.secondary {
  background-color: #3498db;
  color: #fff;
}

.hero-btn.secondary:hover {
  background-color: #2c80c4;
}

/* --- FEATURES SECTION --- */
.features {
  padding: 60px 20px;
  background: #f9f9f9;
  text-align: center;
}

.features h2 {
  margin-bottom: 30px;
  color: #2c3e50;
}

.feature-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.feature-card {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  max-width: 300px;
}

.feature-card h3 {
  color: #3498db;
  margin-bottom: 10px;
}

/* --- CALL TO ACTION --- */
.cta {
  background-color: #3498db;
  color: #fff;
  text-align: center;
  padding: 60px 20px;
}

.cta h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.cta p {
  margin-bottom: 20px;
}

.cta-btn {
  display: inline-block;
  background-color: #27ae60;
  color: #fff;
  text-decoration: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.cta-btn:hover {
  background-color: #219150;
}


/* --- Workout Page Layout --- */
.workout-container {
  padding: 20px;
  color: #fff;
  background-color: #000;
  min-height: 100vh;
}

.week-tabs, .day-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.week-btn, .day-btn {
  padding: 8px 15px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: #fff;
  background: #222;
}

.week-btn.active, .day-btn.active {
  background: #3498db;
}

h3#exercise-count {
  text-align: center;
  color: #ddd;
  margin: 15px 0;
}

/* --- Exercise Cards --- */
.exercise-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.exercise-card {
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(255,255,255,0.1);
  transition: transform 0.3s ease;
  position: relative;
}

.exercise-card:hover {
  transform: scale(1.02);
}

.exercise-thumb {
  position: relative;
}

.exercise-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.check-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #3498db;
  border: none;
  color: #fff;
  font-weight: bold;
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.9;
}

.exercise-card.completed .check-btn {
  background: #27ae60;
}

.exercise-info {
  padding: 15px;
}

.exercise-info h4 {
  margin-bottom: 5px;
  font-size: 1.1rem;
  color: #fff;
}

.exercise-info .muscle {
  font-size: 0.9rem;
  color: #bbb;
}

.exercise-info .set-type {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.85rem;
  margin: 5px 0;
}

.exercise-info .details {
  font-size: 0.9rem;
  color: #ccc;
}

/* Dark mode footer */
footer {
  background: #000;
  color: #777;
  padding: 15px;
  text-align: center;
}


/* --- Exercise Detail Page --- */
.exercise-page {
  background: #fff;
  color: #000;
  font-family: "Poppins", sans-serif;
}

.back-btn {
  display: inline-block;
  margin: 10px 15px;
  text-decoration: none;
  color: #3498db;
  font-weight: bold;
}

.exercise-video {
  position: relative;
  width: 100%;
  max-height: 250px;
  overflow: hidden;
}

.exercise-video img {
  width: 100%;
  height: auto;
  display: block;
}

.overlay-info {
  position: absolute;
  bottom: 10px;
  left: 15px;
  color: #fff;
}

.overlay-info p {
  margin: 3px 0;
}

.badge {
  background: #e74c3c;
  color: #fff;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.85rem;
}

h3#exercise-muscle {
  text-align: center;
  font-weight: 600;
  margin-top: 15px;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  gap: 10px;
}

.tab {
  border: 1px solid #000;
  border-radius: 25px;
  padding: 8px 18px;
  background: #fff;
  cursor: pointer;
  font-weight: bold;
}

.tab.active {
  background: #000;
  color: #fff;
}

/* Tab content */
.tab-content {
  padding: 10px 20px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Log Section */
.sets {
  margin-top: 10px;
}

.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.set-row input {
  width: 60px;
  text-align: center;
  border: none;
  background: #f9f9f9;
  font-weight: bold;
}

.set-check {
  background: #1e3a8a;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.log-status {
  text-align: center;
  background: #f1f1f1;
  border-radius: 10px;
  padding: 10px;
  font-weight: bold;
  color: #1e3a8a;
}

.restart-btn {
  display: block;
  margin: 15px auto;
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
}

.restart-btn:hover {
  background: #333;
}

/* Enhanced Log Section */
.sets-header {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 10px;
  font-weight: 600;
}

.sets {
  margin-top: 10px;
}

.set-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  gap: 10px;
}

.set-row input {
  width: 45%;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px;
  font-weight: bold;
}

.set-row button {
  background: #1e3a8a;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

textarea#user-note {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  margin: 15px 0;
  resize: none;
  height: 80px;
  font-family: "Poppins", sans-serif;
}

.action-buttons {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.save-btn, .cancel-btn {
  padding: 12px;
  border-radius: 30px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
}

.save-btn {
  background: #1e3a8a;
  color: #fff;
}

.cancel-btn {
  background: #f5f5f5;
  color: #999;
}

.completion-msg {
  text-align: center;
  font-size: 0.9rem;
  color: #1e3a8a;
  margin-bottom: 10px;
}

/* --- History Cards --- */
.history-card {
  background: #f8f8f8;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.history-card h4 {
  margin: 0 0 10px;
  font-weight: 600;
  color: #1e3a8a;
}

.history-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

.history-card ul li {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.history-card p {
  font-size: 0.9rem;
  margin: 5px 0;
}

.completed-badge {
  display: inline-block;
  background: #1e3a8a;
  color: #fff;
  font-size: 0.8rem;
  border-radius: 8px;
  padding: 3px 8px;
}

/* --- Clear History Button --- */
.clear-history-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  margin: 10px auto;
  transition: background 0.2s;
}

.clear-history-btn:hover {
  background: #c0392b;
}

/* --- History Summary --- */
.history-summary {
  text-align: center;
  font-weight: 600;
  color: #1e3a8a;
  background: #eef2ff;
  padding: 10px 15px;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.settings-section {
  background: #f8f8f8;
  padding: 20px;
  border-radius: 12px;
  margin: 20px;
  text-align: center;
}

.settings-section h2 {
  color: #1e3a8a;
  margin-bottom: 10px;
}

.settings-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.settings-section input[type="time"] {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.settings-section .save-btn {
  margin-top: 15px;
  background: #1e3a8a;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
}


.pause-controls {
  background: #fff;
  padding: 15px;
  margin: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pause-controls h3 {
  color: #1e3a8a;
  margin-bottom: 10px;
}

.pause-controls label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
}

.pause-controls select {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 250px;
  margin-bottom: 10px;
}

#pause-reminders-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

#pause-reminders-btn:hover {
  background: #c0392b;
}

#pause-status {
  font-size: 0.9rem;
  color: #555;
  margin-top: 10px;
}

.workout-card.completed::after {
  content: "✔";
  position: absolute;
  top: 10px;
  right: 10px;
  background: #1e40af;
  color: white;
  font-weight: bold;
  font-size: 18px;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
}

.exercise-card.completed::after {
  content: "✔";
  position: absolute;
  top: 10px;
  right: 10px;
  background: #22c55e; /* bright green */
  color: white;
  font-weight: bold;
  font-size: 18px;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

.tab-btn.active {
  background: #000;
  color: #fff;
  border-radius: 25px;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.tab-btn {
  border: 1px solid #ccc;
  border-radius: 25px;
  padding: 8px 16px;
  background: transparent;
  color: #333;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.tab-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Other helpful styles */
.note-box {
  width: 100%;
  min-height: 80px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px;
  font-size: 1rem;
  resize: none;
}

.primary-btn, .secondary-btn {
  width: 100%;
  padding: 12px;
  border-radius: 30px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 10px;
}

.primary-btn {
  background: #1e3a8a;
  color: white;
}

.secondary-btn {
  background: #f2f2f2;
  color: #666;
}

.completion-text {
  text-align: center;
  margin-top: 10px;
  color: #444;
}

.highlight-glow {
  animation: glowFlash 1.2s ease-out;
}

@keyframes glowFlash {
  0% { background-color: rgba(0, 255, 0, 0.25); }
  50% { background-color: rgba(0, 255, 0, 0.4); }
  100% { background-color: transparent; }
}

.check-btn.completed {
  background-color: #28a745 !important; /* green */
  color: white !important;
  border-color: #28a745;
}

.set-check.completed {
  background-color: #28a745 !important;  /* green */
  color: #fff !important;
  border-color: #28a745 !important;
}


/* cardio styling (minimal, paste into exercise.css) */
.cardio-big-box { border:2px solid #000; padding:18px; border-radius:12px; display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.cardio-set-label { font-weight:800; font-size:28px; }
.cardio-duration { font-size:18px; color:#333; }
.cardio-timer-row { display:flex; gap:12px; align-items:center; margin-bottom:8px; }
.cardio-timer-input { padding:14px; border-radius:10px; border:1px solid #ddd; width:160px; text-align:center; font-size:18px; }
.cardio-play, .cardio-reset { padding:10px 12px; border-radius:10px; border:none; background:#333; color:#fff; }
.set-check.cardio-check { border-radius:50%; width:36px; height:36px; border:2px solid #ccc; background:transparent; }
.set-check.cardio-check.completed { background:#1e3a8a; color:#fff; border-color:#1e3a8a; }



.cardio-top-card {
  border: 2px solid #000;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: left;
}

.cardio-top-card h2 {
  font-size: 32px;
  margin: 0;
}

.cardio-top-card p {
  font-size: 20px;
  margin-top: 6px;
}

.cardio-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.cardio-number {
  font-size: 20px;
  font-weight: bold;
  width: 30px;
  text-align: center;
}

.timer-display {
  flex: 1;
  border: 2px solid #000;
  padding: 12px;
  border-radius: 12px;
  font-size: 28px;
  font-weight: bold;
  text-align: center;
}

.timer-play, .timer-check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-check.done {
  background: #1e3a8a;
  color: #fff;
}

.cardio-sub {
  text-align: center;
  color: #555;
  margin: 8px 0 20px 0;
}

#user-note {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  border: 2px solid #ddd;
  padding: 12px;
  margin-top: 8px;
  font-size: 16px;
}



/* ---------- Exercise / Card UI (mobile-first) ---------- */

/* Top card style used for Set summary and rest card */
.card-top {
  border: 2px solid #000;
  padding: 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.card-top h2 { margin:0; font-size:28px; font-weight:800; }
.card-top p { margin:0; font-size:18px; color:#222; }

/* Tabs style - already added previously but keep for completeness */
.tabs { display:flex; justify-content:center; gap:15px; margin:20px 0; }
.tab-btn { border-radius:30px; padding:10px 20px; border:1px solid #ccc; background:#fff; font-weight:600; }
.tab-btn.active { background:#000; color:#fff; border-color:#000; }

/* --- Normal/Strength sets layout --- */
.set-wrapper { margin-bottom: 18px; }
.set-row { display:flex; gap:12px; align-items:center; }
.set-num { width:36px; text-align:center; font-weight:700; font-size:20px; }
.set-inputs { display:flex; gap:14px; flex:1; align-items:center; }
.reps-box, .weight-box {
  flex:1;
  border-radius:12px;
  border:2px solid #ddd;
  padding:14px 8px;
  text-align:center;
  font-size:22px;
  font-weight:700;
  background:#fff;
  box-sizing:border-box;
}
.reps-box.empty, .weight-box.empty { color:#d3d3d3; background:#fafafa; }
.prev-text { color:#666; font-size:0.95rem; margin-top:8px; text-align:left; }

/* tick button style (right side) */
.set-check {
  width:44px; height:44px; border-radius:50%;
  border:2px solid #bbb; background:transparent; font-weight:700;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.set-check.completed { background:#1e3a8a; color:#fff; border-color:#1e3a8a; }

/* --- Cardio layout --- */
.cardio-top-card { border:2px solid #000; padding:18px; border-radius:12px; margin-bottom:18px; display:flex; justify-content:space-between; align-items:center; }
.cardio-row { display:flex; gap:12px; align-items:center; margin-bottom:10px; }
.cardio-number { font-weight:700; width:36px; text-align:center; font-size:20px; }
.timer-display { flex:1; border:2px solid #ddd; padding:14px; border-radius:12px; text-align:center; font-weight:700; font-size:28px; }
.timer-play, .timer-reset { width:44px; height:44px; border-radius:50%; border:none; background:#333; color:#fff; font-size:18px; cursor:pointer; }
.timer-check { width:44px; height:44px; border-radius:50%; border:2px solid #bbb; background:transparent; cursor:pointer; }
.timer-check.completed { background:#1e3a8a; color:#fff; border-color:#1e3a8a; }

/* note area */
.note-box { width:100%; min-height:110px; border-radius:12px; border:2px solid #ddd; padding:12px; font-size:16px; margin-top:12px; }

/* footer save button */
.primary-btn { width:100%; padding:16px; border-radius:40px; background:#1e3a8a; color:#fff; border:none; font-weight:800; font-size:18px; box-shadow:0 8px 24px rgba(0,0,0,0.12); }

/* history card */
.history-card { border-radius:12px; padding:12px; border:1px solid #eee; margin-bottom:10px; background:#fff; }
.history-meta { font-weight:700; margin-bottom:6px; }

/* helpers */
.hidden { display:none !important; }
.center { text-align:center; }


.prev-text {
  text-align: center;
  width: 100%;
  font-size: 14px;
  color: #666;
  margin-top: 6px;
}

.rest-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 3px solid #26C536;
  border-radius: 20px;
  padding: 18px 20px;
  margin-bottom: 10px;
  background: #f8fff8;
}

.rest-card h2 {
  margin: 0;
  font-size: 28px;
  color: #26C536;
  font-weight: 700;
}

.rest-card p {
  margin: 0;
  font-size: 18px;
  color: #26C536;
  font-weight: 600;
}

.rest-play-btn {
  width: 55px;
  height: 55px;
  background: #26C536;
  border-radius: 50%;
  border: none;
  font-size: 30px;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}

.rest-sub {
  text-align: center;
  color: #26C536;
  margin: 10px 0;
  font-weight: 600;
}


/* VIDEO HEADER */
.video-header {
  width: 100%;
  position: relative;
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Center circular play button */
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: none;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  font-size: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.25);
}

/* Info overlay (bottom left same as screenshot) */
.video-info-box {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: white;
  text-shadow: 0 2px 5px rgba(0,0,0,0.6);
}

.video-text {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.video-type-badge {
  margin-top: 6px;
  display: inline-block;
  background: #E53039;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: white;
}
