/* recipes.css - 咖啡食谱页面样式 */
/* CSS变量定义 */
:root {
  --coffee-brown: #4e342e;
  --secondary-color: #d7ccc8;
  --primary-color: #3e2723;
  --accent-cream: #fff8e1;
  --text-color: #2e1d19;
  --hover-color: #8d6e63;
}
/* 页面头部 */
.recipes-hero {
  background: linear-gradient(135deg, #8B4513 0%, #CD853F 50%, #DEB887 100%);
  background-size: 400% 400%;
  animation: gradientShift 10s ease-in-out infinite;
  color: white;
  text-align: center;
  padding: 120px 20px 80px;
  position: relative;
  overflow: hidden;
}

.recipes-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="30" cy="30" r="3" fill="%23ffffff" opacity="0.1"/><circle cx="70" cy="70" r="2" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="20" r="1.5" fill="%23ffffff" opacity="0.1"/></svg>') repeat;
  animation: float 25s linear infinite;
}

.recipes-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: slideInDown 1s ease-out;
}

.recipes-hero p {
  font-size: 1.3rem;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
  animation: slideInUp 1s ease-out 0.3s both;
}

/* 介绍区域 */
.recipes-intro {
  padding: 40px 20px;
  background: linear-gradient(to bottom, #f8f9fa, #ffffff);
  text-align: center;
}

.recipes-intro h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 30px;
  animation: fadeInUp 1s ease-out;
}

.recipes-intro p {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  color: #666;
  animation: fadeInUp 1s ease-out 0.2s both;
}

/* 食谱网格 */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.recipe-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease-out;
  position: relative;
}

.recipe-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.recipe-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.recipe-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
  filter: brightness(0.9) contrast(1.1);
}

.recipe-card:hover .recipe-image img {
  transform: scale(1.1);
  filter: brightness(1.1) contrast(1.2) saturate(1.2);
}

.recipe-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.difficulty-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
}

.difficulty-easy {
  background: #28a745;
}

.difficulty-medium {
  background: #ffc107;
  color: #333;
}

.difficulty-hard {
  background: #dc3545;
}

.recipe-content {
  padding: 30px;
}

.recipe-content h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.recipe-subtitle {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 15px;
  font-style: italic;
}

.recipe-content p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.recipe-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.spec-item {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}

.spec-label {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 5px;
}

.spec-value {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.ingredients-list {
  margin-bottom: 20px;
}

.ingredients-list h4 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

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

.ingredients li {
  padding: 5px 0;
  padding-left: 20px;
  position: relative;
  color: #666;
  line-height: 1.5;
}

.ingredients li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 5px;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.2rem;
}

.try-recipe {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
}

.try-recipe:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
  color: white;
}

/* 特色食谱卡片 */
.recipe-card.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.recipe-card.featured .recipe-image {
  height: auto;
}

.recipe-card.featured .recipe-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 视频教程区域 */
.recipe-video {
  padding: 80px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  text-align: center;
}

.recipe-video h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  animation: fadeInUp 1s ease-out;
}

.recipe-video p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.video-container {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  animation: fadeInUp 1s ease-out 0.4s both;
}

.video-container iframe {
  width: 100%;
  height: 450px;
  border: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .recipes-hero h1 {
    font-size: 2.5rem;
  }
  
  .recipes-hero p {
    font-size: 1.1rem;
  }
  
  .recipes-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .recipe-card.featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  
  .recipe-specs {
    grid-template-columns: 1fr;
  }
  
  .recipes-intro h2,
  .recipe-video h2 {
    font-size: 2rem;
  }
  
  .video-container iframe {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .recipes-hero {
    padding: 100px 15px 60px;
  }
  
  .recipes-hero h1 {
    font-size: 2rem;
  }
  
  .recipe-content {
    padding: 20px;
  }
  
  .recipes-intro,
  .recipes-grid,
  .recipe-video {
    padding: 60px 15px;
  }
  
  .video-container iframe {
    height: 250px;
  }
}

/* 动画 */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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