* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: #ffe9d6;
}

/* CENTER SCREEN */
.screen {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

/* APP */
.app {
  width: 390px;
  background: #fff;
  min-height: 100vh;
  border-radius: 32px;
  padding: 20px;
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header p {
  color: #777;
  font-size: 14px;
}

.profile {
  width: 44px;
  height: 44px;
  background: #ff9800;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SEARCH */
.search-row {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.search-box {
  flex: 1;
  background: #f2f2f2;
  padding: 12px;
  border-radius: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
}

.filter-btn {
  background: #ff9800;
  border: none;
  color: white;
  padding: 12px;
  border-radius: 14px;
}

/* SECTION */
.section {
  margin: 20px 0 12px;
}

/* CARDS */
.card-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
}

.food-card {
  width: 180px;
  height: 260px;
  border-radius: 24px;
  padding: 16px;
  color: white;
}

.food-img {
  width: 120px;
  height: 120px;
  background: white;
  border-radius: 50%;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.food-img img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
}

.food-card h4 {
  margin: 12px 0 6px;
}

.stars {
  color: #ffe082;
}

.meta {
  font-size: 13px;
  opacity: 0.9;
}

.teal {
  background: #2aa198;
}

.teall {
  background: #7bf0e6;
}

.yellow {
  background: #f4b942;
}
/* BOTTOM NAV BAR */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 390px;
  height: 80px;
  background: #ff9800;
  border-radius: 30px 30px 0 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.15);
}

/* NAV ICONS */
.nav-item {
  color: white;
  font-size: 22px;
}

/* FLOATING SCAN BUTTON */
.scan-fab {
  width: 64px;
  height: 64px;
  background: white;
  color: #ff9800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-top: -40px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  cursor: pointer;
}
/* NEW RECIPE CARD */
.new-recipe-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 14px 16px;
  border-radius: 18px;
  margin-bottom: 14px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

/* LEFT TEXT */
.recipe-info h4 {
  margin: 0 0 6px;
  font-size: 16px;
}

.recipe-info .stars {
  color: #f4c430;
  font-size: 14px;
  margin-bottom: 6px;
}

.recipe-info .meta {
  font-size: 13px;
  color: #777;
  display: flex;
  gap: 12px;
}

/* RIGHT IMAGE */
.recipe-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.recipe-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* ===========================
   DETAILS PAGE – FINAL FIXED
=========================== */

.details-page {
  padding-bottom: 120px;
  animation: pageFade 0.6s ease-out both;
}

/* TOP YELLOW HEADER */
.details-top {
  background: #f6c76b;
  height: 380px;
  position: relative;
  padding: 20px;
  border-radius: 0 0 110px 110px;
  animation: slideDown 0.6s ease-out both;
  z-index: 1;
}

/* BACK BUTTON */
.back-btn {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
}

/* PROFILE */
.details-top .profile {
  position: absolute;
  top: 20px;
  right: 20px;
}

/* NUTRITION STACK */
.details-nutrition {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.details-nutrition .nutri-card {
  width: 145px;
  padding: 10px 14px;

  display: flex;
  align-items: center;
  gap: 10px;

  background: #fff;
  border-radius: 14px;
  font-size: 13px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);

  opacity: 0;
  animation: slideLeft 0.6s ease-out forwards;
}

.details-nutrition .nutri-card:nth-child(1) { animation-delay: 0.2s; }
.details-nutrition .nutri-card:nth-child(2) { animation-delay: 0.35s; }
.details-nutrition .nutri-card:nth-child(3) { animation-delay: 0.5s; }

.details-nutrition .nutri-card b {
  font-size: 12px;
  font-weight: normal;
  color: #555;
}

/* FOOD PLATE */
.details-food-image {
  position: absolute;
  right: -40px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  z-index: 5;
  will-change: transform;

  animation: foodFade 0.8s ease-out both;
  animation-delay: 0.3s;
}

.details-food-image img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: white;
  padding: 12px;
  object-fit: cover;
  box-shadow: 0 15px 30px rgba(0,0,0,0.25);
}

/* WHITE CONTENT CARD */

.details-content {
  position: relative;
  z-index: 2;

  margin-top: 0;
  padding: 130px 22px 20px;
  background: white;
  border-radius: 40px 40px 0 0;

}

.details-content h2 {
  font-size: 22px;
  margin-bottom: 14px;
  font-weight: 600;
}

/* SAFE CONTENT ANIMATION (CHILD ONLY) */
.details-inner {
  animation: contentFadeSafe 0.5s ease-out both;
  animation-delay: 0.4s;
}

/* GUARANTEE IMAGE IS ALWAYS ON TOP */

.details-food-image {
  position: absolute;
  z-index: 9999;
  pointer-events: none;
  transform: translateZ(0);
}

/* SERVING BAR */
.details-serving {
  display: flex;
  justify-content: space-between;
  align-items: center;

  background: #f3f3f3;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14px;
  margin-bottom: 26px;

  position: relative;
  cursor: pointer;
}

.details-serving::after {
  content: "⌄";
  position: absolute;
  right: 16px;
  color: #666;
}

/* INGREDIENT CARDS */
.details-ingredient {
  background: white;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.4;
}

/* ===========================
   KEYFRAMES
=========================== */

@keyframes pageFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(-30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes slideLeft {
  from { transform: translateX(-20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes foodFade {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes contentFadeSafe {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

