@charset "UTF-8";
/* ─────────────────────────────────────────
   Ingredify — Modern Redesign
   Aesthetic: warm editorial food magazine
   Fonts: Fraunces (display) + DM Sans (body)
───────────────────────────────────────── */
/* ── Tokens ── */
/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  background: #fdf6ec;
  color: #1c1a18;
  padding: 0;
  margin: 0;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  margin: 0;
}

/* ── Topbar ── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(253, 246, 236, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e8ddd0;
}

.menu-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 10px;
  transition: background 0.2s;
  margin: 0;
}
.menu-toggle:hover {
  background: #e8ddd0;
}
.menu-toggle .menu-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}
.menu-toggle .menu-icon span {
  display: block;
  height: 2px;
  background: #1c1a18;
  border-radius: 2px;
  transition: transform 0.2s;
}
.menu-toggle .brand-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: #1c1a18;
  letter-spacing: -0.02em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Language select ── */
.lang-select,
#google_translate_select {
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  padding: 6px 12px;
  border: 1px solid #e8ddd0;
  border-radius: 20px;
  background: #ffffff;
  color: #1c1a18;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  margin: 0;
}
.lang-select:hover,
#google_translate_select:hover {
  border-color: #e8a838;
}
.lang-select:focus,
#google_translate_select:focus {
  border-color: #4a7c59;
}

/* ── Menu Overlay ── */
.menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #1c1a18;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.menu.hidden {
  display: none;
  visibility: hidden;
}

.menu-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
  margin: 0;
}
.menu-close:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.menu-inner {
  text-align: center;
  width: 100%;
  max-width: 400px;
  padding: 0 24px;
}

.menu-logo {
  margin-bottom: 48px;
}
.menu-logo img {
  width: 156px;
  height: 156px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 12px;
  opacity: 0.9;
}

.menu-brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: #fdf6ec;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.menu-tagline {
  color: rgba(253, 246, 236, 0.45);
  font-size: 0.9rem;
  margin: 0;
}

.menuitems {
  width: 100%;
}
.menuitems a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1.5rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
  font-style: italic;
  color: rgba(253, 246, 236, 0.85);
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  text-decoration: none;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  margin: 2px 0;
}
.menuitems a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
  transform: translateX(4px);
}

.menu-item-icon {
  font-size: 1.1rem;
  opacity: 0.7;
}

/* ── Utility ── */
.hidden {
  display: none !important;
  visibility: hidden !important;
}

.w100 {
  width: 100%;
}

.w100vw {
  width: 100vw;
}

.hauto {
  height: auto;
}

.wauto {
  width: auto;
}

.h100 {
  height: 100%;
}

.h100vh {
  height: 100vh;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.right {
  float: right;
}

.inline {
  display: inline-block;
  vertical-align: middle;
}

.bold {
  font-weight: 600;
}

.pull-right {
  float: right;
}

/* ── Container ── */
.container {
  padding-top: 60px;
}

.contained {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ── Screen System ── */
main {
  background: #fdf6ec url("../images/recipe_background.jpg") no-repeat center top/cover fixed;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}

.logotext {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 5.5rem);
  letter-spacing: -0.04em;
  color: #1c1a18;
  line-height: 1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #1c1a18 0%, #4a7c59 60%, #e8a838 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: #8c7b6b;
  margin: 0;
  font-style: italic;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
}

/* ── Selection Bar ── */
.selection-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #e8ddd0;
  border-radius: 20px;
  padding: 16px 20px;
  margin-bottom: 28px;
  box-shadow: 0 2px 12px rgba(28, 26, 24, 0.08);
  flex-wrap: wrap;
}

.selection-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
  min-width: 0;
}

.selection-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.placeholder-text {
  color: #8c7b6b;
  font-size: 0.85rem;
  font-style: italic;
  padding: 4px 0;
}

.loading-text {
  color: #8c7b6b;
  font-size: 0.85rem;
  font-style: italic;
}

/* ── Tags ── */
.tags {
  font-size: 0.82rem;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  vertical-align: top;
}
.tags p {
  margin: 0;
  padding: 2px;
  vertical-align: middle;
}

.selected-tags {
  max-height: 160px;
  overflow-y: auto;
}

