/* ==========================================================================
   Daily Kitchen - Mobile App Styled Web Design System
   Exact Flutter App Theme from Screenshots:
   Coral Red #FF5E62 | Teal #4ECDC4 | Surface #FFFFFF | Bg #F7F9F9
   ========================================================================== */

:root {
  --primary: #FF5E62;
  --primary-dark: #FA5252;
  --primary-light: #FFF0F0;
  --primary-container: #FFE5E5;
  
  --secondary: #4ECDC4;
  --secondary-dark: #20BF6B;
  --secondary-light: #E8F8F7;
  
  --veg-color: #2ED573;
  --nonveg-color: #FF4757;

  --bg: #F7F9F9;
  --surface: #FFFFFF;
  --surface-alt: #F1F4F5;
  --border: #E8ECEE;
  --border-light: #F0F3F4;

  --text: #2D3436;
  --text-muted: #636E72;
  --text-light: #A4B0BE;

  --shadow-card: 0 4px 14px rgba(45, 52, 54, 0.06);
  --shadow-float: 0 10px 26px rgba(255, 94, 98, 0.38);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --max-width: 680px; /* Mobile app container width for authentic mobile feel */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', -apple-system, sans-serif;
  font-weight: 700;
  color: var(--text);
}

/* App Container Wrapper (Centers on Desktop, 100% on Mobile) */
.app-frame {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 90px; /* Space for Bottom Nav Bar */
}

/* Top App Bar */
.top-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.top-bar-action {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  color: var(--text);
}

/* Tab Screens Management */
.tab-screen {
  display: none;
  padding: 12px 18px 24px;
}

.tab-screen.active {
  display: block;
  animation: fadeIn 0.22s ease-in-out;
}

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

/* ==========================================================================
   HOME SCREEN (Screenshots 1, 3, 4)
   ========================================================================== */
.greeting-section {
  margin-bottom: 20px;
}

.greeting-headline {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.greeting-subtext {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 4px;
}

.section-heading {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 24px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Today's Meals Cards (Screenshot 1, 3, 4) */
.today-meals-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.today-meal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}

.today-meal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.today-meal-thumb {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-alt);
}

.today-meal-info {
  flex: 1;
  min-width: 0;
}

.today-meal-type {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.today-meal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.today-meal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Veg / Non-Veg Indian Standard Indicator */
.veg-badge-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--veg-color);
  border-radius: 3px;
  padding: 1px;
}

.veg-badge-box .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--veg-color);
}

.veg-badge-box.nonveg {
  border-color: var(--nonveg-color);
}

.veg-badge-box.nonveg .dot {
  background: var(--nonveg-color);
}

.chevron-arrow {
  color: #B2BEC3;
  font-size: 18px;
  font-weight: 700;
}

/* Quick Categories Strip (Screenshot 1, 3, 4) */
.quick-categories-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.quick-categories-scroll::-webkit-scrollbar {
  display: none;
}

.cat-solid-btn {
  background: var(--primary);
  color: #FFFFFF;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  border: none;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(255, 94, 98, 0.25);
}

.cat-solid-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(255, 94, 98, 0.35);
}

.cat-solid-btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

/* 2-Column Recipe Grid (Screenshot 1 & 3) */
.recipe-two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.app-recipe-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.app-recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09);
}

.app-card-img-wrap {
  width: 100%;
  height: 140px;
  background: var(--surface-alt);
  position: relative;
}

.app-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-card-body {
  padding: 12px 14px 14px;
}

.app-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.app-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   SMART MEAL PLANNER SCREEN (Screenshot 2)
   ========================================================================== */
.planner-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.week-range-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 16px;
}

.week-arrow-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 10px;
}

.week-range-text {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
}

/* Day Selector Strip (Screenshot 2: Mon, Tue, Wed, Thu, Fri, ✓ Sat) */
.planner-days-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 18px;
  scrollbar-width: none;
}

.planner-days-scroll::-webkit-scrollbar { display: none; }

.day-tab-btn {
  flex: 1;
  min-width: 60px;
  padding: 10px 4px;
  border-radius: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.day-tab-btn.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.35);
}

/* Progress Box (Screenshot 2) */
.day-progress-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
}

.progress-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.progress-day-title {
  font-size: 16px;
  font-weight: 700;
}

.progress-percent-lbl {
  font-size: 16px;
  font-weight: 800;
}

.progress-bar-line {
  width: 100%;
  height: 4px;
  background: #E0E0E0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill-line {
  height: 100%;
  background: var(--secondary);
  transition: width 0.3s ease;
}

.progress-completed-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* Meal Row Card (Screenshot 2) */
.planner-meal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
}

