/**
 * RECIPE-SAY Master Design System & Core Stylesheet
 * Inspired by modern food-tech dashboard aesthetics:
 * Vibrant purple outer canvas, rounded floating application window,
 * white rounded cards, pill navigation, smooth horizontal scroll decks.
 */

:root {
  /* Brand Palette */
  --bg-outer: #5844E1;
  --bg-outer-glow: #6C55F9;
  --bg-app: #F4F5F9;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  
  --primary: #6344E7;
  --primary-hover: #5031D4;
  --primary-light: #F0EDFF;
  --primary-border: #E0D9FD;
  
  --accent-amber: #FFA502;
  --accent-amber-light: #FEF3C7;
  --accent-green: #10B981;
  --accent-green-light: #D1FAE5;
  --accent-coral: #FF4757;
  --accent-coral-light: #FFE8EC;

  /* Typography Colors */
  --text-main: #18192A;
  --text-heading: #11142D;
  --text-muted: #7E8497;
  --text-light: #A0A5B9;
  
  /* Borders & Shadows */
  --border-light: #EAEAEE;
  --border-subtle: #F0F1F5;
  --radius-outer: 32px;
  --radius-card: 22px;
  --radius-inner: 16px;
  --radius-pill: 9999px;
  
  --shadow-window: 0 30px 80px -15px rgba(22, 10, 58, 0.45);
  --shadow-card: 0 4px 20px -2px rgba(26, 32, 53, 0.05);
  --shadow-card-hover: 0 16px 36px -6px rgba(99, 68, 231, 0.14);
  --shadow-pill: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg-outer);
  background-image: radial-gradient(circle at 10% 20%, rgba(130, 95, 255, 0.4) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(88, 68, 225, 0.5) 0%, transparent 45%);
  color: var(--text-main);
  min-height: 100vh;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-font-smoothing: antialiased;
}

/* Outer Application Container (The Mac / Dashboard Window) */
.app-window {
  width: 100%;
  max-width: 1480px;
  background: var(--bg-app);
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-window);
  /* Removed overflow: hidden so position: sticky on .app-sidebar works during scrolling */
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin: 0 auto;
}

/* Chrome / Browser Header Bar */
.window-chrome {
  background: #EBECEF;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-top-left-radius: var(--radius-outer);
  border-top-right-radius: var(--radius-outer);
  user-select: none;
}

.chrome-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 120px;
}

.chrome-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.chrome-dot.red { background: #FF5F56; border: 1px solid #E0443E; }
.chrome-dot.yellow { background: #FFBD2E; border: 1px solid #DEA123; }
.chrome-dot.green { background: #27C93F; border: 1px solid #1AAB29; }

.chrome-address-bar {
  background: #FFFFFF;
  border-radius: var(--radius-pill);
  padding: 6px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #555A6E;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  width: 320px;
  justify-content: center;
}
.chrome-address-bar svg {
  color: #10B981;
}

.chrome-actions {
  width: 120px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  color: #8C91A4;
}

/* Main Application Header */
.app-header {
  background: #FFFFFF;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo img {
  height: 44px;
  width: auto;
}

/* Navigation Pills */
.nav-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-pill-btn {
  background: #F4F5F8;
  border: 1px solid transparent;
  color: #4B5565;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-pill-btn:hover {
  background: #EAECEF;
  color: #11142D;
  transform: translateY(-1px);
}

.nav-pill-btn.active {
  background: #11142D;
  color: #FFFFFF;
}

.pill-badge {
  background: var(--primary);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.4;
}

.pill-badge.active-badge {
  background: #FFA502;
  color: #111;
}

/* Header Right Actions */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  background: #F4F5F8;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4B5565;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: #E8EAEE;
  color: var(--primary);
  transform: scale(1.05);
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  background: var(--accent-coral);
  border-radius: 50%;
  border: 2px solid #FFFFFF;
}

.favorites-pill {
  background: #FFF0F2;
  color: var(--accent-coral);
  border: 1px solid #FFE0E5;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.favorites-pill:hover {
  background: #FFE4E8;
  transform: translateY(-1px);
}

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F8F9FA;
  border: 1px solid var(--border-light);
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
}

.mobile-menu-toggle {
  display: none;
}

/* ========================================================
   MAIN APPLICATION WORKSPACE (Sidebar + Content)
   ======================================================== */
.app-body {
  display: flex;
  padding: 24px;
  gap: 24px;
  align-items: flex-start;
  min-height: calc(100vh - 140px);
}

/* ==================== LEFT SIDEBAR ==================== */
.app-sidebar {
  width: 270px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 4px 20px -2px rgba(26, 32, 53, 0.08);
  border: 1px solid var(--border-subtle);
  position: -webkit-sticky;
  position: sticky;
  top: 86px;
  align-self: flex-start;
  max-height: calc(100vh - 105px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #E2E4E9 transparent;
  z-index: 40;
}

/* Sidebar Search */
.sidebar-search-box {
  background: #F4F5F8;
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: all 0.2s;
  margin-bottom: 20px;
}

.sidebar-search-box:focus-within {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 68, 231, 0.15);
}

.sidebar-search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  width: 100%;
  color: var(--text-main);
  font-weight: 500;
}

