@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Inter:wght@300;400;500;600;700&display=swap');


:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface2: #fff6f2;
  --border: #ffe0d0;
  --text: #1a0800;
  --muted: #7a4a30;
  --faint: #c8a898;
  --orange: #ff6b1a;
  --orange-dark: #e05500;
  --orange-light: #fff0e8;
  --shadow: 0 2px 16px rgba(255, 107, 26, 0.1);
  --shadow-hover: 0 10px 36px rgba(255, 107, 26, 0.2);
  --radius: 14px;
  --radius-lg: 22px;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #1a0c04;
  --surface2: #140a04;
  --border: #3a1e0e;
  --text: #fff5f0;
  --muted: #c89070;
  --faint: #5a2e18;
  --orange: #ff7a30;
  --orange-dark: #ff9a5c;
  --orange-light: #2a1000;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 10px 36px rgba(255, 107, 26, 0.25);
}


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition:  0.3s, color 0.3s; 
  overflow-x: hidden;
}



button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

img {
  display: block;
  width: 100%;
  object-fit: cover;
}

a {
  color: inherit;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.page {
  min-height: 100vh;
  padding-top: 62px;
}

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: backgroun 0.3s;
}

[data-theme="dark"] .navbar {
  background: rgba(15, 5, 0, 0.92);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-fav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  transition: all 0.25s;
}

.nav-fav-btn span,
.nav-fav-btn #favCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: var(--orange);
  color: #fff;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0 5px;
}

.nav-fav-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.nav-fav-btn:hover span {
  background: rgba(255, 255, 255, 0.3);
}

.theme-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.theme-btn:hover {
  background: var(--orange-light);
  border-color: var(--orange);
  transform: rotate(20deg);
}

.hero {
  padding: 130px 20px 80px;
  text-align: center;
  background: linear-gradient(rgba(26, 12, 4, 0.45), rgba(26, 12, 4, 0.45)),
              url("wooden-tray-with-potatoes-cheese-sticks-fried-croutons (1).webp") center/cover;
  border-bottom: 1px solid var(--border);
  color: #fff;
}

[data-theme="dark"] .hero {
  background: linear-gradient(rgba(10, 5, 0, 0.75), rgba(10, 5, 0, 0.85)),
              url('wooden-tray-with-potatoes-cheese-sticks-fried-croutons (1).webp') center/cover;
}

.hero-text {
  max-width: 640px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  padding: 5px 16px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffd8bd;
  border: 1px solid rgba(255, 216, 189, 0.6);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero h1 em {
  font-style: italic;
  color: #ffb27a;
}

.hero-sub {
  font-size: 1rem;
  color: #f2ded2;
  margin-bottom: 32px;
  line-height: 1.7;
  font-weight: 300;
}

.search-box {
  display: flex;
  align-items: center;
  max-width: 520px;
  margin: 0 auto 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 100px;
  padding: 6px 6px 6px 18px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.search-box:focus-within {
  border-color: var(--orange);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
  min-width: 0;
}

.search-box input::placeholder {
  color: var(--faint);
}

.search-box button {
  padding: 9px 22px;
  background: var(--orange);
  color: #fff;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.25s, transform 0.2s;
  white-space: nowrap;
}

.search-box button:hover {
  background: var(--orange-dark);
  transform: scale(1.02);
}



.categories-section {
  padding: 52px 0 36px;
}

.categories-section h2,
.recipes-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.sub-text {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 22px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.pill:hover {
  border-color: var(--orange);
  color: var(--orange);
}

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




.recipes-section {
  padding: 20px 0 80px;
}

.grid-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

#resultCount {
  font-size: 0.875rem;
  color: var(--muted);
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  animation: fadeInUp 0.5s ease backwards;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}

.card-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--orange-dark);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s,  0.2s;
}

.card-heart:hover {
  transform: scale(1.12);
}

.card-heart.saved {
  background: var(--orange);
  color: #fff;
}

.card-body {
  padding: 16px 18px 18px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  /* -webkit-line-clamp: 2; */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.card-area {
  color: var(--muted);
  font-weight: 500;
}

.card-link {
  color: var(--orange);
  font-weight: 600;
}



.loading {
  display: none;
  text-align: center;
  padding: 70px 0;
  color: var(--muted);
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 0.8s linear infinite;
}

.empty {
  text-align: center;
  padding: 70px 0;
  color: var(--muted);
}

.empty h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin: 6px 0;
  color: var(--text);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 22px 0 10px;
}

.back-btn:hover {
  color: var(--orange);
}

.fav-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin: 10px 0 28px;
}

.detail-hero {
  display: flex;
  gap: 40px;
  margin: 20px 0 40px;
}

.detail-img {
  flex: 1 1 45%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  align-self: flex-start;
}

.detail-hero > div:last-child {
  flex: 1 1 55%;
}

.detail-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
}

.tag-cat {
  background: var(--orange-light);
  color: var(--orange-dark);
}

.tag-area {
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.detail-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  margin-bottom: 14px;
  line-height: 1.2;
}

.detail-meta {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 24px;
}

.save-btn {
  padding: 12px 26px;
  border-radius: 100px;
  border: 1.5px solid var(--orange);
  background: var(--orange);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.save-btn:hover {
  background: var(--orange-dark);
}

.save-btn.saved {
  background: var(--surface);
  color: var(--orange);
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
  padding-bottom: 80px;
}

.detail-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.ingredients-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  align-self: flex-start;
}

.ingredient-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ingredient-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.ingredient-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}

.ingredient-item .measure {
  color: var(--muted);
  font-weight: 600;
  min-width: 70px;
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.step {
  display: flex;
  gap: 16px;
  animation: fadeInUp 0.5s ease backwards;
}

.step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--orange-light);
  color: var(--orange-dark);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-text {
  line-height: 1.7;
  color: var(--text);
  padding-top: 4px;
}

.yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #ff0000;
  color: #fff;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}

.yt-btn:hover {
  background: #d90000;
}


.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 0, 0.55);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg);
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(30px);
  transition: transform 0.3s;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-bar {
  width: 42px;
  height: 5px;
  border-radius: 100px;
  background: var(--border);
  margin: 12px auto 0;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-head h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface2);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--orange-light);
  color: var(--orange);
}

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

.view-more-btn {
  padding: 11px 28px;
  border-radius: 100px;
  border: 1.5px solid var(--orange);
  background: transparent;
  color: var(--orange);
  font-weight: 600;
  font-size: 0.875rem;
}

.view-more-btn:hover {
  background: var(--orange);
  color: #fff;
}


.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 300;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .detail-hero {
    flex-direction: column;
  }

  .detail-body {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2rem;
  }

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