/* =========================
   COLOUR PALETTE
========================= */

:root {
  --burgundy: #7a1f3d;
  --purple: #6b5ca5;
  --light-blue: #a8d8f0;
  --bg: #faf7fb;
  --card-bg: #ffffff;
  --text: #2b2b2b;
}

html {
  box-sizing: border-box;
  font-size: 16px;
}

*, *::before, *::after {
  box-sizing: inherit;
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }
}

@media (max-width: 600px) {
  header {
    padding: 1.8rem 1rem 1.4rem;
  }

  header h1 {
    font-size: 1.6rem;
  }

  header p {
    font-size: 0.95rem;
  }
}

@media (max-width: 600px) {
  #controls {
    padding: 1rem;
  }

  #tagFilters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  #tagFilters button {
    margin-right: 0;
  }
}
@media (max-width: 480px) {
  #recipeGrid {
    grid-template-columns: 1fr;
    padding: 1.2rem;
  }
}
@media (max-width: 480px) {
  .recipe-tile {
    padding: 1.2rem;
  }

  .recipe-tile h3 {
    font-size: 1.1rem;
  }
}
@media (max-width: 600px) {
  .modal-content {
    width: 95%;
    max-height: 85vh;
    padding: 1.5rem;
    border-radius: 18px;
  }

  #closeModal {
    font-size: 1.3rem;
  }
}
@media (max-width: 600px) {
  .form-list li {
    padding: 0.9rem 1rem;
  }

  .primary-btn {
    width: 100%;
    text-align: center;
  }
}
button,
input,
textarea,
select {
  touch-action: manipulation;
}



/* =========================
   BASE
========================= */

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

/* =========================
   HEADER
========================= */

header {
  background: linear-gradient(135deg, var(--burgundy), var(--purple));
  color: white;
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  position: relative;
}

header::after {
  content: "♥ ♥ ♥";
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.5;
}

.admin-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}

.admin-link:hover {
  color: white;
}

/* =========================
   CONTROLS (SEARCH / TAGS)
========================= */

#controls {
  padding: 1.5rem 2rem 0;
}

#searchInput {
  width: 100%;
  max-width: 420px;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
}

#tagFilters button {
  background: var(--light-blue);
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-right: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
}

#tagFilters button.active {
  background: var(--burgundy);
  color: white;
}

/* =========================
   RECIPE GRID
========================= */

#recipeGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.recipe-tile {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 1.4rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recipe-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.recipe-tag {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.25rem 0.7rem;
  background: var(--light-blue);
  border-radius: 999px;
  font-size: 0.75rem;
  color: #033;
}

/* =========================
   MODAL
========================= */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 22px;
  padding: 2rem;
  position: relative;
}

#closeModal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* =========================
   ADMIN DASHBOARD
========================= */

.admin-form {
  margin-top: 2rem;
}

.form-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.form-list li {
  background: white;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.form-list label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--burgundy);
}

.form-list input,
.form-list textarea,
.form-list select {
  width: 100%;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-family: inherit;
}

/* =========================
   BUTTONS
========================= */

button {
  font-family: inherit;
}

.primary-btn {
  background: linear-gradient(135deg, var(--burgundy), var(--purple));
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.8rem;
  font-size: 1rem;
  cursor: pointer;
}

.primary-btn:hover {
  opacity: 0.9;
}

/* =========================
   HEART HOVER ANIMATION
========================= */

.recipe-tile {
  position: relative;
  overflow: hidden;
}

.recipe-tile::after {
  content: "♥";
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 1.4rem;
  color: rgba(122, 31, 61, 0.35); /* burgundy */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.recipe-tile:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   VALENTINE BANNER
========================= */

.valentine-banner {
  background: linear-gradient(135deg, var(--light-blue), #f6c1d1);
  color: #5a1230;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.hidden {
  display: none;
}
