body {
  color: rgb(9, 9, 9);
  background-color: rgb(240, 216, 185);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

a {
  color: rgb(243, 117, 117);
  font-weight: 500px;
}

.container {
  margin: 120px auto;
  max-width: 600px;
}

h1 {
  text-align: center;
  font-size: 40px;
  font-weight: 800;
}

/* Language Selector */
.lang-selector {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 1000;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background-color: white;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  font-family: inherit;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s;
}

.lang-current:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.lang-arrow {
  font-size: 11px;
  opacity: 0.6;
}

.lang-dropdown {
  list-style: none;
  padding: 6px 0;
  margin: 6px 0 0;
  background-color: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  position: absolute;
  right: 0;
  min-width: 150px;
  display: none;
}

.lang-dropdown.open {
  display: block;
  animation: fade-in 0.15s ease;
}

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

.lang-dropdown li {
  padding: 10px 18px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 8px;
  margin: 2px 6px;
  transition: background-color 0.15s;
}

.lang-dropdown li:hover {
  background-color: rgb(240, 216, 185);
}

.lang-dropdown li.active {
  font-weight: bold;
  color: rgb(243, 117, 117);
}

/* Header */
.form-container {
  padding: 30px;
  background-color: rgb(231, 187, 129);
  box-shadow: 0px 60px 60px 0px rgba(65, 50, 100, 0.1);
  border-radius: 15px;
  margin-bottom: 40px;
}

header {
  margin-bottom: 30px;
  margin-top: 30px;
}

form {
  display: flex;
}

.hint {
  line-height: 1.5px;
  font-size: 15px;
  margin-top: 10px;
  opacity: 0.8;
}

.instructions {
  padding: 20px;
  width: 80%;
  border-radius: 15px;
  border: 0px;
  font-size: 20px;
}

.submit-button {
  width: 20%;
  margin-left: 10px;
  background-color: rgb(243, 117, 117);
  color: white;
  font-size: 20px;
  border-radius: 15px;
  cursor: pointer;
  border: 0px;
}

.hidden {
  display: none;
}

.recipe strong {
  color: rgb(243, 117, 117);
}

.recipe {
  background-color: rgb(231, 187, 129);
  width: 80%;
  border-radius: 15px;
  font-size: 15px;
  padding: 80px;
  margin: auto;
  border-left: 5px solid rgb(243, 117, 117);
  border-right: 5px solid rgb(243, 117, 117);
  box-sizing: border-box;
  box-shadow: 0px 60px 60px 0px rgba(65, 50, 100, 0.1);
}

/* Add All Ingredients Button */
.add-all-btn {
  display: block;
  margin: 24px auto 0;
  padding: 14px 28px;
  background-color: rgb(243, 117, 117);
  color: white;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.add-all-btn:hover:not(:disabled) {
  background-color: rgb(220, 90, 90);
  transform: translateY(-1px);
}

.add-all-btn:disabled {
  background-color: rgb(150, 200, 150);
  cursor: default;
}

/* Shopping List */
.shopping-list {
  padding: 30px;
  background-color: rgb(231, 187, 129);
  box-shadow: 0px 60px 60px 0px rgba(65, 50, 100, 0.1);
  border-radius: 15px;
  margin: 40px auto 0;
  width: 80%;
  box-sizing: border-box;
  border-left: 5px solid rgb(243, 117, 117);
  border-right: 5px solid rgb(243, 117, 117);
}

.shopping-list h2 {
  margin: 0 0 20px;
  font-size: 22px;
  color: rgb(243, 117, 117);
}

.shopping-list #shopping-form {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.shopping-list #shopping-input {
  padding: 20px;
  width: 80%;
  border-radius: 15px;
  border: 0px;
  font-size: 20px;
  box-sizing: border-box;
}

.shopping-list #shopping-form button {
  width: 20%;
  background-color: rgb(243, 117, 117);
  color: white;
  font-size: 18px;
  border-radius: 15px;
  cursor: pointer;
  border: 0px;
  padding: 20px 10px;
  box-sizing: border-box;
}

