/* ============================================================
   SWIRL MASTER — Ninja Swirl Receptencompanion
   Stylesheet v1.0
   ============================================================ */

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

:root {
  /* Brand palette — Ice cream / frozen treat inspired */
  --purple-dark: #5A189A;
  --purple-primary: #7B2CBF;
  --purple-light: #9D4EDD;
  --purple-pale: #F3E8FF;
  --pink-accent: #FF6B9D;
  --pink-soft: #FFC2D4;
  --mint-primary: #06D6A0;
  --mint-pale: #D8F3DC;
  --cream: #FFF8F0;
  --berry: #E63946;
  --berry-dark: #C1121F;
  --mango: #FFB627;
  --sky: #48CAE4;

  /* Semantic */
  --text-dark: #1A1A2E;
  --text-secondary: #4A4A68;
  --text-muted: #8888A0;
  --border: #E8E8F0;
  --bg-main: #FFFFFF;
  --bg-card: #FAFAFF;
  --bg-hover: #F0F0FF;

  /* Typography */
  --font-display: 'Fredoka', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;

  /* Layout */
  --container-max: 1200px;
  --shadow-sm: 0 2px 8px rgba(123, 44, 191, .06);
  --shadow-md: 0 4px 16px rgba(123, 44, 191, .1);
  --shadow-lg: 0 12px 40px rgba(123, 44, 191, .15);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: .25s cubic-bezier(.4, 0, .2, 1);
}

/* Dark mode */
[data-theme="dark"] {
  --bg-main: #0F0A1A;
  --bg-card: #1A1325;
  --bg-hover: #251B35;
  --text-dark: #F0E8FF;
  --text-secondary: #B0A8C8;
  --text-muted: #6A6280;
  --border: #2D2540;
  --purple-pale: #2A1F40;
  --pink-soft: #3A2030;
  --cream: #1A1425;
  --mint-pale: #152820;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), color var(--transition);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { font-family: var(--font-display); }
h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.75rem; font-weight: 600; line-height: 1.3; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: .75rem; }
h4 { font-size: 1.05rem; font-weight: 500; margin-bottom: .5rem; }
p { margin-bottom: .5rem; }
.text-secondary { color: var(--text-secondary); font-size: .9rem; }
.text-muted { color: var(--text-muted); font-size: .85rem; }
.mb-1 { margin-bottom: .75rem; }
.mb-2 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: .75rem; }
.mt-2 { margin-top: 1.5rem; }

/* ===== HEADER ===== */
.app-header {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-primary) 50%, var(--pink-accent) 100%);
  color: #fff;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-md);
  position: sticky; top: 0; z-index: 100;
}
.header-content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.logo { display: flex; align-items: center; gap: .75rem; }
.logo-icon { font-size: 2.4rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,.2)); }
.logo-title { color: #fff; font-size: 1.7rem; margin: 0; font-family: var(--font-display); }
.logo-subtitle { color: var(--purple-pale); font-size: .8rem; margin: 0; }

/* ===== NAV ===== */
.tab-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky; top: 64px; z-index: 90;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: 1; min-width: max-content;
  padding: .85rem 1.25rem;
  border: none; background: none;
  font-family: var(--font-body); font-size: .9rem; font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer; white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--purple-primary); background: var(--purple-pale); }
.tab-btn.active { color: var(--purple-primary); border-bottom-color: var(--purple-primary); font-weight: 600; }

/* ===== CONTAINER ===== */
.container { max-width: var(--container-max); margin: 0 auto; padding: 1.5rem 1rem; flex: 1; width: 100%; }