.sidebar-search-box input::placeholder {
  color: var(--text-muted);
}

.sidebar-search-filter-icon {
  color: var(--text-muted);
  cursor: pointer;
}

/* Sidebar Groups & Accordions */
.sidebar-group {
  margin-bottom: 22px;
}

.sidebar-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  font-size: 13.5px;
  font-weight: 700;
  color: #4B5565;
  padding: 8px 4px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.sidebar-group-header .header-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-group-header svg {
  transition: transform 0.2s ease;
}

.sidebar-group-header.collapsed svg {
  transform: rotate(-90deg);
}

/* Highlighted Amber Dietary Pill from Screenshot! */
.dietary-highlight-header {
  background: var(--accent-amber);
  color: #11142D !important;
  border-radius: var(--radius-pill);
  padding: 8px 14px !important;
  box-shadow: 0 4px 12px rgba(255, 165, 2, 0.25);
  margin-bottom: 12px;
}

.dietary-highlight-header .header-title-wrap svg {
  color: #11142D;
}

.sidebar-items-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 6px;
  margin-top: 6px;
}

.sidebar-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: #4B5565;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.sidebar-item-btn:hover {
  background: #F4F5F8;
  color: var(--text-heading);
  transform: translateX(2px);
}

.sidebar-item-btn.active {
  background: #EDE9FE !important;
  color: #6344E7 !important;
  font-weight: 700 !important;
  border-color: rgba(99, 68, 231, 0.2) !important;
  box-shadow: 0 2px 8px rgba(99, 68, 231, 0.12);
}

/* ==================== ACTIVE FILTER BAR & SECTION ==================== */
.active-filter-container {
  display: none;
  flex-direction: column;
  gap: 16px;
  margin-top: 6px;
  animation: fadeInFilter 0.3s ease;
}

.active-filter-container.visible {
  display: flex;
}

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

.active-filter-banner {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(99, 68, 231, 0.08);
  border: 1.5px solid #E0D9FD;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-banner-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-indicator-dot {
  width: 10px;
  height: 10px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  display: inline-block;
}

.filter-type-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #7E8497;
}

