* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  background: linear-gradient(135deg, #ff914d, #ff6f1a);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  transition: background 0.3s ease, color 0.3s ease;
}

body.dark {
  background: #121212;
  color: white;
}

.container {
  background: white;
  padding: 25px;
  border-radius: 20px;
  width: 100%;
  max-width: 430px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  text-align: center;
  transition: background 0.3s ease, transform 0.3s ease;
}

body.dark .container {
  background: #1e1e1e;
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-top {
  width: 170px;
  height: auto;
  object-fit: contain;
}

.subtitle {
  color: #666;
  margin-bottom: 14px;
  font-size: 14px;
}

body.dark .subtitle {
  color: #aaa;
}

.instructions {
  font-size: 12px;
  line-height: 1.5;
  color: #666;
  background: #fff3eb;
  border: 1px solid #ffd1b3;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  text-align: left;
}

body.dark .instructions {
  background: #2a221d;
  color: #d5c1b2;
  border-color: #5a4334;
}

label {
  display: block;
  text-align: left;
  margin-top: 12px;
  font-size: 13px;
}

.price-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.price-inputs select {
  width: 100%;
}

select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus {
  outline: none;
  border-color: #ff914d;
  box-shadow: 0 0 0 3px rgba(255, 145, 77, 0.15);
}

body.dark select {
  background: #2b2b2b;
  color: white;
  border-color: #444;
}

button {
  margin-top: 16px;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 12px;
  background: #ff914d;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  background: #ff6f1a;
}

.result-card {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff7f2;
  border: 1px solid #ffd7c0;
  display: inline-block;
  width: 100%;
  text-align: center;
  transition: all 0.25s ease;
}

.result-card.active {
  padding: 16px 14px;
  transform: scale(1.01);
}

body.dark .result-card {
  background: #2b241f;
  border-color: #5a4334;
}

.loading {
  font-size: 13px;
  color: #888;
}

.result-label {
  font-size: 15px;
  font-weight: 600;
  color: #666;
}

body.dark .result-label {
  color: #c6c6c6;
}

.result-food {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: #222;
}

body.dark .result-food {
  color: #fff;
}

.result-price {
  font-size: 14px;
  font-weight: 600;
  color: #7a7a7a;
  line-height: 1.5;
}

body.dark .result-price {
  color: #d0d0d0;
}

.rich-message {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #ff914d;
}

#foodImg {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
  margin-top: 14px;
  display: none;
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.mode-switch {
  margin-top: 14px;
  font-size: 13px;
  cursor: pointer;
  color: #555;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mode-switch:hover {
  transform: translateY(-1px);
}

body.dark .mode-switch {
  color: #ddd;
}

.ads {
  margin-top: 18px;
  padding: 10px;
  background: #f1f1f1;
  border-radius: 10px;
  font-size: 11px;
}

body.dark .ads {
  background: #2b2b2b;
  color: #bbb;
}

.animate-result {
  animation: resultPop 0.45s ease;
}

@keyframes resultPop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-image {
  animation: imageFadeIn 0.5s ease;
}

@keyframes imageFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.cuisine-badge {
  background: #ffe7d6;
  color: #b85c1e;
  border: 1px solid #ffc8a3;
}

body.dark .cuisine-badge {
  background: #3a2a20;
  color: #ffd2b3;
  border-color: #6b4a35;
}

@media (max-width: 480px) {
  .container {
    padding: 18px;
    border-radius: 16px;
  }

  .logo-top {
    width: 145px;
  }

  .price-inputs {
    flex-direction: column;
  }

  .result-food {
    font-size: 21px;
  }

  .result-price {
    font-size: 13px;
  }
}