/* ===== TAB PANELS ===== */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-featured { border: 2px solid var(--purple-light); }
.card-badge {
  position: absolute; top: -.6rem; right: 1rem;
  background: linear-gradient(135deg, var(--pink-accent), var(--berry));
  color: #fff; font-size: .72rem; font-weight: 700;
  padding: .25rem .75rem; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .5px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.5rem;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
  color: #fff;
  box-shadow: 0 4px 12px rgba(123, 44, 191, .3);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple-primary));
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(123, 44, 191, .4);
}
.btn-secondary {
  background: var(--mint-primary); color: #fff;
  box-shadow: 0 4px 12px rgba(6, 214, 160, .3);
}
.btn-secondary:hover:not(:disabled) { background: #04B888; transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { border-color: var(--purple-primary); color: var(--purple-primary); }
.btn-danger { background: var(--berry); color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--berry-dark); }
.btn-large { padding: .85rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: .4rem .9rem; font-size: .82rem; }
.btn-icon {
  background: rgba(255,255,255,.15); border: none; border-radius: 50%;
  width: 42px; height: 42px; font-size: 1.2rem;
  cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: rgba(255,255,255,.28); transform: rotate(15deg); }

/* ===== INPUTS ===== */
.input {
  width: 100%; padding: .65rem .85rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .95rem;
  background: var(--bg-main); color: var(--text-dark);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus { outline: none; border-color: var(--purple-primary); box-shadow: 0 0 0 3px var(--purple-pale); }
.sort-select { max-width: 200px; }

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

/* ===== DASHBOARD ===== */
.dashboard-hero {
  text-align: center; margin-bottom: 2rem; padding: 2.5rem 1.5rem;
  background: linear-gradient(135deg, var(--purple-pale) 0%, var(--pink-soft) 100%);
  border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.dashboard-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,107,157,.08), transparent 50%);
}
.hero-emoji { font-size: 3.5rem; margin-bottom: .5rem; }
.dashboard-hero h2 { margin-bottom: .25rem; position: relative; }

.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  text-align: center; cursor: pointer;
  transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--purple-light); }
.stat-number {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 700;
  background: linear-gradient(135deg, var(--purple-primary), var(--pink-accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: .8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; margin-top: .2rem; }

.quick-types { display: flex; flex-wrap: wrap; gap: .5rem; }
.quick-type-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .85rem; border-radius: 30px;
  background: var(--purple-pale); color: var(--purple-primary);
  font-weight: 600; font-size: .85rem; cursor: pointer;
  transition: all var(--transition); border: 1px solid transparent;
}
.quick-type-chip:hover { background: var(--purple-primary); color: #fff; transform: scale(1.05); }

.dash-featured-list { display: flex; flex-direction: column; gap: .5rem; }
.dash-featured-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem; border-radius: var(--radius-sm);
  background: var(--bg-main); cursor: pointer;
  transition: all var(--transition);
}
.dash-featured-item:hover { background: var(--purple-pale); }
.dash-featured-emoji { font-size: 1.8rem; }
.dash-featured-info { flex: 1; }
.dash-featured-info strong { font-size: .95rem; display: block; }
.dash-featured-info small { color: var(--text-secondary); font-size: .8rem; }

.tip-content { padding: 1rem; background: var(--mint-pale); border-radius: var(--radius-sm); border-left: 4px solid var(--mint-primary); }
[data-theme="dark"] .tip-content { background: var(--mint-pale); }

/* ===== QUIZ ===== */
.quiz-container { }
.quiz-question { margin-bottom: 1rem; }
.quiz-question-text { font-weight: 600; margin-bottom: .5rem; }
.quiz-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.quiz-option {
  padding: .5rem 1rem; border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-main); cursor: pointer; font-size: .9rem;
  transition: all var(--transition);
}
.quiz-option:hover { border-color: var(--purple-light); }
.quiz-option.selected { border-color: var(--purple-primary); background: var(--purple-pale); color: var(--purple-primary); }
.quiz-result {
  padding: 1.5rem; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--purple-pale), var(--pink-soft));
  text-align: center;
}
.quiz-result-emoji { font-size: 3rem; margin-bottom: .5rem; }

/* ===== FILTERS ===== */
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; }
.filter-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; }
.filter-group { display: flex; flex-wrap: wrap; gap: .35rem; }
.filter-btn {
  padding: .4rem .8rem; border: 1px solid var(--border); border-radius: 24px;
  background: var(--bg-main); color: var(--text-secondary);
  font-family: var(--font-body); font-size: .82rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--purple-primary); color: var(--purple-primary); }
