/* ==========================================================================
   MyMenuBuddy — Telegram Family Food AI Stylesheet
   Modern, Dark Mode, Glassmorphic, Rich Culinary & Telegram Theme
   ========================================================================== */

:root {
  --bg-main: #0b0f19;
  --bg-surface: #111827;
  --bg-card: rgba(17, 24, 39, 0.78);
  --bg-card-hover: rgba(30, 41, 59, 0.88);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(34, 158, 217, 0.4);
  
  --tg-blue: #229ED9;
  --tg-blue-hover: #1b86ba;
  --tg-bubble-user: #2b5278;
  --tg-bubble-bot: #182533;
  --tg-chat-bg: #0e1621;
  --tg-btn-bg: #2b5278;
  --tg-btn-hover: #366596;

  --accent-saffron: #f97316;
  --accent-amber: #f59e0b;
  --accent-green: #10b981;
  --accent-red: #ef4444;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(34, 158, 217, 0.25);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(34, 158, 217, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(249, 115, 22, 0.06) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Utility Layout */
.container {
  max-width: 1720px;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 40px);
}

.section {
  padding: 48px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 840px;
  margin: 0 auto 36px auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: rgba(34, 158, 217, 0.12);
  border: 1px solid rgba(34, 158, 217, 0.3);
  color: var(--tg-blue);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 3.2vw, 2.6rem);
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--tg-blue), #0077b5);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(34, 158, 217, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 158, 217, 0.5);
}

.btn-saffron {
  background: linear-gradient(135deg, var(--accent-saffron), #ea580c);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.35);
}

.btn-saffron:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: rgba(11, 15, 25, 0.88);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--tg-blue), var(--accent-saffron));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(34, 158, 217, 0.3);
}

.brand-text h1 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  padding: 3px;
  border: 1px solid var(--border-subtle);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--tg-blue);
  color: #fff;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 36px 0 28px 0;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  background: rgba(34, 158, 217, 0.1);
  border: 1px solid rgba(34, 158, 217, 0.35);
  color: var(--tg-blue);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 1100px;
  margin: 0 auto 16px auto;
  line-height: 1.15;
}

.hero-title span {
  background: linear-gradient(135deg, #f97316, #fbbf24, #229ED9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--text-muted);
  max-width: 840px;
  margin: 0 auto 28px auto;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 158, 217, 0.3);
  box-shadow: var(--shadow-card);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Telegram Simulator Section
   ========================================================================== */
.simulator-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.tg-app-window {
  display: flex;
  flex-direction: column;
  height: 640px;
  background: var(--tg-chat-bg);
  position: relative;
}

.tg-window-header {
  height: 64px;
  background: #17212b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.tg-bot-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tg-bot-avatar-main {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-saffron), var(--tg-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.tg-bot-info h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.tg-bot-status {
  font-size: 0.78rem;
  color: #4fae4e;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tg-bot-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4fae4e;
}

.tg-header-badge {
  font-size: 0.75rem;
  background: rgba(34, 158, 217, 0.2);
  color: var(--tg-blue);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Chat Messages Stream */
.tg-messages-stream {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
}

.tg-msg {
  display: flex;
  gap: 10px;
  max-width: 82%;
  animation: fadeInMsg 0.2s ease-out;
}

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

.tg-msg-bot {
  align-self: flex-start;
}

.tg-msg-user {
  align-self: flex-end;
  justify-content: flex-end;
}

.tg-bot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-saffron);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 4px;
}

.tg-bot-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tg-msg-bubble {
  padding: 12px 16px;
  border-radius: 14px;
  position: relative;
  font-size: 0.93rem;
  line-height: 1.5;
}

.tg-msg-bot .tg-msg-bubble {
  background: var(--tg-bubble-bot);
  color: #fff;
  border-top-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.tg-msg-user .tg-msg-bubble {
  background: var(--tg-bubble-user);
  color: #fff;
  border-top-right-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.tg-msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

.tg-check {
  color: #4fae4e;
}

/* Telegram Inline Keyboards */
.tg-keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.tg-keyboard-row {
  display: flex;
  gap: 6px;
}

.tg-btn {
  flex: 1;
  background: var(--tg-btn-bg);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tg-btn:hover {
  background: var(--tg-btn-hover);
}

.tg-btn.pressed {
  opacity: 0.6;
}

/* Typing Indicator */
.tg-typing {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--tg-bubble-bot);
  border-radius: 12px;
  width: fit-content;
  margin-left: 42px;
  margin-bottom: 8px;
}

.tg-typing span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1s infinite;
}

.tg-typing span:nth-child(2) { animation-delay: 0.2s; }
.tg-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
}