.meal-box-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.meal-box-type-lbl {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.meal-box-dish-title {
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.meal-box-dish-title:hover {
  color: var(--primary);
}

.meal-box-meta-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.meal-check-box {
  width: 22px;
  height: 22px;
  accent-color: var(--secondary);
  cursor: pointer;
}

.meal-card-divider {
  height: 1px;
  background: var(--border-light);
  margin: 12px 0 10px;
}

.meal-box-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.servings-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.step-circle-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.step-circle-btn:hover {
  background: var(--surface-alt);
}

.three-dots-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

/* Floating Action Button (Screenshot 1, 3, 4: 🎲 What to cook?) */
.floating-what-to-cook {
  position: fixed;
  bottom: 86px;
  right: max(20px, calc(50% - (var(--max-width) / 2) + 20px));
  background: var(--primary);
  color: #FFFFFF;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-float);
  z-index: 80;
  transition: var(--transition);
}

.floating-what-to-cook:hover {
  transform: translateY(-3px) scale(1.03);
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR (Exact Screenshots 1, 2, 3, 4)
   ========================================================================== */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 74px;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 90;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  user-select: none;
}

.nav-icon-pill {
  width: 54px;
  height: 28px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: var(--transition);
}

.nav-tab-item.active {
  color: var(--text);
  font-weight: 800;
}

.nav-tab-item.active .nav-icon-pill {
  background: var(--secondary);
  color: #000000;
}

/* ==========================================================================
   READABLE RECIPE & BLOG POST VIEW (User Issue 3 Fix)
   ========================================================================== */
.recipe-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.recipe-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.recipe-modal-sheet {
  background: #FFFFFF;
  width: 100%;
  max-width: var(--max-width);
  max-height: 94vh;
  border-radius: 28px 28px 0 0;
  overflow-y: auto;
  position: relative;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: 40px;
}

.recipe-modal-backdrop.active .recipe-modal-sheet {
  transform: translateY(0);
}

.modal-header-hero {
  position: relative;
  width: 100%;
  height: 260px;
}

.modal-header-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-close-round {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 10;
}

.modal-content-pad {
  padding: 20px 22px;
}

/* Quick Translate Bar */
.translate-quick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  padding: 8px 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.translate-quick-row::-webkit-scrollbar { display: none; }

.lang-chip-btn {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
}

.lang-chip-btn:hover, .lang-chip-btn.active {
  background: var(--primary);
  color: #fff;
}

/* Big Add to Planner Button */
.btn-add-planner-big {
  width: 100%;
  background: var(--primary);
  color: #FFFFFF;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  padding: 14px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-float);
  margin-bottom: 20px;
  transition: var(--transition);
}

.btn-add-planner-big:hover {
  transform: translateY(-2px);
}

/* Metrics Row */
.recipe-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--surface-alt);
  padding: 12px;
  border-radius: 14px;
  text-align: center;
  margin-bottom: 20px;
}

.metric-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

.metric-lbl {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

/* YouTube Button */
.youtube-action-card {
  background: #FFF0F0;
  border: 1px solid #FFCDD2;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  margin-bottom: 20px;
  cursor: pointer;
}

/* Ingredients Checklist ("Ek Ladi") */
.ingredient-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface-alt);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

/* Chef Tips Card */
.chef-tips-box {
  background: #FFF9E6;
  border: 1px solid #FFE082;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

/* ⭐ SUPER CLEAN, READABLE BLOG POST SECTION (Issue 3 Fix) */
.blog-post-article {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid var(--border);
}

.blog-post-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-post-image {
  width: 100%;
  height: 220px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.blog-post-body {
  font-size: 16px;
  line-height: 1.8;
  color: #2D3436;
  letter-spacing: 0.15px;
}

.blog-post-body p {
  margin-bottom: 16px;
}

.blog-post-body h3, .blog-post-body h4 {
  margin: 18px 0 8px;
  color: var(--text);
}

.blog-post-body ul, .blog-post-body ol {
  margin-left: 20px;
  margin-bottom: 16px;
}

.blog-post-body li {
  margin-bottom: 6px;
}

/* SnackBar Toast (Flutter replica) */
.app-snackbar-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: #2D3436;
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  z-index: 300;
  opacity: 0;
  transition: all 0.25s ease;
  white-space: nowrap;
  max-width: 90%;
}

.app-snackbar-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.snackbar-action-link {
  color: var(--secondary);
  font-weight: 800;
  cursor: pointer;
  background: transparent;
  border: none;
  text-transform: uppercase;
}

/* Vegetable Chips */
.veg-chip {
  background: var(--surface-alt);
  color: var(--text);
  border: 1.5px solid var(--border-light);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Outfit', sans-serif;
}

.veg-chip.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Responsive tweaks */
.top-share-btn {
  background: #FFF0ED;
  color: var(--primary);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(255, 90, 54, 0.15);
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.top-share-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
  transform: scale(1.08);
}

.top-share-btn:active {
  transform: scale(0.95);
}

@media (min-width: 700px) {
  body {
    padding: 20px 0;
  }
  .app-frame {
    border-radius: 28px;
    overflow: hidden;
  }
  .bottom-nav-bar {
    border-radius: 0 0 28px 28px;
  }
}