.filter-active-pill {
  background: #EDE9FE;
  color: #6344E7;
  font-size: 13.5px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-count-badge {
  font-size: 12px;
  font-weight: 600;
  color: #6B7280;
  background: #F3F4F6;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.clear-filter-btn {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.clear-filter-btn:hover {
  background: #FCA5A5;
  color: #991B1B;
  transform: translateY(-1px);
}

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

.item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-badge {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 7px;
}

.badge-coral {
  background: var(--accent-coral-light);
  color: var(--accent-coral);
}

.badge-amber {
  background: var(--accent-amber-light);
  color: #B45309;
}

.badge-gray {
  background: #E5E7EB;
  color: #4B5565;
}

/* ==================== MAIN CONTENT CANVAS ==================== */
.app-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Top Banner Row (Hero Banner + Optional Quick Receipts Card) */
.hero-row {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 20px;
  align-items: stretch;
}

.hero-banner {
  background: linear-gradient(135deg, #6C48E7 0%, #8E58F4 100%);
  border-radius: 24px;
  padding: 28px 32px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(108, 72, 231, 0.4);
}

.hero-banner::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-left {
  display: flex;
  align-items: center;
  gap: 22px;
  z-index: 2;
  flex: 1;
}

.hero-mascot-wrap {
  width: 115px;
  height: 110px;
  flex-shrink: 0;
  animation: floatMascot 4s ease-in-out infinite;
}

@keyframes floatMascot {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(-2deg); }
}

.hero-text-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-headline {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 13.5px;
  opacity: 0.92;
  line-height: 1.45;
  max-width: 480px;
}

.hero-tags {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.hero-tag {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.hero-right-actions {
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.btn-hero-primary {
  background: #FFFFFF;
  color: var(--primary);
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-hero-primary:hover {
  background: #F8F9FA;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* Right Mini Panel: "Your Receipts / Saved" */
.cookbook-panel {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cookbook-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
}

.cookbook-panel-header a {
  color: var(--primary);
  text-decoration: none;
  font-size: 12px;
}

.cookbook-stats {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 12px 0 6px 0;
}

.cookbook-stats .big-number {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1;
}

.cookbook-stats .stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.cookbook-avatar-stack {
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.mini-recipe-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  object-fit: cover;
  margin-left: -8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.mini-recipe-thumb:first-child { margin-left: 0; }

.cookbook-btn {
  background: #F4F5F8;
  color: #4B5565;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  margin-top: 10px;
  transition: all 0.2s;
}
.cookbook-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ==================== CONTENT SECTIONS ==================== */
.content-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.badge-purple { background: var(--primary-light); color: var(--primary); }
.badge-orange { background: #FFF4E5; color: #E65100; }
.badge-green { background: var(--accent-green-light); color: var(--accent-green); }

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.3px;
}

.section-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scroll-ctrl-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4B5565;
  cursor: pointer;
  transition: all 0.2s;
}

.scroll-ctrl-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.view-all-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.view-all-link:hover {
  text-decoration: underline;
}

/* ==================== RECIPE CARDS DECK ==================== */
.cards-scroll-container {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 10px 4px 20px 4px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #E0E2EC transparent;
  align-items: stretch;
}

/* Recipe Card Component */
.recipe-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
}

.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary-border);
}

/* The Signature Tilted 3D Card Pop from Screenshot! */
.recipe-card.tilted-pop {
  transform: rotate(3deg) translateY(-4px);
  z-index: 5;
  box-shadow: 0 16px 36px -4px rgba(99, 68, 231, 0.2);
  border-color: rgba(99, 68, 231, 0.3);
}

.recipe-card.tilted-pop:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-card-hover);
}

.recipe-card.tilted-left {
  transform: rotate(-2deg) translateY(-2px);
  z-index: 4;
}
.recipe-card.tilted-left:hover {
  transform: rotate(0deg) translateY(-8px);
}

/* Card Image Area */
.card-media-wrap {
  position: relative;
  width: 100%;
  height: 155px;
  border-radius: var(--radius-inner);
  overflow: hidden;
  margin-bottom: 12px;
}

.card-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.recipe-card:hover .card-media-wrap img {
  transform: scale(1.06);
}

.card-badge-new {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent-coral);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4);
}

.card-video-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8E95A5;
  cursor: pointer;
  transition: all 0.2s;
}

.card-favorite-btn:hover, .card-favorite-btn.favorited {
  color: var(--accent-coral);
  background: #FFFFFF;
  transform: scale(1.15);
}

/* Card Body */
.card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-more-btn {
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 2px;
}

.card-description {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Metadata Chips (Bowl | 220kcal | 15min) */
.card-chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.card-chip {
  background: #F4F5F8;
  color: #555E6D;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Card Footer */
.card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.card-difficulty {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
}

.card-difficulty.easy { color: var(--accent-green); }
.card-difficulty.medium { color: var(--accent-amber); }
.card-difficulty.hard { color: var(--accent-coral); }

.card-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8E95A5;
  font-weight: 600;
}

.card-stats span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ==================== POPULAR CATEGORIES GRID ==================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.category-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 16px 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 10px 24px -4px rgba(99, 68, 231, 0.15);
}

