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

:root {
  --primary: #ff6b35;
  --primary-dark: #e05520;
  --secondary: #1a1a2e;
  --accent: #16213e;
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --surface2: #16213e;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --success: #4caf50;
  --border: rgba(255,255,255,0.08);
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container { max-width: 900px; margin: 0 auto; padding: 0 16px; }

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  border-bottom: 2px solid var(--primary);
  padding: 24px 0;
  text-align: center;
}
.logo { font-size: 2rem; font-weight: 800; color: var(--primary); letter-spacing: -1px; }
.tagline { color: var(--text-muted); font-size: .95rem; margin-top: 4px; }

/* ===== ADS ===== */
.ad-zone {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 12px;
  margin: 20px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-label {
  position: absolute;
  top: 4px; right: 8px;
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ad-top { margin-top: 20px; }
.ad-inline { margin: 24px 0; min-height: 120px; }
.ad-bottom { margin: 32px auto; max-width: 900px; }

/* ===== WIZARD CARD ===== */
.wizard-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 36px 32px;
  margin: 28px 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* Step indicator */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
}
.step {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
  color: var(--text-muted);
  transition: all .3s;
  flex-shrink: 0;
}
.step.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.done { background: var(--success); border-color: var(--success); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); max-width: 80px; }

/* Step content */
.step-content { display: none; }
.step-content.active { display: block; animation: fadeIn .3s ease; }

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

.step-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

/* ===== CHOICE CARDS ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.choice-card {
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  cursor: pointer;
  transition: all .25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.choice-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.choice-card.selected { border-color: var(--primary); background: rgba(255,107,53,.12); }
.card-icon { font-size: 2.2rem; }
.card-title { font-weight: 700; font-size: 1rem; color: var(--text); }
.card-desc { font-size: .82rem; color: var(--text-muted); }

/* ===== DAYS GRID ===== */
.days-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  justify-content: center;
}
.day-card {
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 28px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all .25s;
  display: flex; align-items: center; justify-content: center;
}
.day-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.day-card.selected { border-color: var(--primary); background: rgba(255,107,53,.12); color: var(--primary); }

/* ===== BUTTONS ===== */
.btn {
  padding: 12px 28px;
  border-radius: 50px;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
}
.btn-next, .btn-generate {
  background: var(--primary);
  color: #fff;
  margin-top: 4px;
}
.btn-next:hover:not(:disabled), .btn-generate:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-next:disabled { opacity: .4; cursor: not-allowed; }
.btn-back { background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border); }
.btn-back:hover { background: var(--border); }
.btn-row { display: flex; gap: 12px; align-items: center; }
.btn-restart { background: var(--surface2); color: var(--text); border: 1px solid var(--border); margin-top: 32px; }
.btn-restart:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-print { background: transparent; color: var(--text-muted); border: 1px solid var(--border); font-size: .85rem; padding: 8px 16px; }
.btn-print:hover { border-color: var(--primary); color: var(--primary); }

/* ===== AFFILIATE BANNER ===== */
.affiliate-banner {
  background: linear-gradient(135deg, #1a2a1a 0%, #0f1f0f 100%);
  border: 1px solid rgba(76,175,80,.3);
  border-radius: var(--radius);
  margin: 20px 0;
  overflow: hidden;
}
.aff-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  flex-wrap: wrap;
}
.aff-badge {
  background: var(--success);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}
.aff-inner p { flex: 1; font-size: .9rem; color: var(--text-muted); min-width: 180px; }
.aff-inner strong { color: var(--text); }
.aff-btn {
  background: var(--success);
  color: #fff;
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
  transition: background .2s;
}
.aff-btn:hover { background: #388e3c; }

/* ===== PROGRAM OUTPUT ===== */
.program-output { margin: 0 0 40px; }

.program-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
#program-title { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
#program-subtitle { color: var(--text-muted); margin-top: 4px; }

/* Day blocks */
.day-block {
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.day-header {
  background: var(--surface2);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.day-header:hover { background: rgba(255,107,53,.08); }
.day-name { font-weight: 700; font-size: 1.05rem; flex: 1; }
.day-focus { font-size: .82rem; color: var(--primary); background: rgba(255,107,53,.12); padding: 3px 10px; border-radius: 50px; }
.day-toggle { color: var(--text-muted); font-size: 1.2rem; transition: transform .25s; }
.day-block.open .day-toggle { transform: rotate(180deg); }

.day-body { display: none; padding: 0 20px 20px; }
.day-block.open .day-body { display: block; }

/* Exercise table */
.exercise-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: .92rem;
}
.exercise-table th {
  text-align: left;
  padding: 8px 12px;
  background: rgba(255,255,255,.04);
  color: var(--text-muted);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.exercise-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.exercise-table tr:last-child td { border-bottom: none; }
.exercise-table tr:hover td { background: rgba(255,255,255,.02); }
.ex-name { font-weight: 600; }
.ex-note { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.badge-series { background: rgba(255,107,53,.15); color: var(--primary); padding: 2px 8px; border-radius: 4px; font-weight: 700; font-size: .85rem; }
.badge-reps { background: rgba(22,33,62,.8); color: var(--text); padding: 2px 8px; border-radius: 4px; font-size: .85rem; }
.badge-rest { color: var(--text-muted); font-size: .85rem; }

/* Rest day */
.rest-day { padding: 20px; color: var(--text-muted); font-style: italic; }

/* ===== SUPPLEMENTS ===== */
.suppl-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 32px;
  border: 1px solid var(--border);
}
.suppl-section h3 { font-size: 1.15rem; margin-bottom: 20px; }
.suppl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

.suppl-card {
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all .25s;
  display: block;
}
.suppl-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.suppl-icon { font-size: 1.8rem; margin-bottom: 8px; }
.suppl-name { font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.suppl-why { font-size: .8rem; color: var(--text-muted); margin-bottom: 10px; }
.suppl-link { font-size: .8rem; color: var(--primary); font-weight: 600; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}
.disclaimer { margin-top: 6px; font-size: .78rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ===== PRINT ===== */
@media print {
  .ad-zone, .affiliate-banner, .site-header .tagline,
  .btn-print, .btn-restart, .step-indicator, #wizard,
  .suppl-section, .site-footer { display: none !important; }
  .program-output { display: block !important; }
  .day-body { display: block !important; }
  body { background: #fff; color: #000; }
  .day-block { border: 1px solid #ccc; }
  .day-header { background: #f0f0f0; }
  .exercise-table td { border-bottom: 1px solid #eee; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .wizard-card { padding: 20px 14px; }
  .card-grid { grid-template-columns: 1fr; }
  .step-line { max-width: 40px; }
  #program-title { font-size: 1.3rem; }
  .exercise-table { font-size: .8rem; }
  .exercise-table th, .exercise-table td { padding: 7px 8px; }
}