/* Quick Commands Bar */
.tg-quick-bar {
  padding: 8px 16px;
  background: #17212b;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
}

.tg-quick-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.tg-quick-chip:hover {
  background: rgba(34, 158, 217, 0.2);
  color: var(--tg-blue);
  border-color: rgba(34, 158, 217, 0.4);
}

/* Chat Input Bar */
.tg-input-bar {
  padding: 12px 16px;
  background: #17212b;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tg-input-field {
  flex: 1;
  background: #242f3d;
  border: 1px solid transparent;
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
}

.tg-input-field:focus {
  border-color: var(--tg-blue);
}

.tg-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--tg-blue);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.tg-send-btn:hover {
  background: var(--tg-blue-hover);
  transform: scale(1.05);
}

/* Simulator Sidebar Guide */
.simulator-sidebar {
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: space-between;
  min-width: 0;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

.sim-guide-block h4 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.sim-guide-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sim-guide-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  overflow-wrap: break-word;
}

.sim-guide-list code {
  color: var(--tg-blue);
  background: rgba(34, 158, 217, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.sim-bot-qr-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  min-width: 0;
}

.sim-bot-qr-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.sim-bot-qr-box .btn {
  white-space: normal;
  line-height: 1.3;
  padding: 10px 14px;
}

/* ==========================================================================
   Recipe Explorer Section
   ========================================================================== */
.recipe-controls {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recipe-search-bar {
  position: relative;
  max-width: 600px;
}

.recipe-search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.recipe-search-input:focus {
  border-color: var(--tg-blue);
  box-shadow: 0 0 15px rgba(34, 158, 217, 0.2);
}

.search-icon-svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.filter-pill.active {
  background: var(--tg-blue);
  border-color: var(--tg-blue);
  color: #fff;
}

.region-dropdown {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  outline: none;
  font-size: 0.88rem;
  cursor: pointer;
}

/* Recipes Grid */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.recipe-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.recipe-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 158, 217, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(34, 158, 217, 0.15);
}

/* Front Recipe Card Media & Visuals */
.recipe-card-media {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  cursor: pointer;
  background: #1a2234;
}

.recipe-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.recipe-card:hover .recipe-card-img {
  transform: scale(1.08);
}

.recipe-media-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 25, 0.1) 0%, rgba(11, 15, 25, 0.75) 100%);
  pointer-events: none;
}

.recipe-media-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 2;
}

.recipe-media-cuisine {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--tg-blue);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  z-index: 2;
}

.recipe-card-header,
.recipe-card-body,
.recipe-card-footer {
  padding: 0 20px;
}

.recipe-card-header {
  padding-top: 18px;
}

