/* css/cookbook-styles.css */
#cookbook-hero {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/cookbook-hero-bg.jpg') no-repeat center center/cover; /* Знайди гарний фон */
  padding: 60px 0;
  text-align: center;
  color: white;
}
#cookbook-hero h1 { font-size: 3em; margin: 0; text-shadow: 2px 2px 4px rgba(0,0,0,0.7); }
#cookbook-hero p { font-size: 1.2em; opacity: 0.9; }

#cookbook-content { padding: 40px 0; }

/* --- Рецепт Дня --- */
.recipe-of-the-day-wrapper {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--secondary-accent);
  margin-bottom: 50px;
  text-align: center;
}
.recipe-of-the-day-wrapper h2 {
  margin: 0 0 10px 0;
  font-size: 2em;
  color: var(--secondary-accent);
}
.recipe-of-the-day-wrapper h2 .fa-star { margin-right: 10px; }
.recipe-of-the-day-intro { margin: 0 auto 25px auto; max-width: 600px; opacity: 0.9; }

/* --- Категорії рецептів --- */
.recipe-category { margin-bottom: 40px; }
.category-title {
  font-size: 2em;
  color: var(--accent-color);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 25px;
}

/* --- Сітка рецептів --- */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
}

/* --- Картка рецепту --- */
.recipe-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.recipe-card:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.15); }

.recipe-output {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: var(--bg-color); /* Фон для верхньої частини */
}
.item-icon-large-wrapper {
  background-color: rgba(0,0,0,0.2);
  border-radius: 6px;
  padding: 5px;
  flex-shrink: 0;
}
.item-icon-large { width: 64px; height: 64px; image-rendering: pixelated; }
.recipe-name { font-size: 1.5em; margin: 0 0 5px 0; }
.recipe-lore { font-size: 0.9em; opacity: 0.8; line-height: 1.4; }

.recipe-body { padding: 20px; }
.ingredients-list, .effects-list { margin-bottom: 15px; }
.ingredients-list h4, .effects-list h4 { font-size: 1.1em; color: var(--text-color); margin: 0 0 10px 0; }

.ingredient { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.item-icon { width: 32px; height: 32px; image-rendering: pixelated; }
.item-name { font-size: 0.95em; }

.mystery-ingredient .mystery-icon {
  width: 32px; height: 32px; background: var(--border-color); border-radius: 4px; display: flex;
  align-items: center; justify-content: center; font-size: 1.2em; color: var(--secondary-accent);
}

.effects-list ul { list-style: none; padding: 0; margin: 0; }
.effects-list li { margin-bottom: 5px; font-size: 0.95em; }

/* Ефект зачарування */
.enchanted-glint {
  position: relative;
  overflow: hidden;
}
.enchanted-glint::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(110deg, rgba(255,255,255,0) 40%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 60%);
  transform: rotate(25deg);
  animation: enchant-glint 3s infinite linear;
}



/* --- Стилі для списку всіх рецептів --- */
#all-recipes-container h2 {
  font-size: 2.2em;
  color: var(--accent-color);
  margin-top: 50px; /* Відступ від "Рецепту Дня" */
  margin-bottom: 25px;
  text-align: center;
}

.recipe-category-list {
  margin-bottom: 35px;
}

.recipe-category-list .category-title { /* Назва категорії */
  font-size: 1.5em;
  color: var(--text-color);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.recipes-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* 2-3 колонки */
  gap: 12px;
}

.recipe-list-item {
  display: flex;
  align-items: center;
  background-color: var(--card-bg);
  padding: 10px 15px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  transition: background-color 0.2s, border-color 0.2s;
  cursor: pointer; /* Натяк на те, що можна клікнути */
}
.recipe-list-item:hover {
  background-color: var(--border-color);
  border-color: var(--accent-color);
}

.item-icon-wrapper {
  position: relative;
  flex-shrink: 0; /* Щоб іконка не стискалась */
  background-color: var(--bg-color);
  border-radius: 4px;
  padding: 4px;
  margin-right: 15px;
  width: 48px; /* Розмір контейнера */
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-icon-small {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
}

.recipe-list-info {
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Щоб довгі назви не вилазили */
}

.recipe-list-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Додаємо три крапки, якщо назва не влазить */
}

.recipe-list-effect {
  font-size: 0.9em;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ефект зачарування для іконки */
.enchanted-glint-icon {
  position: relative;
  overflow: hidden;
}
.enchanted-glint-icon::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(110deg, rgba(255,255,255,0) 40%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 60%);
  transform: rotate(25deg);
  animation: enchant-glint 3s infinite linear;
}
