/* =========================
   GLOBAL RESET
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =========================
   ROOT COLORS
========================= */
:root {
  --bg-main: #2a3049;
  --bg-card: #23233b;
  --bg-input: #29292b;

  --border-soft: #050c1f;
  --border-focus: #0f0f0f;

  --text-main: #f2f2f2;
  --text-muted: #9a9aa3;

  --accent: #221741;
  --accent-soft: rgb(13, 1, 46);
  --danger: #ff4b4b;
}

/* =========================
   BODY & CONTAINER
========================= */
body {
  background: radial-gradient(circle at top, #111116, var(--bg-main));
  color: var(--text-main);
  min-height: 100vh;
}
.container {
  width: 100%;
  max-width: 420px;
  animation: fadeIn 0.35s ease;
}

/* =========================
   HEADINGS
========================= */
h1, h2, h3 {
  font-weight: 600;
  letter-spacing: 0.4px;
}

h1 {
  text-align: center;
  margin-bottom: 18px;
}

h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

h3 {
  font-size: 1rem;
}

/* =========================
   FADE ANIMATION
========================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =========================
   BUTTONS
========================= */
button {
  background: linear-gradient(135deg, var(--accent), #443e5a);
  border: none;
  color: rgb(155, 155, 155);
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(122, 75, 255, 0.35);
}

button:active {
  transform: scale(0.98);
}

button.danger {
  background: linear-gradient(135deg, #ff5a5a, #d43c3c);
}

/* =========================
   INPUTS & SELECT
========================= */
input,
select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  padding: 11px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* =========================
   DROPDOWN FIX (CRITICAL)
========================= */
select option,
select optgroup {
  background: #636392;
  color: var(--text-main);
}

/* =========================
   CUSTOM SPLIT BOX
========================= */
.custom-box {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: 15px;
  border-radius: 14px;
  margin-top: 20px;
  animation: fadeIn 0.3s ease;
}

/* =========================
   CUSTOM ACTIONS BOX
========================= */
.custom-actions {
  margin-top: 15px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: 12px;
  border-radius: 14px;
}

.custom-actions button {
  width: 100%;
  margin-bottom: 8px;
}

/* =========================
   DAY LIST (PAGE 2)
========================= */
.day-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.day-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: 12px;
  border-radius: 14px;
  margin-right: 10px;
  cursor: default;
  animation: fadeIn 0.25s ease;
}

.day-card h3 {
  margin-bottom: 6px;
  cursor: pointer;
}

.day-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =========================
   REST CHECKBOX
========================= */

.rest-box { 
  color: #050c1f;
  display: flex;
  align-items: center;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  transition: transform 0.15s ease;
}

input[type="checkbox"]:checked {
  transform: scale(1.1);
}

/* =========================
   EXERCISES (PAGE 3)
========================= */
.exercise-row {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 12px;
  animation: fadeIn 0.25s ease;
}

.exercise-row input,
.exercise-row select {
  margin-bottom: 6px;
}

/* =========================
   BACK BUTTON
========================= */
#backBtn {
  position: fixed;
  top: 18px;
  right: 18px;

  background: rgba(57, 57, 87, 0.9);
  border: 1px solid var(--border-soft);
  color: var(--text-main);

  padding: 6px 10px;
  border-radius: 10px;

  font-size: 0.9rem;
  cursor: pointer;

  z-index: 1000;
  transition: border 0.2s ease, background 0.2s ease;
}

#backBtn:hover {
  border-color: var(--accent);
  background: rgba(18, 18, 20, 1);
}

/* =========================
   SAVE / ADD BUTTONS
========================= */
#resetWeekBtn,
#addExerciseBtn,
#saveDayBtn,
#saveWeek {
  width: 100%;
  margin-top: 12px;
}

/* =========================
   SCROLLBAR (OPTIONAL POLISH)
========================= */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background: #2a2a35;
  border-radius: 10px;
}

/* Progress Bar */
.progress-container {
  margin: 10px 0 20px;
}

.progress-bar {
  width: 100%;
  height: 12px; /* bigger */
  background: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6a00ff, #d400ff);
  transition: width 0.4s ease;
}

#progressText {
  font-size: 13px;
  margin-bottom: 6px;
  opacity: 0.85;
  letter-spacing: 0.5px;
}


/* Completed exercise */
.exercise-row.completed {
  opacity: 0.45;
}

.exercise-row.completed input,
.exercise-row.completed select {
  text-decoration: line-through;
}

/* Reset button */
#resetWeekBtn {
  margin-top: 20px;
  background: transparent;
  border: 1px solid #444;
  color: #aaa;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}

#resetWeekBtn:hover {
  background: #ff0033;
  border-color: #ff0033;
  color: #fff;
}

/* ===== NAVBAR ===== */
.navbar {
  width: 100%;
  background: #0c0c0c;
  border-bottom: 1px solid #1f1f1f;
}

/* MAIN BAR */
.navbar-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO */
.logo {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

/* DESKTOP LINKS */
.nav-links {
  display: flex;
  gap: 22px;
}

.nav-links a {
  color: #cfcfcf;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

/* HAMBURGER */
.nav-toggle {
  display: none;
  font-size: 22px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* MOBILE MENU */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: #0c0c0c;
  border-top: 1px solid #1f1f1f;
}

.mobile-menu a {
  padding: 14px 24px;
  color: #cfcfcf;
  text-decoration: none;
  border-bottom: 1px solid #1a1a1a;
}

.mobile-menu a:hover {
  background: #141414;
  color: #fff;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .mobile-menu.show {
    display: flex;
  }
}

.app-wrapper {
  display: flex;
  justify-content: center;
  padding: 30px 15px;
}

