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

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --surface-3: #242424;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --text-muted: #888;
  --accent: #ff6b35;
  --accent-glow: rgba(255, 107, 53, 0.15);
  --green: #34d399;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --yellow: #fbbf24;
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Nav */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.nav-back {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.nav-title {
  font-weight: 800;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1207 50%, #0f0f0f 100%);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}

.hero-content { max-width: 700px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-glow);
  border: 1px solid rgba(255,107,53,0.3);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #ff6b35 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.hero-sub { font-size: 1rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.hero-sub a { color: var(--accent); text-decoration: none; }

.hero-stats { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-num { font-size: 1.4rem; font-weight: 800; color: #fff; }
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Week Toggle */
.week-toggle {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem;
}

.week-btn {
  padding: 10px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.week-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.week-btn:hover:not(.active) { border-color: var(--accent); color: var(--text); }

/* Plan Grid */
.plan-container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 2rem; }

.day-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.day-name { font-size: 1rem; font-weight: 800; }
.day-num { font-size: 0.75rem; color: var(--text-muted); }

.day-totals {
  display: flex;
  gap: 0.75rem;
}

.day-total {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.dt-cal { background: rgba(255,107,53,0.12); color: var(--accent); }
.dt-prot { background: rgba(52,211,153,0.12); color: var(--green); }

.day-meals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.meal-portion {
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.shake-slot { background: var(--surface-2); }
.ml-shake { background: rgba(167,139,250,0.15); color: var(--purple); }

.meal-slot {
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--border);
  transition: background 0.2s;
}

.meal-slot:last-child { border-right: none; }
.meal-slot:hover { background: var(--surface-2); }

.meal-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  padding: 2px 8px;
  border-radius: 4px;
}

.ml-breakfast { background: rgba(251,191,36,0.15); color: var(--yellow); }
.ml-lunch { background: rgba(52,211,153,0.15); color: var(--green); }
.ml-dinner { background: rgba(96,165,250,0.15); color: var(--blue); }

.meal-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.meal-macros {
  display: flex;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.meal-macros span { white-space: nowrap; }

.meal-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.meal-link:hover { text-decoration: underline; }

/* Shopping */
.shopping-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.shopping-header {
  text-align: center;
  margin-bottom: 2rem;
}

.shopping-header h2 {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff, var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shopping-sub { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }

.shopping-totals { display: flex; justify-content: center; gap: 0.75rem; }

.total-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--text);
}

.total-price { background: rgba(52,211,153,0.15); color: var(--green); }

.shopping-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.shop-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.shop-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.85rem 1.15rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
}

.shop-cat-icon { font-size: 1.1rem; }

.shop-items { padding: 0.5rem 0; }

.shop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1.15rem;
  font-size: 0.82rem;
  transition: background 0.15s;
}

.shop-item:hover { background: var(--surface-2); }

.shop-item-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.shop-item-name { font-weight: 600; }
.shop-item-detail { font-size: 0.72rem; color: var(--text-muted); }

.shop-item-price {
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}

/* Tips */
.tips-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.tips-section h2 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.tip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.tip-icon { font-size: 1.5rem; display: block; margin-bottom: 0.5rem; }
.tip-card h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.tip-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

footer a { color: var(--accent); text-decoration: none; }

/* Responsive */
@media (max-width: 900px) {
  .day-meals { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .day-meals { grid-template-columns: 1fr; }
  .meal-slot { border-right: none; border-bottom: 1px solid var(--border); }
  .meal-slot:last-child { border-bottom: none; }
  .hero { padding: 2rem 1rem; }
  .shopping-categories { grid-template-columns: 1fr; }
}

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

.day-card { animation: fadeIn 0.3s ease both; }
.day-card:nth-child(2) { animation-delay: 0.05s; }
.day-card:nth-child(3) { animation-delay: 0.1s; }
.day-card:nth-child(4) { animation-delay: 0.15s; }
.day-card:nth-child(5) { animation-delay: 0.2s; }
.day-card:nth-child(6) { animation-delay: 0.25s; }
.day-card:nth-child(7) { animation-delay: 0.3s; }