/* Selected ingredient chip */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8a838;
  color: #1c1a18;
  font-weight: 500;
  font-size: 0.8rem;
  padding: 5px 10px 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.tag:hover {
  background: #c4861a;
  color: white;
  transform: scale(0.97);
}

/* ── Filters Panel ── */
.filters {
  background: #ffffff;
  border: 1px solid #e8ddd0;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 2px 12px rgba(28, 26, 24, 0.08);
}

.filters-section {
  margin-bottom: 24px;
}
.filters-section:last-child {
  margin-bottom: 0;
}

.section-label {
  font-family: "DM Sans", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8c7b6b;
  margin-bottom: 12px;
}

/* ── Category & Ingredient Buttons ── */
button {
  cursor: pointer;
}

.category {
  font-family: "DM Sans", sans-serif;
  font-size: 0.82rem;
  padding: 7px 14px;
  border: 1.5px solid #e8ddd0;
  background: #ffffff;
  color: #1c1a18;
  border-radius: 20px;
  cursor: pointer;
  margin: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.category:hover {
  background: #1c1a18;
  color: #fdf6ec;
  border-color: #1c1a18;
  transform: translateY(-1px);
}

.ingredient {
  position: relative;
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  padding: 6px 14px 6px 12px;
  padding-right: 20px;
  margin: 0;
  border: 1.5px solid rgba(232, 168, 56, 0.5);
  background: rgba(232, 168, 56, 0.12);
  color: #1c1a18;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.ingredient, .ingredient * {
  transition: all 0.2s ease;
}
.ingredient:hover {
  background: #e8a838;
  border-color: #e8a838;
  transform: translateY(-1px);
}
.ingredient.category {
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: #4a7c59;
  border-color: #4a7c59;
  color: white;
}
.ingredient.category:hover {
  background: #375c42;
  border-color: #375c42;
}
.ingredient small {
  position: absolute;
  top: -7px;
  right: -8px;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  padding: 1px 4px;
  text-align: center;
  border-radius: 10px;
  background: #1c1a18;
  color: #fdf6ec;
  opacity: 0.25;
  line-height: 1.5;
}
.ingredient:hover small {
  opacity: 1;
}

@media only screen and (max-width: 600px) {
  .ingredient small {
    opacity: 1;
    z-index: 5;
  }
}
/* ── Buttons ── */
.btn-primary,
.primarybtn,
#btnsearch {
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 22px;
  background: #1c1a18;
  color: #fdf6ec;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  white-space: nowrap;
  margin: 0;
}
.btn-primary:hover,
.primarybtn:hover,
#btnsearch:hover {
  background: #4a7c59;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(74, 124, 89, 0.35);
}
.btn-primary:active,
.primarybtn:active,
#btnsearch:active {
  transform: translateY(0);
}

.btn-outline,
.secondarybtn,
#btnfilters {
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 9px 18px;
  background: transparent;
  color: #1c1a18;
  border: 1.5px solid #e8ddd0;
  border-radius: 24px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  white-space: nowrap;
  margin: 0;
}
.btn-outline:hover,
.secondarybtn:hover,
#btnfilters:hover {
  border-color: #1c1a18;
  background: rgba(28, 26, 24, 0.06);
}

.btn-ghost {
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 12px;
  background: transparent;
  color: #8c7b6b;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0;
}
.btn-ghost:hover {
  color: #1c1a18;
  background: #e8ddd0;
}

.bigbtn {
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  background: #e8a838;
  color: #1c1a18;
  padding: 14px 28px;
  border-radius: 28px;
  border: none;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  margin: 4px 2px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.bigbtn:hover {
  background: #c4861a;
  color: white;
  transform: translateY(-1px);
}
.bigbtn.btndefault {
  background: #1c1a18;
  color: #fdf6ec;
}
.bigbtn.btndefault:hover {
  background: #4a7c59;
}

/* ── Results Grid ── */
.results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 8px;
  padding-bottom: 60px;
}

/* ── Cards ── */
.card {
  background: #ffffff;
  border: 1px solid #e8ddd0;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(28, 26, 24, 0.08);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(28, 26, 24, 0.14);
}
.card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.card:hover img {
  transform: scale(1.04);
}

.card-body {
  padding: 14px 16px 16px;
}
.card-body b {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 8px;
  line-height: 1.3;
}

