* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0a;
  color: #f5f5f5;
  min-height: 100vh;
  line-height: 1.5;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: #22c55e;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #0a0a0a;
}
.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tagline {
  color: #888;
  font-size: 0.875rem;
  margin-bottom: 2.5rem;
}

/* Form card */
.form-card {
  background: #161616;
  border: 1px solid #222;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.form-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.form-sub {
  color: #888;
  font-size: 0.875rem;
  margin-bottom: 1.75rem;
}

.field { margin-bottom: 1.25rem; }
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 0.4rem;
}
input, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 10px;
  color: #f5f5f5;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #22c55e;
}
select { cursor: pointer; }
textarea { resize: vertical; min-height: 80px; }

.hint {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.3rem;
}

.btn {
  width: 100%;
  padding: 0.875rem;
  background: #22c55e;
  color: #0a0a0a;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
}
.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.error-msg {
  background: #3b1010;
  border: 1px solid #5c1a1a;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #f87171;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

/* Program view */
.program-header {
  margin-bottom: 2rem;
}
.program-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.program-meta {
  color: #888;
  font-size: 0.875rem;
}
.program-meta span {
  margin-right: 1rem;
}
.badge {
  display: inline-block;
  background: #22c55e;
  color: #0a0a0a;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

.week-block {
  margin-bottom: 2rem;
}
.week-title {
  font-size: 1rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #222;
}
.day-card {
  background: #161616;
  border: 1px solid #222;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.day-header {
  padding: 0.875rem 1rem;
  background: #1c1c1c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.day-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.day-number {
  background: #22c55e;
  color: #0a0a0a;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}
.day-focus { font-weight: 600; font-size: 0.9rem; }
.rest-tag {
  color: #666;
  font-size: 0.8rem;
  font-weight: 500;
}
.exercise-list {
  padding: 0.75rem 1rem;
}
.exercise-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid #1e1e1e;
}
.exercise-item:last-child { border-bottom: none; }
.exercise-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.15rem; }
.exercise-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #888;
}
.exercise-meta span { display: flex; gap: 0.25rem; align-items: center; }
.exercise-notes { font-size: 0.78rem; color: #666; margin-top: 0.15rem; font-style: italic; }
.mini-tag {
  background: #222;
  color: #888;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
}

/* Collapse arrow */
.collapse-arrow { color: #555; font-size: 0.8rem; transition: transform 0.2s; }
.collapse-arrow.open { transform: rotate(180deg); }

/* Footer note */
.foot-note {
  text-align: center;
  color: #444;
  font-size: 0.75rem;
  margin-top: 2rem;
}

/* Loading state */
.generating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 1rem;
  text-align: center;
}
.spinner {
  width: 48px; height: 48px;
  border: 4px solid #222;
  border-top-color: #22c55e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }