html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #FDE15A;
  color: #222;
  text-align: center;
  padding: 2rem 1rem 6rem;
}

h1, p, .upload-box, .how-it-works, #saveBtn, #installBtn, .bottom-nav {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}
h1 { animation-delay: 0.2s; margin-bottom: 0.6rem; margin-top: 1.5rem; line-height: 0.4rem;}
.upload-box { animation-delay: 0.4s; }
.how-it-works { animation-delay: 0.6s; }
#saveBtn { animation-delay: 0.8s; }
#installBtn { animation-delay: 1s; }
.bottom-nav { animation-delay: 1.2s; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.upload-box,
.how-it-works {
  background: var(--box-bg);
  border-radius: 1rem;
  padding: 1rem;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.upload-box {
  position: relative;
  transition: all 0.3s ease;
}

.upload-box.dragover {
  background: rgba(38, 132, 252, 0.1);
  border-color: var(--btn-bg);
  transform: scale(1.02);
}

.upload-box input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
  background-color: #f9f9f9;
  transition: all 0.3s ease;
  max-width: 75vw;
  box-sizing: border-box;
}

body.dark .upload-box input[type="file"] {
  background-color: #444;
  color: white;
  border-color: #666;
}

.upload-box input[type="file"]:hover {
  background-color: #f1f1f1;
  border-color: #ccc;
}

.btn {
  display: block;
  width: 100%;
  max-width: 500px;
  box-sizing: border-box;
  background-color: #2684FC;
  color: white;
  border: none;
  margin-top: 1rem;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn:hover { transform: scale(1.03); }

body.dark .btn {
  background-color: #FDE15A;
  color: #222;
}

#preview {
  max-width: 100%;
  border-radius: 1rem;
  margin-top: 1rem;
  display: none;
}

.preview-small {
  max-width: 120px !important;
  margin: 1rem auto !important;
  display: block !important;
  border-radius: 0.5rem;
  opacity: 0.9;
}

.how-it-works {
  background: var(--box-bg);
  border-radius: 1rem;
  max-width: 500px;
  margin: 3rem auto;
  color: var(--text-color);
  text-align: center;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.step-card {
  background: transparent;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 2rem;
  overflow: hidden;
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, #2b2b2b 35%, #fce15a 65%);
  padding: 2px;
  border-radius: inherit;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
}

.step-card i {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #aaa 0%, #fde15a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.step-card p {
  margin: 0;
  font-weight: 600;
  color: var(--text-color);
}

body.dark .how-it-works {
  background-color: #2b2b2b;
  color: white;
}

img[loading="lazy"] { filter: blur(5px); transition: filter 0.5s ease-out; }
img[loading="lazy"]:not([src=""]) { filter: blur(0); }

.loader {
  display: inline-block;
  margin-top: 1rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: #2684FC;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.toast-container {
  position: fixed;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 10000;
}

.toast {
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(1rem);
  animation: slideInToast 0.3s forwards, fadeOutToast 0.3s 2.5s forwards;
}

@keyframes slideInToast {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOutToast {
  to { opacity: 0; transform: translateY(1rem); }
}

.skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-line {
  height: 1rem;
  border-radius: 0.5rem;
  background: #e0e0e0;
  animation: pulseSkeleton 1.5s ease-in-out infinite;
}

@keyframes pulseSkeleton {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #f0f0f0;
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0 1.5rem;
  font-size: 0.85rem;
  z-index: 999;
  transform: translateY(-20px);
}

.bottom-nav a {
  color: #222;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.dark .bottom-nav {
  background-color: #1a1a1a;
}

body.dark .bottom-nav a {
  color: #fff;
}

.bottom-nav a span {
  font-size: 1.4rem;
  filter: grayscale(1) brightness(1.3);
  opacity: 0.8;
}

body.dark .bottom-nav a span {
  filter: brightness(1.1) grayscale(0.3);
}

.bottom-nav a small { margin-top: 0.2rem; }

.bottom-nav a:active span {
  transform: scale(1.1);
  transition: transform 0.1s;
}

:root {
  --bg-color: #FDE15A;
  --text-color: #222;
  --box-bg: #fff;
  --btn-bg: #2684FC;
}

body.dark {
  --bg-color: #222;
  --text-color: #fff;
  --box-bg: #2b2b2b;
  --btn-bg: #444;
}

body.dark h1 {
  color: #FDE15A;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  z-index: 1000;
}

.overlay.active {
  opacity: 1; pointer-events: auto;
}

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 70vh;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(100%);
  transition: transform 0.3s;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  box-shadow: 0 -3px 10px rgba(0,0,0,0.2);
  z-index: 1001;
  display: flex; flex-direction: column;
}

body.dark .sheet {
  background: rgba(34, 34, 34, 0.6);
}

.sheet.active {
  transform: translateY(0);
}

.sheet header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #ffffff45;
}

.settingItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #ffffff45;
}

.settingItem.placeholder button {
  background: #404040; color: #fff;
  border: none; padding: 0.5rem 1rem;
  border-radius: 0.5rem; cursor: default;
}

#result {
  white-space: pre-wrap;
  margin-top: 1rem;
  font-size: 1rem;
  /* background: #fff9e0; */
  color: #222;
  text-align: left;
  opacity: 0;
  transform: scaleY(0.9);
  transform-origin: top;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 0;
}

#result.has-content {
  padding: 0rem;
  border-radius: 0.8rem;
}

body.dark #result {
  /* background-color: #1e1e1e; */
  color: #fff;
  text-align: left;
}

#result.result-show {
  opacity: 1;
  transform: scaleY(1);
}

#result.skeleton {
  opacity: 1 !important;
  transform: scaleY(1) !important;
  padding: 1rem;
  border-radius: 0.8rem;
}

.dots {
  animation: blink 1.4s infinite both;
  font-weight: bold;
  display: inline-block;
  margin-left: 2px;
}

@keyframes blink {
  0% { opacity: 0.2; }
  20% { opacity: 1; }
  100% { opacity: 0.2; }
}

.blur-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #fde15a 0%, #fffce3 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0.95;
}

body.dark .blur-background {
  background: rgba(34, 34, 34, 0.6);
}

.mood-selector {
  margin: 1.5rem auto;
  max-width: 500px;
  text-align: center;
}

.mood-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.moods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: 100%;
}

.mood {
  border: 1px solid #ccc;
  background: white;
  color: #222;
  border-radius: 1.5rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.mood i { margin-right: 0.3rem; }

.mood.active {
    background: #2684fc26;
    border-color: #2684FC;
}

body.dark .mood {
  background: #2b2b2b;
  color: white;
  border-color: #444;
}

body.dark .mood.active {
    background: #fde15a0f;
    color: #ffffff;
    border-color: #FDE15A;
}

.thinking-message {
  font-size: 1rem;
  opacity: 0;
  animation: fadeInThinking 0.8s ease-out forwards;
  display: inline-block;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--text-color);
}

.thinking-message i {
  animation: pulseThinking 1.2s ease-in-out infinite;
  font-size: 1rem;
}

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

@keyframes pulseThinking {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%     { opacity: 1; transform: scale(1.3); }
}

.sub-intro {
  font-size: 1rem;
  color: #555;
  margin: 0.6rem auto 2.5rem;
  opacity: 0.9;
  display: block;
  height: 1.5em;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.5s ease;
  animation: fadeInUp 0.6s ease-out;
}

body.dark .sub-intro {
  color: #ddd;
}

.upload-hint {
  font-size: 0.7rem;
  text-align: left;
  margin: 1rem auto 0;
  color: #666;
  line-height: 1.4;
}

body.dark .upload-hint {
  color: #ccc;
}

.scroll-hint {
  text-align: center;
  font-size: 1.2rem;
  color: #666;
  margin-top: 1.8rem;
  animation: fadeIn 1s ease;
}

body.dark .scroll-hint {
  color: #ffffff;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.after-actions {
  display: flex;
  justify-content: space-around;
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--box-bg);
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  animation: fadeIn 0.5s ease-in;
}

.action-btn {
  flex: 1;
  text-align: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-color);
}

.action-btn i {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 0.3rem;
}
/* Loading screen styles */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(36, 36, 36, 0.9);
  backdrop-filter: blur(7px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: fadeInOut 1.5s infinite;
}

.loading-text {
  font-size: 1.2rem;
  font-weight: 600;
  opacity: 0;
  animation: fadeInOut 1.5s infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* Mood animation styles */
.mood {
  transition: transform 0.3s ease;
}

.mood:hover {
  transform: scale(1.05);
}

.mood.active {
  transform: scale(1);
  animation: pulse 1s ease;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1.1); }
}

/* Welcome message styles */
.welcome-message {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--box-bg);
  padding: 1rem;
  text-align: center;
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.welcome-message.show {
  transform: translateY(0);
}

.welcome-message p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-color);
}

.welcome-message .close-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem;
}

/* Quick tips styles */
.quick-tip {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--box-bg);
  padding: 0.8rem 1.2rem;
  border-radius: 0.6rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 0.9rem;
  color: var(--text-color);
}

.quick-tip.show {
  opacity: 1;
}

.quick-tip i {
  margin-right: 0.5rem;
  color: var(--btn-bg);
}