.filter-btn.active { background: var(--purple-primary); color: #fff; border-color: var(--purple-primary); }
.filter-chip {
  padding: .35rem .75rem; border: 1px solid var(--border); border-radius: 20px;
  background: var(--bg-main); color: var(--text-secondary);
  font-family: var(--font-body); font-size: .8rem; cursor: pointer;
  transition: all var(--transition);
}
.filter-chip:hover { border-color: var(--mint-primary); color: var(--mint-primary); }
.filter-chip.active { background: var(--mint-primary); color: #fff; border-color: var(--mint-primary); }

/* ===== RECIPE GRID ===== */
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.recipe-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer; transition: all var(--transition);
  display: flex; flex-direction: column;
}
.recipe-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--purple-light); }
.recipe-card-header {
  padding: 1.5rem 1rem .75rem; text-align: center;
  position: relative;
}
.recipe-emoji { font-size: 3rem; line-height: 1; }
.recipe-card-body { padding: 0 1rem 1rem; flex: 1; display: flex; flex-direction: column; }
.recipe-card-body h4 { font-size: 1.1rem; margin-bottom: .3rem; }
.recipe-card-desc { font-size: .85rem; color: var(--text-secondary); margin-bottom: .75rem; flex: 1; }
.recipe-card-meta { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }
.recipe-tag {
  font-size: .72rem; font-weight: 600; padding: .2rem .55rem;
  border-radius: 12px; text-transform: uppercase; letter-spacing: .3px;
}
.tag-ice_cream { background: #F3E8FF; color: #7B2CBF; }
.tag-gelato { background: #D8F3DC; color: #06D6A0; }
.tag-sorbet { background: #FFF3E0; color: #FF8F00; }
.tag-frozen_yogurt { background: #E3F2FD; color: #1976D2; }
.tag-soft_serve { background: #FCE4EC; color: #C2185B; }
.tag-milkshake { background: #EFEBE9; color: #5D4037; }
.tag-smoothie_bowl { background: #F1F8E9; color: #558B2F; }
.tag-custard { background: #FFF8E1; color: #FF6F00; }
.tag-fruit_whip { background: #FCE4EC; color: #E91E63; }
.tag-high_protein { background: #E8EAF6; color: #3F51B5; }
.tag-vegan { background: #E8F5E9; color: #2E7D32; }
.tag-dairy_free { background: #FFF3E0; color: #E65100; }
.tag-low_sugar { background: #E1F5FE; color: #0277BD; }
.tag-keto { background: #FCE4EC; color: #880E4F; }
.tag-beginner { background: #F3E8FF; color: #7B2CBF; }

[data-theme="dark"] .tag-ice_cream { background: #2A1F40; color: #CE93D8; }
[data-theme="dark"] .tag-gelato { background: #152820; color: #80CBC4; }
[data-theme="dark"] .tag-sorbet { background: #2A2010; color: #FFB74D; }
[data-theme="dark"] .tag-frozen_yogurt { background: #1A2A3A; color: #64B5F6; }
[data-theme="dark"] .tag-soft_serve { background: #2A1520; color: #F48FB1; }
[data-theme="dark"] .tag-milkshake { background: #252018; color: #BCAAA4; }
[data-theme="dark"] .tag-smoothie_bowl { background: #1A2510; color: #AED581; }
[data-theme="dark"] .tag-custard { background: #2A2510; color: #FFD54F; }
[data-theme="dark"] .tag-fruit_whip { background: #2A1020; color: #F48FB1; }
[data-theme="dark"] .tag-high_protein { background: #1A1A30; color: #9FA8DA; }

.recipe-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 1rem .75rem;
}
.recipe-difficulty { font-size: .8rem; color: var(--text-muted); }
.recipe-time { font-size: .8rem; color: var(--text-muted); }
.recipe-fav-btn {
  background: none; border: none; font-size: 1.2rem; cursor: pointer;
  transition: all var(--transition); padding: .2rem;
}
.recipe-fav-btn:hover { transform: scale(1.2); }
.recipe-fav-btn.active { filter: hue-rotate(0deg); }

/* ===== MODAL ===== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; overflow-y: auto; }
.modal.hidden { display: none; }
.modal-content {
  background: var(--bg-main); border-radius: var(--radius);
  padding: 0; max-width: 700px; width: 100%; max-height: 85vh; overflow-y: auto;
  position: relative; box-shadow: var(--shadow-lg);
}
.modal-close { position: absolute; top: .75rem; right: 1rem; background: rgba(0,0,0,.05); border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-secondary); border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; z-index: 1; }
.modal-close:hover { background: rgba(0,0,0,.1); color: var(--text-dark); }

/* Recipe Detail */
.detail-header {
  padding: 2rem 1.5rem 1rem; text-align: center;
  background: linear-gradient(135deg, var(--purple-pale), var(--pink-soft));
  border-radius: var(--radius) var(--radius) 0 0;
}
.detail-emoji { font-size: 4rem; }
.detail-title { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: .25rem; }
.detail-subtitle { color: var(--text-secondary); font-size: .9rem; }
.detail-tags { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; margin-top: .75rem; }

.detail-body { padding: 1.5rem; }
.detail-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.detail-info-item { text-align: center; padding: .75rem; background: var(--bg-card); border-radius: var(--radius-sm); }
.detail-info-item .info-icon { font-size: 1.5rem; }
.detail-info-item .info-value { font-weight: 700; font-size: .9rem; }
.detail-info-item .info-label { font-size: .75rem; color: var(--text-secondary); }

.detail-section { margin-bottom: 1.5rem; }
.detail-section h4 { font-size: 1.1rem; margin-bottom: .5rem; border-bottom: 2px solid var(--purple-pale); padding-bottom: .25rem; }

.ingredients-list { list-style: none; }
.ingredients-list li {
  padding: .5rem 0; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .5rem; font-size: .92rem;
}
.ingredients-list li:last-child { border: none; }
.ingredient-bullet { width: 8px; height: 8px; border-radius: 50%; background: var(--purple-primary); flex-shrink: 0; }

.steps-list { list-style: none; counter-reset: step; }
.steps-list li {
  padding: .6rem 0 .6rem 2.5rem; position: relative; font-size: .92rem;
  counter-increment: step;
}
.steps-list li::before {
  content: counter(step);
  position: absolute; left: 0; top: .5rem;
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
  color: #fff; font-weight: 700; font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
}

.mixin-suggestions { display: flex; flex-wrap: wrap; gap: .4rem; }
.mixin-suggestion {
  padding: .35rem .7rem; border-radius: 20px;
  background: var(--mint-pale); color: var(--text-dark);
  font-size: .82rem; font-weight: 500;
}

.nutrition-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: .5rem; }
.nutrition-item { text-align: center; padding: .6rem; background: var(--bg-card); border-radius: var(--radius-xs); }
.nutrition-value { font-weight: 700; font-size: .95rem; color: var(--purple-primary); }
.nutrition-label { font-size: .72rem; color: var(--text-secondary); }

.detail-actions { display: flex; gap: .5rem; padding: 0 1.5rem 1.5rem; }

/* ===== MIX & MATCH ===== */
.mixmatch-container {
  display: flex; align-items: stretch; gap: .5rem; overflow-x: auto;
  padding-bottom: .5rem; min-height: 280px;
}
.mixmatch-column {
  flex: 1; min-width: 200px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  display: flex; flex-direction: column;
}
.mixmatch-column h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.mixmatch-options {
  flex: 1; display: flex; flex-wrap: wrap; gap: .35rem;
  align-content: flex-start; overflow-y: auto; max-height: 150px;
  padding: .25rem;
}
.mm-option {
  padding: .35rem .65rem; border: 1px solid var(--border); border-radius: 20px;
  background: var(--bg-main); font-size: .8rem; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.mm-option:hover { border-color: var(--purple-primary); color: var(--purple-primary); }
.mm-option.selected { background: var(--purple-primary); color: #fff; border-color: var(--purple-primary); }
.mixmatch-selected { margin-top: auto; padding-top: .5rem; border-top: 1px solid var(--border); min-height: 32px; }
.mm-selected-label { font-size: .82rem; color: var(--text-secondary); }
.mm-selected-value { font-weight: 600; font-size: .9rem; color: var(--purple-primary); }
.mixmatch-arrow {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--purple-light);
  padding: 0 .25rem;
}

.mixmatch-result { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }

.mm-result-card {
  background: var(--bg-card); border: 2px solid var(--purple-light);
  border-radius: var(--radius); padding: 2rem;
  text-align: center; max-width: 600px; margin: 0 auto;
  animation: fadeIn .4s ease;
}
.mm-result-emoji { font-size: 3.5rem; margin-bottom: .5rem; }
.mm-result-title { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: .5rem; }
.mm-result-combo { font-size: .95rem; color: var(--text-secondary); margin-bottom: 1rem; }
.mm-result-ingredients { text-align: left; margin-bottom: 1rem; }
.mm-result-program {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: 30px;
  background: var(--purple-pale); color: var(--purple-primary);
  font-weight: 600; font-size: .9rem;
}

.mm-compatibility {
  display: flex; align-items: center; gap: .5rem; justify-content: center;
  margin-bottom: 1rem;
}
.mm-compatibility-bar {
  width: 200px; height: 10px; background: var(--border); border-radius: 5px; overflow: hidden;
}
.mm-compatibility-fill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, var(--berry), var(--mango), var(--mint-primary));
  transition: width .8s ease;
}
.mm-compatibility-label { font-size: .9rem; font-weight: 600; }

/* ===== GUIDE ===== */
.guide-sections {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.guide-nav-card {
  cursor: pointer; text-align: center; transition: all var(--transition);
  border: 2px solid var(--border);
}
.guide-nav-card:hover { border-color: var(--purple-light); transform: translateY(-2px); }
.guide-nav-card.active { border-color: var(--purple-primary); background: var(--purple-pale); }
.guide-icon { font-size: 2.5rem; display: block; margin-bottom: .5rem; }
.guide-nav-card h3 { margin-bottom: .1rem; font-size: 1rem; }
.guide-nav-card p { font-size: .8rem; color: var(--text-secondary); }

.guide-content {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  line-height: 1.8;
}
.guide-content h3 { font-size: 1.4rem; margin-bottom: 1rem; color: var(--purple-primary); }
.guide-content h4 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }

.program-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.program-card {
  background: var(--bg-main); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1.25rem;
  transition: all var(--transition);
}
.program-card:hover { box-shadow: var(--shadow-md); border-color: var(--purple-light); }
.program-card-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.program-card-icon { font-size: 1.8rem; }
.program-card-name { font-weight: 700; font-size: 1rem; }
.program-card-category {
  font-size: .72rem; font-weight: 600; padding: .15rem .5rem;
  border-radius: 10px; text-transform: uppercase;
}
.cat-scooped { background: var(--purple-pale); color: var(--purple-primary); }
.cat-soft { background: var(--pink-soft); color: var(--berry); }
.program-card-desc { font-size: .85rem; color: var(--text-secondary); margin-bottom: .5rem; }
.program-card-detail { font-size: .8rem; color: var(--text-muted); }

.guide-step {
  display: flex; gap: 1rem; margin-bottom: 1.5rem;
}
.guide-step-number {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
  color: #fff; font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.guide-step-content h4 { margin-bottom: .25rem; }
.guide-step-content p { font-size: .9rem; }

.troubleshoot-item {
  background: var(--bg-main); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem; margin-bottom: .75rem;
}
.troubleshoot-item h4 { color: var(--berry); margin-bottom: .3rem; }
.troubleshoot-item p { font-size: .88rem; }

.tip-box {
  padding: 1rem; border-radius: var(--radius-sm);
  background: var(--mint-pale); border-left: 4px solid var(--mint-primary);
  margin-bottom: .75rem;
}
.tip-box strong { color: var(--mint-primary); }
[data-theme="dark"] .tip-box strong { color: var(--mint-primary); }

/* ===== FAVORITES ===== */
.fav-card {
  position: relative;
}
.fav-badge {
  position: absolute; top: .5rem; right: .5rem;
  background: var(--mango); color: #000; font-size: .7rem; font-weight: 700;
  padding: .15rem .5rem; border-radius: 12px;
}

/* ===== FOOTER ===== */
.app-footer {
  text-align: center; padding: 2rem 1.5rem;
  color: var(--text-secondary); font-size: .85rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.footer-small { font-size: .75rem; color: var(--text-muted); margin-top: .25rem; }

/* ===== UTILITY ===== */
.hidden { display: none !important; }
.spinner {
  display: inline-block; width: 24px; height: 24px;
  border: 3px solid var(--purple-pale); border-top-color: var(--purple-primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  .container { padding: 1rem .75rem; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.35rem; }
  .logo-title { font-size: 1.3rem; }
  .logo-subtitle { font-size: .72rem; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .filter-group { gap: .2rem; }
  .filter-btn, .filter-chip { font-size: .75rem; padding: .3rem .55rem; }
  .tab-btn { font-size: .78rem; padding: .65rem .7rem; }
  .mixmatch-container { flex-direction: column; }
  .mixmatch-arrow { transform: rotate(90deg); padding: .25rem 0; }
  .sort-select { max-width: 100%; }
  .detail-header { padding: 1.5rem 1rem .75rem; }
  .detail-body { padding: 1rem; }
}

@media (max-width: 480px) {
  .hero-emoji { font-size: 2.5rem; }
  .dashboard-hero { padding: 1.5rem 1rem; }
  .stat-number { font-size: 1.6rem; }
  .recipe-grid { grid-template-columns: 1fr; }
  .modal { padding: 1rem .5rem; }
  .detail-info-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   RECEPT BOUWER — Wizard Styles
   ============================================================ */

.builder-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  padding: 1.5rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex-wrap: nowrap;
  overflow-x: auto;
}
.builder-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  flex-shrink: 0;
  transition: all var(--transition);
  opacity: .4;
}
.builder-step-dot.active { opacity: 1; }
.builder-step-dot.done { opacity: .7; }
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.builder-step-dot.active .step-num {
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
  color: #fff;
  box-shadow: 0 4px 12px rgba(123, 44, 191, .3);
}
.builder-step-dot.done .step-num {
  background: var(--mint-primary);
  color: #fff;
}
.step-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.builder-step-dot.active .step-label { color: var(--purple-primary); }
.builder-step-line {
  flex: 1;
  min-width: 20px;
  max-width: 60px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
}

.builder-container { min-height: 350px; }
.builder-page { display: none; animation: builderFadeIn .35s ease; }
.builder-page.active { display: block; }
@keyframes builderFadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: none; }
}
.builder-page h3 { text-align: center; margin-bottom: 1.5rem; }

.builder-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}
.builder-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem .75rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.builder-card:hover {
  border-color: var(--purple-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.builder-card.selected {
  border-color: var(--purple-primary);
  background: var(--purple-pale);
  box-shadow: 0 4px 16px rgba(123, 44, 191, .2);
}
.builder-card.selected::after {
  content: '✓';
  position: absolute;
  top: .4rem;
  right: .5rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--purple-primary);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.builder-card-emoji { font-size: 2.5rem; margin-bottom: .5rem; }
.builder-card-name { font-weight: 700; font-size: .95rem; margin-bottom: .2rem; }
.builder-card-desc { font-size: .78rem; color: var(--text-secondary); }

.builder-card-small { padding: .85rem .5rem; }
.builder-card-small .builder-card-emoji { font-size: 1.8rem; }

.builder-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.builder-selections {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: center;
  min-height: 32px;
}
.builder-tag {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 20px;
  background: var(--purple-pale);
  color: var(--purple-primary);
  font-size: .78rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 700px) {
  .builder-card-grid { grid-template-columns: repeat(2, 1fr); }
  .builder-step-line { min-width: 10px; }
  .step-label { font-size: .68rem; }
}
@media (max-width: 480px) {
  .builder-card-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
  .builder-card { padding: .85rem .4rem; }
  .builder-card-emoji { font-size: 1.8rem; }
  .builder-card-name { font-size: .82rem; }
  .builder-card-desc { display: none; }
}
