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

:root {
  --primary-color: #ff6b35;
  --secondary-color: #f7931e;
  --dark-color: #1a1a1a;
  --light-color: #f5f5f5;
  --white: #ffffff;
  --text-color: #333333;
  --border-color: #e0e0e0;
  --success: #27ae60;
  --accent: #e74c3c;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(255, 107, 53, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.6);
  }
}

/* Header & Navigation */
header {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  animation: fadeInUp 0.5s ease;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

nav a:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  animation: fadeInUp 0.5s ease 0.1s backwards;
}

.search-bar input {
  padding: 0.7rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 25px;
  width: 250px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.2);
  transform: scale(1.02);
}

.search-bar button {
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.search-bar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.search-bar button:active {
  transform: translateY(0);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  animation: fadeIn 0.8s ease;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.btn {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background-color: var(--white);
  color: var(--primary-color);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* Featured Section */
.featured-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--dark-color);
  animation: fadeInUp 0.8s ease;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
  animation: slideInLeft 0.8s ease;
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  animation: fadeIn 0.8s ease;
}

.recipe-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  animation: fadeInUp 0.6s ease;
}

.recipe-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 15px 40px rgba(255, 107, 53, 0.3);
}

.recipe-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  object-fit: cover;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.recipe-card:hover .recipe-card-image {
  transform: scale(1.1) rotate(1deg);
}

.recipe-card-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0), rgba(255, 107, 53, 0.3));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.recipe-card:hover .recipe-card-image::after {
  opacity: 1;
}

.recipe-card-content {
  padding: 1.5rem;
}

.recipe-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
  animation: fadeIn 0.6s ease;
}

.recipe-card p {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.recipe-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recipe-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  animation: fadeIn 0.6s ease;
}

.recipe-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tag {
  display: inline-block;
  background-color: #f0f0f0;
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
  animation: fadeIn 0.6s ease;
}

.tag:hover {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

.recipe-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.view-recipe {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.view-recipe:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.difficulty {
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  background-color: #f0f0f0;
  color: var(--primary-color);
  animation: fadeIn 0.6s ease;
}

.difficulty.easy {
  color: var(--success);
  background-color: #e8f5e9;
}

.difficulty.medium {
  color: #f39c12;
  background-color: #fff3cd;
}

.difficulty.hard {
  color: var(--accent);
  background-color: #fadbd8;
}

/* Content Sections */
.content-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 3rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  animation: fadeInUp 0.8s ease;
}

.content-section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--dark-color);
}

.content-section p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 1.5rem;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.content-card {
  padding: 2rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 10px;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease;
}

.content-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.content-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.content-card p {
  font-size: 0.95rem;
  color: #333;
  margin: 0;
}

/* Recipe Detail Page */
.recipe-detail {
  max-width: 1000px;
  margin: 3rem auto;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  animation: fadeInUp 0.8s ease;
}

.recipe-detail-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: fadeIn 0.8s ease;
}

.recipe-detail h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
  animation: fadeInUp 0.8s ease;
}

.recipe-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 10px;
}

.meta-item {
  text-align: center;
  animation: fadeInUp 0.6s ease;
}

.meta-item h3 {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.meta-item p {
  font-size: 0.95rem;
  color: #555;
}

.recipe-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.ingredients-section, .instructions-section {
  animation: fadeInUp 0.8s ease;
}

.ingredients-section h2, .instructions-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.ingredients-list {
  list-style: none;
}

.ingredients-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease;
}

.ingredients-list li:hover {
  transform: translateX(10px);
  color: var(--primary-color);
  font-weight: 500;
}

.instructions-list {
  list-style: none;
  counter-reset: step-counter;
}

.instructions-list li {
  counter-increment: step-counter;
  padding: 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-left: 4px solid var(--primary-color);
  border-radius: 5px;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease;
}

.instructions-list li:hover {
  transform: translateX(10px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.instructions-list li::before {
  content: counter(step-counter);
  display: inline-block;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 30px;
  margin-right: 1rem;
  font-weight: bold;
}

.nutrition-info {
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 10px;
  margin: 2rem 0;
  animation: fadeInUp 0.8s ease;
}

.nutrition-info h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.nutrition-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease;
}

.nutrition-item:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}

.nutrition-value {
  font-size: 1.5rem;
  font-weight: bold;
  display: block;
}

.nutrition-label {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--dark-color), #2c3e50);
  color: white;
  padding: 3rem 2rem;
  margin-top: 4rem;
  animation: fadeIn 0.8s ease;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  animation: fadeInUp 0.6s ease;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: #bbb;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-section a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #bbb;
  animation: fadeIn 0.8s ease 0.2s backwards;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .recipes-grid {
    grid-template-columns: 1fr;
  }

  .recipe-sections {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .header-container {
    padding: 0.8rem 1rem;
  }

  .search-bar input {
    width: 150px;
  }

  nav ul {
    gap: 1rem;
  }

  .recipe-detail-meta {
    grid-template-columns: repeat(2, 1fr);
  }

  .nutrition-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .header-container {
    padding: 0.5rem 1rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  .search-bar {
    width: 100%;
    flex-direction: column;
  }

  .search-bar input {
    width: 100%;
  }

  .search-bar button {
    width: 100%;
  }

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

  .nutrition-grid {
    grid-template-columns: 1fr;
  }
}