.recipe-card-footer {
  padding-top: 14px;
  padding-bottom: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.card-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-veg {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.diet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
}

.badge-nonveg {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-timing {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-cuisine {
  background: rgba(34, 158, 217, 0.15);
  color: var(--tg-blue);
  border: 1px solid rgba(34, 158, 217, 0.3);
}

.recipe-card-title {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.recipe-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ing-preview {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 16px;
  font-size: 0.8rem;
}

.ing-label {
  color: var(--text-dim);
  display: block;
  margin-bottom: 4px;
}

.ing-tags {
  color: var(--text-muted);
}

.card-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.recipe-card-footer {
  display: flex;
  gap: 8px;
}

.recipe-card-footer .btn-primary {
  flex: 1;
}

/* ==========================================================================
   Recipe Modal (Portion Scaler & Masterclass)
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-header-text h3 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Dynamic Portion Selector */
.modal-portion-box {
  background: rgba(34, 158, 217, 0.06);
  border: 1px solid rgba(34, 158, 217, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.portion-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tg-blue);
  margin-bottom: 10px;
}

.portion-btn-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.portion-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.portion-btn.active {
  background: var(--tg-blue);
  border-color: var(--tg-blue);
  color: #fff;
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.modal-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 14px;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.modal-tab-btn.active {
  color: #fff;
}

.modal-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--tg-blue);
}

.modal-dish-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

.modal-dish-card h4 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  color: var(--accent-amber);
}

.modal-two-col {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

.modal-ing-column h5, .modal-steps-column h5 {
  font-size: 0.88rem;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.modal-ing-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
}

.modal-ing-list li b {
  color: var(--tg-blue);
}

.modal-quick-steps {
  padding-left: 18px;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-main);
}

/* Masterclass Mode Checklist */
.guided-header-banner {
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.guided-steps-interactive {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guided-step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  transition: var(--transition);
}

.guided-step-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.step-checkbox {
  display: none;
}

.step-custom-box {
  width: 22px;
  height: 22px;
  border: 2px solid var(--text-dim);
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.step-checkbox:checked + .step-custom-box {
  background: var(--accent-green);
  border-color: var(--accent-green);
}

.step-checkbox:checked + .step-custom-box::after {
  content: '✓';
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.step-checkbox:checked ~ .step-text-wrap .step-instruction {
  text-decoration: line-through;
  opacity: 0.5;
}

.step-index {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-amber);
  text-transform: uppercase;
}

.step-instruction {
  font-size: 0.92rem;
  color: var(--text-main);
  margin-top: 2px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
}

.modal-timer-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-digits {
  font-family: monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-amber);
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Smart Pantry Chef Section
   ========================================================================== */
.pantry-card-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.pantry-input-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.pantry-text-input {
  flex: 1;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}

.pantry-suggestions {
  margin-bottom: 24px;
}

.pantry-suggestions-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pantry-chips-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
  padding: 4px;
}

.pantry-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.pantry-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pantry-chip.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

/* User Selected Inventory Box */
.user-pantry-box {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 32px;
}

.user-pantry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.user-pantry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-pantry-pill {
  background: rgba(34, 158, 217, 0.15);
  border: 1px solid rgba(34, 158, 217, 0.3);
  color: #fff;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.remove-pantry-item {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.remove-pantry-item:hover {
  color: #fff;
}

/* Pantry Matching Results */
.pantry-results-heading {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.pantry-matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.pantry-match-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.match-score-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.match-high {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.match-med {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.match-low {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.missing-box {
  font-size: 0.78rem;
  margin-top: 6px;
}

.ready-badge {
  color: #34d399;
  font-weight: 600;
}

.missing-items {
  color: #f87171;
}

/* ==========================================================================
   Weekly Meal Planner Section
   ========================================================================== */
/* Weekly Planner Dropdown Controls & Responsive Filter Bar */
.planner-controls-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  flex-wrap: wrap;
}

.planner-dropdown-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  flex-wrap: wrap;
}

.planner-dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 220px;
}

.planner-dropdown-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.planner-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.planner-select:focus,
.planner-select:hover {
  border-color: var(--accent-saffron);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.2);
}

.planner-select option {
  background: #18222d;
  color: #fff;
}

.planner-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

/* Combination Meal Breakdown Chips */
.recipe-combo-row {
  margin: 10px 0 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.combo-row-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-saffron);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.combo-row-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.combo-dish-chip {
  background: rgba(255, 107, 0, 0.1);
  border: 1px solid rgba(255, 107, 0, 0.25);
  color: #ff9d42;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.combo-dish-chip:hover {
  background: rgba(255, 107, 0, 0.2);
  border-color: rgba(255, 107, 0, 0.5);
  color: #fff;
}

/* Modal Combo Breakdown */
.modal-combo-pills-row {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-combo-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-saffron);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-combo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-combo-chip {
  background: rgba(34, 158, 217, 0.15);
  border: 1px solid rgba(34, 158, 217, 0.35);
  color: #64b5f6;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Pantry Combo Row */
.pantry-combo-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  margin: 4px 0 8px 0;
  color: var(--text-muted);
}

.pantry-combo-label {
  font-weight: 700;
  color: var(--accent-saffron);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.pantry-combo-dishes {
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 500;
}

.weekly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

@media (min-width: 1400px) {
  .weekly-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

.weekly-day-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.weekly-day-header {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.weekly-day-header h4 {
  font-size: 1rem;
}

.weekly-day-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meal-slot {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.slot-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.slot-b { color: #f59e0b; }
.slot-l { color: #3b82f6; }
.slot-s { color: #10b981; }
.slot-d { color: #8b5cf6; }

.slot-dish {
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.3;
}

/* ==========================================================================
   Bot Architecture & Setup Guide Section
   ========================================================================== */
.setup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.setup-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setup-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tg-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.code-snippet {
  background: #090d16;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: monospace;
  font-size: 0.8rem;
  color: #38bdf8;
  overflow-x: auto;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px 0;
  background: #070a12;
}

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 360px;
  margin-top: 12px;
}

.footer-col h5 {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: #fff;
  letter-spacing: 0.02em;
}

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

.footer-col a {
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.footer-col a:hover {
  color: var(--tg-blue);
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1100px) {
  .simulator-container {
    grid-template-columns: 1fr;
  }
  .simulator-sidebar {
    border-top: 1px solid var(--border-subtle);
  }
  .setup-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .mobile-hamburger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
  }
  .nav-links {
    display: none;
  }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0e1626;
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 20px;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
  .nav-links.mobile-open a {
    display: block;
    padding: 8px 0;
    font-size: 1rem;
    font-weight: 500;
  }
  .nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .nav-settings-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  .portion-btn-group {
    grid-template-columns: repeat(2, 1fr);
  }
  .modal-container {
    width: 95vw;
    max-height: 94vh;
    border-radius: var(--radius-md);
  }
  .modal-hero-banner {
    height: 180px;
  }
  .modal-hero-content h3 {
    font-size: 1.2rem;
  }
  .modal-hero-content {
    padding: 14px;
  }
  .modal-two-col {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .modal-body {
    padding: 16px 14px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .modal-ing-visual-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  /* Weekly Planner Mobile Responsiveness */
  .planner-controls-box {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 14px;
  }
  .planner-dropdown-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 12px;
  }
  .planner-dropdown-item {
    width: 100%;
    min-width: 0;
  }
  .planner-copy-btn {
    width: 100%;
    justify-content: center;
  }
  .weekly-grid {
    grid-template-columns: 1fr;
  }
  /* Settings / Language Drawer Mobile */
  .settings-drawer {
    width: 100vw;
    max-width: 100vw;
  }
  /* Floating Language Button on Mobile */
  .floating-side-settings-btn {
    bottom: 20px;
    right: 20px;
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   1. Fullscreen Chat with Chef
   ========================================================================== */
.tg-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tg-lang-indicator {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.tg-fs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 158, 217, 0.15);
  border: 1px solid rgba(34, 158, 217, 0.35);
  color: var(--tg-blue);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.tg-fs-btn:hover {
  background: var(--tg-blue);
  color: #fff;
  box-shadow: 0 0 16px rgba(34, 158, 217, 0.4);
  transform: translateY(-1px);
}

.tg-fs-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.tg-fs-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.5);
}

/* Fullscreen Window Active Mode */
.tg-app-window.fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  border-radius: 0;
  box-shadow: none;
  background: #0e1621;
  display: flex;
  flex-direction: column;
  animation: fsFadeIn 0.25s ease-out;
}

@keyframes fsFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.tg-app-window.fullscreen .tg-window-header {
  height: 70px;
  padding: 0 32px;
  background: #17212b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.tg-app-window.fullscreen .tg-messages-stream {
  flex: 1;
  min-height: 0;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 24px;
}

.tg-app-window.fullscreen .tg-quick-bar {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.tg-app-window.fullscreen .tg-input-bar {
  max-width: 900px;
  width: 100%;
  margin: 0 auto 12px auto;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ==========================================================================
   2. Compact Navbar Language Dropdown Menu (Small Dropdown)
   ========================================================================== */
.nav-lang-dropdown-container {
  position: relative;
}

.nav-lang-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.88rem;
  font-weight: 600;
  user-select: none;
}

.nav-lang-dropdown-btn:hover,
.nav-lang-dropdown-btn.active {
  background: rgba(34, 158, 217, 0.15);
  border-color: rgba(34, 158, 217, 0.5);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(34, 158, 217, 0.25);
  transform: translateY(-1px);
}

.nav-lang-globe {
  font-size: 1.05rem;
  line-height: 1;
}

.nav-lang-current {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.nav-lang-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}

.nav-lang-arrow.open {
  transform: rotate(180deg);
  color: var(--tg-blue);
}

/* Dropdown Menu Popup */
.nav-lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 210px;
  background: rgba(17, 24, 39, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(34, 158, 217, 0.15);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.nav-lang-dropdown-header {
  padding: 6px 10px 6px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 3px;
}

.nav-lang-options-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.nav-lang-option:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.nav-lang-option.active {
  background: rgba(34, 158, 217, 0.18);
  border-color: rgba(34, 158, 217, 0.4);
}

.nav-lang-option-flag {
  font-size: 1.2rem;
  line-height: 1;
}

.nav-lang-option-names {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nav-lang-native {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.nav-lang-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.nav-lang-check-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--tg-blue);
  line-height: 1;
}

/* Floating Bottom Language Dropdown */
.floating-lang-dropdown-wrapper {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 998;
}

.floating-side-settings-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(34, 158, 217, 0.35);
  border-radius: var(--radius-full);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(34, 158, 217, 0.25);
  transition: var(--transition);
}

.floating-side-settings-btn:hover,
.floating-side-settings-btn.active {
  transform: translateY(-2px);
  background: #17212b;
  border-color: var(--tg-blue);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(34, 158, 217, 0.45);
}

.floating-gear {
  font-size: 1.15rem;
  line-height: 1;
}

.floating-lang-indicator {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tg-blue);
}

.floating-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  line-height: 1;
}

.floating-arrow.open {
  transform: rotate(180deg);
  color: var(--tg-blue);
}

.floating-lang-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  width: 190px;
  background: rgba(17, 24, 39, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(34, 158, 217, 0.15);
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: dropdownFadeUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.floating-lang-header {
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 3px;
}

.floating-lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.floating-lang-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.floating-lang-item.active {
  background: rgba(34, 158, 217, 0.18);
  border-color: rgba(34, 158, 217, 0.4);
}

/* ==========================================================================
   3. Recipe Modal Hero Banner & Ingredient Visuals
   ========================================================================== */
.modal-hero-banner {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #111827;
}

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

.modal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.2) 0%, rgba(17, 24, 39, 0.95) 100%);
}

.modal-lang-toggle-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 4px 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.modal-lang-icon {
  font-size: 1rem;
  padding-left: 4px;
}

.modal-lang-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.modal-lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.modal-lang-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.modal-lang-btn.active {
  background: var(--tg-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 158, 217, 0.4);
}

@media (max-width: 600px) {
  .modal-lang-toggle-bar {
    top: 12px;
    left: 12px;
    padding: 2px 4px;
  }
  .modal-lang-btn {
    font-size: 0.74rem;
    padding: 3px 8px;
  }
}

.modal-hero-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-hero-close:hover {
  background: rgba(239, 68, 68, 0.7);
  transform: scale(1.1);
}

.modal-hero-content {
  position: absolute;
  bottom: 18px;
  left: 24px;
  right: 24px;
  z-index: 5;
}

.modal-hero-content h3 {
  font-size: 1.7rem;
  color: #fff;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* Visual Ingredient Cards in Modal */
.modal-ing-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.modal-ing-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  transition: var(--transition);
}

.modal-ing-card:hover {
  background: rgba(34, 158, 217, 0.08);
  border-color: rgba(34, 158, 217, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-ing-img-wrap {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  overflow: hidden;
}

.modal-ing-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.modal-ing-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-ing-qty {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-amber);
}

.modal-ing-name {
  font-size: 0.8rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pantry Match Visuals */
.pantry-match-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pantry-card-visual {
  position: relative;
  width: 110px;
  height: 90px;
  min-width: 110px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #17212b;
}

.pantry-match-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pantry-card-visual .match-score-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 0.72rem;
  padding: 2px 8px;
}

/* Admin Portal Navbar Pill */
.nav-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.nav-admin-link:hover {
  background: rgba(16, 185, 129, 0.22);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & HAMBURGER NAVIGATION
   ========================================================================== */
.mobile-hamburger-btn {
  display: none;
}

@media (max-width: 768px) {
  .mobile-hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.25rem;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
  }

  .mobile-hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.16);
  }

  .nav-container {
    position: relative;
  }

  .nav-links {
    display: none;
  }

  .nav-links.mobile-open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0b111a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 0 0 16px 16px;
    padding: 20px 24px;
    gap: 14px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6);
    z-index: 999;
  }

  .nav-links.mobile-open li a {
    font-size: 1.05rem;
    padding: 8px 0;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    text-align: center;
  }

  .hero-actions {
    justify-content: center !important;
  }

  .hero-stats-row {
    justify-content: center !important;
  }

  .recipes-grid {
    grid-template-columns: 1fr !important;
  }

  .filters-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .pill-group {
    overflow-x: auto;
    padding-bottom: 6px;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }

  .pill-group::-webkit-scrollbar {
    height: 4px;
  }

  .pill-group::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
  }

  .community-section > div > div:last-child {
    grid-template-columns: 1fr !important;
  }

  .planner-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  .chat-floating-container {
    width: 95vw !important;
    right: 2.5vw !important;
    bottom: 16px !important;
    height: 80vh !important;
  }
}