.missing.btn {
  display: inline-block;
  background: rgba(74, 124, 89, 0.15);
  color: #4a7c59;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  border: none;
  margin: 0;
}

/* ── Loading bar ── */
#load {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  width: 200px;
  height: 40px;
  overflow: visible;
  user-select: none;
  pointer-events: none;
}
#load div {
  position: absolute;
  width: 24px;
  height: 24px;
  font-size: 18px;
  opacity: 0;
  animation: float-emoji 3s linear infinite;
  transform: rotate(180deg);
}
#load div:nth-child(2) {
  animation-delay: 0.3s;
}
#load div:nth-child(3) {
  animation-delay: 0.6s;
}
#load div:nth-child(4) {
  animation-delay: 0.9s;
}
#load div:nth-child(5) {
  animation-delay: 1.2s;
}
#load div:nth-child(6) {
  animation-delay: 1.5s;
}
#load div:nth-child(7) {
  animation-delay: 1.8s;
}
#load div:nth-child(8) {
  animation-delay: 2.1s;
}

@keyframes float-emoji {
  0% {
    left: 0;
    opacity: 0;
    transform: rotate(180deg) translateY(0);
  }
  30% {
    left: 40%;
    opacity: 1;
    transform: rotate(0deg) translateY(-6px);
  }
  65% {
    left: 60%;
    opacity: 1;
    transform: rotate(0deg) translateY(-6px);
  }
  100% {
    left: 100%;
    opacity: 0;
    transform: rotate(-180deg) translateY(0);
  }
}
/* ── Recipe Detail Screen ── */
.bkgImage {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.scollable {
  overflow-y: auto;
  position: relative;
}

#screen_details {
  padding-bottom: 250px;
}

.recipeDetails {
  position: absolute;
  top: 80px;
  left: 4%;
  max-width: 80%;
  min-width: min(50%, 320px);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 28px;
  padding: 28px;
  margin-bottom: 50px;
  box-shadow: 0 8px 40px rgba(28, 26, 24, 0.18);
}
.recipeDetails h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  margin-bottom: 16px;
  text-align: left;
}
.recipeDetails .recipeInfo,
.recipeDetails #recipeVideo {
  display: inline-block;
  vertical-align: top;
  width: 45%;
  padding: 1%;
  margin: 1%;
}
@media screen and (max-width: 800px) {
  .recipeDetails .recipeInfo,
.recipeDetails #recipeVideo {
    width: 100%;
  }
}

.closeRecipe {
  position: fixed;
  z-index: 99;
  top: 20px;
  right: 20px;
}

/* ── About Screen ── */
.about-app {
  padding: 60px 0 40px;
}

.about-hero {
  text-align: center;
  margin-bottom: 48px;
}

.about-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #1c1a18;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.about-block {
  background: #ffffff;
  border: 1px solid #e8ddd0;
  border-radius: 18px;
  padding: 24px;
}
.about-block h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #4a7c59;
}
.about-block p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #534d47;
  margin: 0;
}

.about-footer {
  text-align: center;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #e8ddd0;
  border-radius: 18px;
}
.about-footer p {
  font-size: 0.88rem;
  color: #8c7b6b;
  margin: 8px 0 0;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(232, 168, 56, 0.2);
  color: #c4861a;
  border: 1px solid rgba(232, 168, 56, 0.4);
}

/* ── My Recipes / Coming Soon ── */
.page-header {
  padding: 60px 0 32px;
}
.page-header h1 {
  text-align: left;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.page-intro {
  font-size: 0.95rem;
  color: #8c7b6b;
  max-width: 480px;
  line-height: 1.6;
  margin: 0;
}

.coming-soon {
  text-align: center;
  padding: 80px 0;
  color: #8c7b6b;
  border: 2px dashed #e8ddd0;
  border-radius: 24px;
}
.coming-soon .coming-soon-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
}
.coming-soon p {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 1.2rem;
  margin: 0;
}

/* ── Responsive ── */
@media only screen and (max-width: 640px) {
  .selection-bar {
    flex-direction: column;
  }

  .selection-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .results {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

  .recipeDetails {
    max-width: 92%;
    min-width: 92%;
    left: 4%;
  }
}
/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(28, 26, 24, 0.25);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(28, 26, 24, 0.45);
}