/* --- Recipe structured blocks --- */
.recipe-block {
  background: var(--box-bg);
  border-radius: 1.2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  margin-bottom: 1.2rem;
  padding: 1.2rem 1rem 1.1rem 1.2rem;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(.4,1.2,.4,1), transform 0.6s cubic-bezier(.4,1.2,.4,1);
}
.recipe-block.show {
  opacity: 1;
  transform: translateY(0);
}
.block-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.5em;
  justify-content: center;
  text-align: center;
}
.ingredient-item {
  font-size: 1rem;
  margin: 0.18em 0 0.18em 0.2em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  line-height: 1.5;
  word-break: break-word;
}
.dish-block {
  background: #fffde7;
  color: #222;
  text-align: center;
  border-radius: 1.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  margin-bottom: 1.2rem;
  padding: 1.2rem 1rem 1.1rem 1.2rem;
}
body.dark .dish-block {
  background: #23221c;
  color: #fff;
}
.dish-name {
  font-size: 1.4rem;
  font-weight: 800;
  margin-top: 0.5rem;
  margin-bottom: 0.2rem;
  line-height: 1.2;
}
.instructions-block {
  background: #fffbe0;
  color: #222;
  border-radius: 1.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 1.2rem 1rem 1.1rem 1.2rem;
}
body.dark .instructions-block {
  background: #23221c;
  color: #fff;
}
.instructions-slider {
  margin-top: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.step-wrap {
  background: #fff;
  color: #222;
  border-radius: 0.8rem;
  padding: 0.7rem 0.5rem;
  margin-bottom: 0.7rem;
  min-width: 220px;
  max-width: 95vw;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  font-size: 1rem;
  transition: background 0.3s;
}
body.dark .step-wrap {
  background: #1d1d1d;
  color: #fff;
}
.step-label {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.3em;
  background: #fff9e0;
  color: #222;
  display: inline-block;
  padding: 0.18em 0.7em;
  border-radius: 0.6em;
  margin-right: 0.7em;
}
body.dark .step-label {
  background: #2b2b2b;
  color: #fde15a;
}
.step-text {
  display: inline;
}
.slider-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  margin-top: 0.2em;
}
.slider-btn {
  background: #2684FC;
  color: #fff;
  border: none;
  border-radius: 0.5em;
  padding: 0.3em 0.8em;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.slider-btn:disabled {
  background: #b0b0b0;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.7;
}
body.dark .slider-btn {
  background: #fde15a;
  color: #222;
}
.slider-dots {
  display: flex;
  gap: 0.25em;
  margin: 0 0.5em;
}
.dot {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: #e0e0e0;
  display: inline-block;
  transition: background 0.2s;
}
.dot.active {
  background: #2684FC;
}
body.dark .dot {
  background: #444;
}
body.dark .dot.active {
  background: #fde15a;
}
@media (max-width: 600px) {
  .recipe-block, .dish-block, .instructions-block {
    padding: 1rem 0.5rem 0.8rem 0.7rem;
    font-size: 0.98rem;
  }
  .dish-name {
    font-size: 1.15rem;
  }
  .step-wrap {
    min-width: 140px;
    font-size: 0.97rem;
  }
  .block-title {
    font-size: 1.1rem;
  }
  .moods {
    gap: 0.3rem;
  }
  .mood {
    min-width: 44%;
    margin-bottom: 0.3rem;
  }
}
/* --- ÐšÐ¾Ð½ÐµÑ† recipe structured blocks --- */

.dish-meta {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.3em;
    margin-bottom: 0.2em;
    font-weight: 500;
    letter-spacing: 0.01em;
}
body.dark .dish-meta {
  color: #ffe082;
}
@media (max-width: 600px) {
  .dish-meta { font-size: 0.88rem; }
}

/* --- Favorites Card Styles --- */
.favCard {
  font-weight: 500;
  text-align: left;
  transition: box-shadow 0.2s;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #ffffff45;
  transition: box-shadow 0.2s, transform 0.18s, background 0.18s;
  cursor: pointer;
}
.favCard:hover {
    box-shadow: 0 6px 24px rgb(252 237 38 / 13%), 0 1.5px 6px rgba(0, 0, 0, 0.07);
    transform: translateY(2px) scale(1.0);
}
body.dark .favCard:hover {
  /* background: #232b3a; */
}
.favCard small {
  color: #888;
  font-size: 0.85em;
}
body.dark .favCard {
  color: #fff;
}
body.dark .favCard small {
  color: #ffe082;
}

/* --- Modal Recipe Styles --- */
@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(40px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: normal;
  justify-content: center;
  z-index: 2000;
  animation: modalFadeIn 0.22s cubic-bezier(.4,1.2,.4,1);
  padding-top: 115px;
  padding-bottom: 10px;
  overflow-y: auto;
  backdrop-filter: blur(6px);
}
.modal-content {
  background: var(--box-bg, #fff9e0);
  border-radius: 1.2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 2.2rem 1.5rem 1.5rem 1.5rem;
  width: calc(100% - 2rem);
  max-width: 500px;
  text-align: left;
  margin: 0 1rem;
  position: relative;
  color: var(--text-color);
  animation: modalPopIn 0.32s cubic-bezier(.4,1.2,.4,1);
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 1;
}
.modal-close:hover { color: #222; }
body.dark .modal-content { background: #232323; color: #fff; }
body.dark .modal-close { color: #ffe082; }
.modal-section {
  margin: 1.1em 0 0.7em 0;
  font-size: 1em;
  line-height: 1.5;
}
.favTitle {
  font-weight: 700;
  font-size: 1.13em;
  margin-bottom: 0.2em;
}

/* --- Meal Plan Box Styles (объединено) --- */
.meal-box {
    background: var(--box-bg);
    border-radius: 1rem;
    padding: 1rem;
    margin: 2rem auto;
    max-width: 500px;
    color: var(--text-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
  transition: all 0.3s ease;
  transform: translateY(24px);
}
.meal-box.show {
  opacity: 1;
  transform: translateY(0);
}
body.dark .meal-box {
  /*background: #232323; */
  /*color: #fff; */
}
@media (max-width: 600px) {
  .meal-box {
/* padding: 1.1rem 0.3rem 1rem 0.3rem;
    margin: 1rem 0.1rem; */
  }
}

.meal-box h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.5em;
}
.meal-box p {
  color: #888;
  margin-bottom: 1.2em;
}

/* --- Meal Plan Form --- */
#mealPlanForm {
  display: flex;
  flex-direction: column;
  gap: 1.3em;
  margin-bottom: 1.5em;
  background: rgba(255,255,255,0.7);
  border-radius: 1.1em;
  padding: 1.2em 1em 1em 1em;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
body.dark #mealPlanForm {
  background: rgba(34,34,34,0.7);
}
.mealplan-row {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-bottom: 0.2em;
}
.mealplan-row label {
  min-width: 120px;
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5em;
}
#mealPlanForm select, #mealPlanForm input[type="number"] {
  border: 1.5px solid #ccc;
  border-radius: 0.7em;
  padding: 0.5em 1em;
  font-size: 1.08em;
  background: #fff;
  color: #222;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
  font-family: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
#mealPlanForm select:focus, #mealPlanForm input[type="number"]:focus {
  border-color: #2684FC;
  box-shadow: 0 0 0 2px #2684fc33;
}
body.dark #mealPlanForm select, body.dark #mealPlanForm input[type="number"] {
  background: #2b2b2b;
  color: #fff;
  border-color: #444;
}
#generateMealPlanBtn {
  margin-top: 0.7em;
  width: 100%;
  font-size: 1.1em;
  border-radius: 0.7em;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* --- Meal Plan Table --- */
#mealPlanResult {
  margin-top: 1.5em;
  min-height: 120px;
  overflow-x: auto;
}
.mealplan-table {
  width: 100% !important;
  min-width: unset;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1em;
  background: transparent;
  font-size: 1.01em;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border-radius: 1em;
  overflow-x: auto;
}
.mealplan-table th, .mealplan-table td {
  padding: 0.55em 0.4em;
  text-align: center;
  font-size: 1em;
  min-width: 80px;
  max-width: 180px;
  word-break: break-word;
}
.mealplan-table th {
  background: #fff9e0;
  font-weight: 700;
  font-size: 1.08em;
  letter-spacing: 0.01em;
}
body.dark .mealplan-table th {
  background: #232323;
  color: #fde15a;
}
.mealplan-table tr:nth-child(even) td {
  background: #fffbe6;
}
body.dark .mealplan-table tr:nth-child(even) td {
  background: #232323;
}
.mealplan-table td {
  min-width: 90px;
  font-size: 0.9em;
  padding: 0.5em 0.3em;
}
.mealplan-table th:first-child, .mealplan-table td:first-child {
  border-top-left-radius: 0.7em;
  border-bottom-left-radius: 0.7em;
  width: 8vw;
}
.mealplan-table th:last-child, .mealplan-table td:last-child {
  border-top-right-radius: 0.7em;
  border-bottom-right-radius: 0.7em;
}
@media (max-width: 700px) {
  .mealplan-table {
    font-size: 0.85em;
    min-width: unset;
    max-width: 100vw;
    width: 100vw;
  }
  #mealPlanResult {
    overflow-x: auto;
  }
  .mealplan-table th, .mealplan-table td {
    min-width: 70px;
  }
}

