* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f2f2f2;
  color: #111;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
}

.site-header {
  background: #111;
  color: #fff;
  padding: 1rem 0;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
}

.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 0.4rem 0;
  position: relative;
}

.main-nav a:hover {
  color: #fff;
}

.main-nav a.active {
  color: #fff;
  font-weight: 600;
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

.nav-search {
  min-width: 240px;
  width: 100%;
  max-width: 320px;
}

.nav-search input {
  width: 100%;
  border: none;
  outline: none;
  border-radius: 999px;
  background: #1b1b1b;
  color: #f8fafc;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hero {
  padding: 4rem 1.5rem 2rem;
}

.hero-copy {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 1rem;
  color: #ffcb47;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 3.75rem);
  line-height: 1.02;
}

.hero-description {
  max-width: 640px;
  margin: 1.2rem auto 0;
  color: #4b5563;
  font-size: 1.05rem;
}

.workout-section {
  padding: 2rem 1rem 4rem;
}

.container {
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  padding: 2.25rem 2rem;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.container h1 {
  margin: 0 0 1.5rem;
  font-size: 1.95rem;
  color: #111;
}

button#generate-btn {
  width: 100%;
  max-width: 320px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.4rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 32px rgba(17, 17, 17, 0.16);
}

button#generate-btn:hover {
  background: #222;
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(17, 17, 17, 0.2);
}

#workout {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.search-empty {
  margin: 0;
  color: #6b7280;
  font-size: 0.98rem;
}

.exercise {
  background: #f8fafc;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  padding: 1rem 1.4rem;
  width: 100%;
  min-width: 0;
  text-align: left;
}

.exercise strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.exercise em {
  color: #6b7280;
  font-style: normal;
}

/* ── Workout generator ── */
.workout-hint {
  margin: 0 0 1rem;
  font-size: 0.93rem;
  color: #6b7280;
}

.muscle-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.muscle-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
}

.muscle-pill:hover {
  background: #e2e8f0;
}

.muscle-pill:has(input:checked) {
  background: #111;
  color: #fff;
  border-color: #111;
}

.muscle-pill input[type="checkbox"] {
  display: none;
}

.exercise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0.4rem 0 0.6rem;
}

.ex-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #111;
  color: #fff;
  border-radius: 4px;
  padding: 2px 8px;
}

.ex-tag--secondary {
  background: #6b7280;
}

.exercise p {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.55;
}

.count-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1.25rem;
  font-size: 0.93rem;
  color: #374151;
  font-weight: 500;
}

.count-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.count-stepper button {
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  color: #111;
  transition: background 0.15s;
  flex-shrink: 0;
}

.count-stepper button:hover { background: #e2e8f0; }

.count-stepper input[type="number"] {
  width: 44px;
  border: none;
  border-left: 1.5px solid #e2e8f0;
  border-right: 1.5px solid #e2e8f0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111;
  padding: 0;
  height: 34px;
  -moz-appearance: textfield;
}

.count-stepper input[type="number"]::-webkit-inner-spin-button,
.count-stepper input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

@media (max-width: 860px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0 1rem;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 1rem;
    padding-top: 0.75rem;
  }

  .nav-search {
    width: 100%;
  }

  .nav-search input {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-top: 3rem;
  }

  .hero h1 {
    font-size: 2.3rem;
  }

  .container {
    padding: 1.75rem 1.5rem;
  }
}
