/* =========================
   Root Variables
========================= */
:root {
  --dusty-red: #D43F3F;
  --dusty-red-hover: #C73636;
  --dark-yellow: #FFD27F;
  --pale-yellow: #FFECB3;
  --peach: #F5A96E;
  --dark: #850000;
}

/* =========================
   Global Styles
========================= */
.delius {
  font-family: 'Delius Swash Caps', cursive;
  font-weight: 400;
  font-style: normal;
}

.mali-regular {
  font-family: 'Mali', cursive;
  font-weight: 400;
  font-style: normal;
}

body, html {
  height: 100vh;
  margin: 0;
  font-family: 'Mali', cursive;
  background-color: var(--pale-yellow);
  overflow-x: hidden;
  overflow-y: hidden;
}

/* =========================
   Layout Structure
========================= */
.body {
  display: flex;
  flex-direction: row;
  height: 100%;
}

.body-left {
  position: sticky;
  flex-grow: 0;
  flex-shrink: 0;
  width: 250px;
}

/* =========================
   Header Styles
========================= */
.top-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  height: 60px;
  padding: 10px 20px;
  background-color: var(--dusty-red);
  color: var(--dark-yellow);
}

.top-header .swirl {
  height: 40px;
  width: auto;
  margin: 0 20px;
}

.site-name {
  font-family: 'Delius Swash Caps', serif;
  font-size: 2.5em;
  font-weight: bold;
  letter-spacing: 4px;
  color: var(--dark-yellow);
  white-space: nowrap;
}

.header-wrap a {
  text-decoration: none;
}

/* =========================
   Left Sidebar
========================= */
.sidebar-left {
  overflow: hidden;
  margin: 25px;
  border-radius: 20px;
  z-index: 10;
  background-color: var(--peach);
  color: var(--dark);
  padding: 6px;
  font-size: 1.8em;
  font-weight: 900;
  letter-spacing: 1.5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.sidebar-left ul {
  list-style: none;
  padding: 0 25px;
}

.sidebar-left li {
  margin-bottom: 7px;
}

.sidebar-left a {
  color: var(--dark);
  text-decoration: none;
  transition: 0.1s ease;
}

.sidebar-left a:hover {
  color: var(--dusty-red);
}

.sidebar-left .nav_icon {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  height: 85px;
  width: auto;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.sidebar-left .nav_icon:hover {
  transform: scale(1.05);
}

.login-link {
  margin-top: 16px;
  font-size: 0.8em;
  text-align: center;
  list-style: none;
}


/* =========================
   Floating Create Icon
========================= */
.create_icon {
  position: fixed;
  bottom: 30px;
  left: 55px;
  z-index: 1000;
  transition: transform 0.2s ease; 
}

.create_icon::after {
  content: "Create a recipe";
  display: block;
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  background: var(--dark-yellow);
  color: var(--dusty-red);
  font-family: 'Mali', cursive;
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 10px;
  margin-bottom: 6px;
}

.create_icon:hover {
  transform: scale(1.02);
}

.create_icon img {
  width: 150px;
  height: auto;
  border-radius: 10%;
}

/* =========================
   Main Content Area
========================= */
.main-content {
  width: 100%;
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  overflow-y: auto;
  scrollbar-color: var(--dusty-red) transparent;
}

/* =========================
   Recipe Container
========================= */
.recipe-container {
  width: 100%;
  max-width: 1100px;
  margin: 35px auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.recipe-section {
  border-radius: 20px;
  padding: 18px 24px;
  color: var(--dark);
  display: flex;
  flex-direction: row;
  gap: 28px;
  margin-bottom: 30px;
  font-size: 1.05em;
}

.recipe-section h1 {
  margin-top: 0;
  font-size: 2.8em;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.recipe-section h2 {
  margin-top: 0;
}

.left-view, .right-view {
  flex: 1;
  max-width: 500px;
  min-width: 0;
}

/* Author */
.recipe-author {
  font-size: 1.4em;
  margin-bottom: 20px;
  color: var(--dusty-red); 
}

.recipe-author a{
  font-size: 1.1em;
  font-weight: 600;
  color: var(--dusty-red);
  transition: background-color 0.1s ease;
}

.recipe-author a:hover{
  color: var(--dusty-red-hover);
}

/* Image */
.recipe-image-wrap {
  margin-bottom: 36px;
}

.recipe-image-wrap img {
  display: block;
  width: 100%;
  max-width: 700px;
  max-height: 420px;
  object-fit: cover;
  border-radius: 16px;
  margin: 0 auto;
}

.recipe-no-image {
  margin-bottom: 28px;
  font-style: italic;
}

/* Description */
.recipe-description {
  margin-bottom: 25px;
  font-weight: 500;
}

/* Meta row — prep, cook, servings, cost */
.recipe-meta {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
  font-size: 1.4em;
}

.recipe-meta p {
  margin: 0;
  color: var(--dusty-red);
  font-weight: 500;
}

.recipe-meta strong {
  margin: 0;
  color: var(--dark);
}

/* Ingredients */
.recipe-ingredients {
  margin-bottom: 30px;
  background: var(--dark-yellow);
  border-radius: 12px;
  padding: 16px;
}

.recipe-ingredients ul {
  line-height: 1.8;
}

/* Steps */
.recipe-steps {
  font-weight: 500;
  margin-bottom: 30px;
}

.recipe-steps ol {
  line-height: 1.9;
}

/* Tags */
.recipe-tags {
  margin-bottom: 25px;
  background: var(--dark-yellow);
  border-radius: 12px;
  padding: 16px;
  color: var(--dusty-red);
}

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

.tag-list span {
  background: var(--pale-yellow);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
}

/* Bottom links */
.recipe-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.recipe-links a {
  color: var(--dusty-red);
}

.save-btn {
  background: var(--dusty-red);
  color: var(--dark-yellow);
  border: none;
  border-radius: 10px;
  padding: 8px 18px;
  margin-bottom: 60px;
  font-family: 'Mali', cursive;
  font-size: 1.4em;
  width: 40%;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.1s ease;
  align-self: center;
}

.save-btn:hover {
  background: var(--dusty-red-hover);
}

.save-btn.saved {
  background: var(--dark);
  color: var(--pale-yellow);
}

/* Not found */
.recipe-not-found {
  width: 100%;
  max-width: 950px;
  margin: 35px auto;
}

.recipe-not-found section {
  background: var(--peach);
  border-radius: 20px;
  padding: 28px 32px;
  color: var(--dark);
}