.category-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform 0.2s ease;
}

.category-card:hover .category-icon-circle {
  transform: scale(1.1);
}

.category-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-heading);
}

.category-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==================== ADSENSE AD CONTAINER ==================== */
.adsense-placeholder-slot {
  background: #FAFAFC;
  border: 2px dashed #D5D8E2;
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  position: relative;
  margin: 10px 0;
}

.adsense-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #9CA3AF;
  background: #EDEDF2;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.adsense-note {
  font-size: 12.5px;
  color: #717786;
  max-width: 520px;
  line-height: 1.4;
}

/* ==================== BLOG POSTS GRID ==================== */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.blog-card {
  background: #FFFFFF;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary-border);
}

.blog-media-wrap {
  position: relative;
  width: 100%;
  height: 170px;
  overflow: hidden;
}

.blog-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-media-wrap img {
  transform: scale(1.05);
}

.blog-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.blog-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.blog-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.35;
  margin-bottom: 8px;
}

.blog-excerpt {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
}

.blog-read-more {
  margin-top: auto;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

/* ==================== NEWSLETTER SECTION ==================== */
.newsletter-card {
  background: linear-gradient(135deg, #1E1B4B 0%, #2D1A65 100%);
  border-radius: 24px;
  padding: 36px 40px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

.newsletter-text {
  max-width: 520px;
}

.newsletter-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.newsletter-desc {
  font-size: 13.5px;
  opacity: 0.85;
  line-height: 1.5;
}

.newsletter-form {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 6px 8px 6px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 420px;
}

.newsletter-form input {
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-size: 13.5px;
  width: 100%;
}
.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter-form button {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.newsletter-form button:hover {
  background: #7356F1;
  transform: translateY(-1px);
}

/* ==================== ABOUT TRUST BLOCK ==================== */
.about-trust-block {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 32px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.about-trust-content h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 12px;
}

.about-trust-content p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.trust-badges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.trust-badge-item {
  background: #F8F9FD;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.trust-badge-icon {
  font-size: 24px;
}

.trust-badge-item h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.trust-badge-item p {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

/* ==================== FOOTER ==================== */
.app-footer {
  background: #FFFFFF;
  border-top: 1px solid var(--border-light);
  padding: 48px 32px 24px 32px;
  margin-top: 32px;
  border-bottom-left-radius: var(--radius-outer);
  border-bottom-right-radius: var(--radius-outer);
}

.footer-columns-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 320px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  font-size: 13px;
  color: #4B5565;
  text-decoration: none;
  transition: all 0.2s;
}

.footer-col ul li a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-bottom-bar {
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* ==================== MODAL PREVIEW ==================== */
.recipe-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 20, 45, 0.65);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.recipe-modal-backdrop.open {
  display: flex;
}

.recipe-modal {
  background: #FFFFFF;
  border-radius: 28px;
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.modal-media-header {
  position: relative;
  height: 280px;
  width: 100%;
}
.modal-media-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  padding: 28px;
}

.modal-info-chips {
  display: flex;
  gap: 12px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.modal-chip {
  background: #F4F5F8;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
}

.modal-checklist {
  list-style: none;
  margin: 12px 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0;
}

.modal-ingredient-row {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  background: #F8FAFC;
  border: 1px solid #EEF2F6;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-ingredient-row:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
  transform: translateX(3px);
}

.modal-ingredient-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.modal-ingredient-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  margin-left: 10px;
  user-select: none;
}

.ingredient-img-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.modal-ingredient-row:hover .ingredient-img-wrap {
  transform: scale(1.12);
  border-color: var(--primary);
}

.ingredient-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ingredient-text {
  font-size: 13.5px;
  color: #334155;
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.2s, text-decoration 0.2s;
}

.modal-ingredient-row input[type="checkbox"]:not(:checked) ~ .modal-ingredient-label .ingredient-text {
  text-decoration: line-through;
  color: #94A3B8;
}

.modal-ingredient-row input[type="checkbox"]:not(:checked) ~ .modal-ingredient-label .ingredient-img-wrap {
  opacity: 0.45;
  filter: grayscale(80%);
}

.modal-actions-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.btn-print {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 700;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.btn-share {
  background: #F4F5F8;
  color: #374151;
  font-weight: 600;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

/* ==================== YOUTUBE VIDEO BUTTONS & MODAL ==================== */
.card-video-icon-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(17, 20, 45, 0.78);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 3;
}

.card-video-icon-btn .video-btn-mini-thumb {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
}

.card-video-icon-btn:hover {
  background: #FF0000;
  color: #FFFFFF;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.45);
}

.card-video-icon-btn svg {
  color: #FF0000;
  transition: color 0.2s;
}

.card-video-icon-btn:hover svg {
  color: #FFFFFF;
}

.video-chip {
  background: #FFF1F2 !important;
  color: #E11D48 !important;
  cursor: pointer;
  border: 1px solid #FFE4E6;
  transition: all 0.2s;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.video-chip .chip-yt-thumb {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid rgba(225, 29, 72, 0.2);
}

.video-chip:hover {
  background: #FFE4E6 !important;
  color: #BE123C !important;
  transform: translateY(-1px);
}

/* Dedicated Recipe Card Video Portion with YouTube Thumbnail */
.card-video-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 6px 8px;
  margin: 10px 0 6px 0;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-video-strip:hover {
  background: #F5F3FF;
  border-color: #C7D2FE;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(88, 68, 225, 0.12);
}

.card-video-strip-thumb {
  position: relative;
  width: 58px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.card-video-strip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card-video-strip:hover .card-video-strip-thumb img {
  transform: scale(1.12);
}

.card-video-strip-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: rgba(225, 29, 72, 0.92);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  padding-left: 1px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, background 0.2s;
}

.card-video-strip:hover .card-video-strip-play {
  background: #FF0000;
  transform: translate(-50%, -50%) scale(1.15);
}

.card-video-strip-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.card-video-strip-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.card-video-strip-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: #6366F1;
  line-height: 1.2;
  margin-top: 2px;
}

.card-video-strip:hover .card-video-strip-sub {
  color: #4F46E5;
}

.card-video-strip-arrow {
  color: #94A3B8;
  font-size: 14px;
  font-weight: 700;
  margin-right: 2px;
  transition: transform 0.2s;
}

.card-video-strip:hover .card-video-strip-arrow {
  color: #6366F1;
  transform: translateX(2px);
}

.blog-video-link-btn {
  background: #FFF1F2;
  color: #E11D48;
  border: 1px solid #FFE4E6;
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.blog-video-link-btn:hover {
  background: #FF0000;
  color: #FFFFFF;
  border-color: #FF0000;
  transform: translateY(-1px);
}

.blog-video-link-btn:hover svg {
  fill: #FFFFFF !important;
}

/* Video Modal */
.video-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 12, 28, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.video-modal-backdrop.open {
  display: flex;
}

.video-modal-card {
  background: #11142D;
  color: #FFFFFF;
  border-radius: 24px;
  max-width: 820px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.video-modal-header {
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.video-iframe-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  background: #000000;
}

.video-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-modal-footer {
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #181B38;
}

.btn-open-youtube {
  color: #FFFFFF;
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid rgba(255, 0, 0, 0.4);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-open-youtube:hover {
  background: #FF0000;
  color: #FFFFFF;
}

/* Modal Recipe Video Stage (Image Poster + Play Overlay) */
.modal-video-stage {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.modal-video-stage:hover {
  box-shadow: 0 12px 32px rgba(88, 68, 225, 0.35);
  border-color: rgba(165, 180, 252, 0.4);
}

.modal-video-stage .modal-video-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  filter: brightness(0.82);
}

.modal-video-stage:hover .modal-video-poster {
  transform: scale(1.05);
  filter: brightness(0.92);
}

.modal-play-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #FF0000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.75), 0 6px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.modal-video-stage:hover .modal-play-circle {
  transform: scale(1.16);
  box-shadow: 0 0 45px rgba(255, 0, 0, 0.95), 0 8px 25px rgba(0, 0, 0, 0.6);
}

.modal-play-action-text {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: background 0.2s, transform 0.2s;
}

.modal-video-stage:hover .modal-play-action-text {
  background: #5844E1;
  border-color: #5844E1;
  transform: translateY(-2px);
}