.shopping-list #clear-shopping {
  background-color: rgba(243, 117, 117, 0.85);
}

.shopping-list #shopping-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.shopping-list #shopping-items li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
}

.shopping-list #shopping-items input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: rgb(243, 117, 117);
  cursor: pointer;
  flex-shrink: 0;
}

.shopping-list #shopping-items span {
  font-size: 16px;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.shopping-list #shopping-items li.done span {
  text-decoration: line-through;
  opacity: 0.7;
}

/* Compare Prices Button */
.compare-btn {
  background-color: rgb(100, 160, 220);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.compare-btn:hover {
  background-color: rgb(70, 130, 190);
}

.compare-btn.active {
  background-color: rgb(160, 100, 100);
}

.shopping-list .shopping-delete {
  background-color: transparent;
  color: rgb(243, 117, 117);
  border: 2px solid rgb(243, 117, 117);
  border-radius: 15px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
}

.shopping-list .shopping-delete:hover {
  background-color: rgb(243, 117, 117);
  color: white;
}

/* Price Comparison Panel */
.price-panel {
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 16px;
  margin: 4px 0 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  animation: slide-down 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

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

.price-panel-header {
  font-size: 14px;
  margin-bottom: 12px;
  color: #444;
}

.price-panel-header em {
  color: rgb(243, 117, 117);
  font-style: normal;
}

.price-panel-stores {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.store-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 2px solid;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
  color: #333;
  background-color: white;
  transition: background-color 0.15s, color 0.15s;
}

.store-link:hover {
  background-color: #f5f5f5;
  color: #111;
}

.store-icon {
  font-size: 16px;
}

.price-panel-subtitle {
  font-size: 13px;
  font-weight: bold;
  color: #555;
  margin: 0 0 10px;
}

.price-loading {
  font-size: 13px;
  color: #777;
  padding: 8px 0;
}

.price-no-results {
  font-size: 13px;
  color: #777;
  padding: 4px 0;
  margin: 0;
}

/* Product Cards */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: white;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.product-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  background-color: #f9f9f9;
}

.product-img-placeholder {
  width: 52px;
  height: 52px;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9f9f9;
  border-radius: 6px;
  flex-shrink: 0;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.product-name {
  font-size: 14px;
  font-weight: bold;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-brand {
  font-size: 12px;
  color: #666;
}

.product-qty {
  font-size: 12px;
  color: #888;
}

.product-stores {
  font-size: 12px;
  color: rgb(70, 140, 70);
}

/* Animations */
.generating {
  animation: blink-animation 1s steps(5, start) infinite;
}

@keyframes blink-animation {
  to { visibility: hidden; }
}

@-webkit-keyframes blink-animation {
  to { visibility: hidden; }
}

/* Ad Slots */
.ad-slot {
  width: 80%;
  margin: 0 auto;
  text-align: center;
  min-height: 90px;
  box-sizing: border-box;
}

.ad-slot--top {
  margin: 10px auto 30px;
}

.ad-slot--middle {
  margin: 30px auto;
}

.ad-slot--bottom {
  margin: 30px auto 10px;
}

footer {
  text-align: center;
  margin-top: 30px;
  margin-bottom: 30px;
  font-size: 14px;
  opacity: 0.8;
}

@media (max-width: 700px) {
  .shopping-list,
  .recipe {
    width: 100%;
  }

  .shopping-list #shopping-form {
    flex-direction: column;
  }

  .shopping-list #shopping-input,
  .shopping-list #shopping-form button {
    width: 100%;
  }

  .price-panel-stores {
    gap: 6px;
  }

  .store-link {
    font-size: 12px;
    padding: 6px 10px;
  }

  h1 {
    font-size: 28px;
  }

  .lang-selector {
    top: 12px;
    right: 12px;
  }
}
