/* 全局样式 Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700&family=Noto+Sans:wght@400;500;700&display=swap');

:root {
  /* 主色调 - 美食黄绿红渐变系列 */
  --primary-color: #FF8C00; /* 橙黄色 */
  --secondary-color: #4CAF50; /* 绿色 */
  --accent-color: #E53935; /* 红色 */
  --text-color: #333;
  --light-text-color: #fff;
  --background-color: #fffbf0;
  --background-gradient: linear-gradient(135deg, #FFEB3B, #4CAF50, #FF5722);
  --card-gradient: linear-gradient(to bottom right, rgba(255, 235, 59, 0.1), rgba(76, 175, 80, 0.1));
  --border-radius: 12px;
  --box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
}

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

body {
  font-family: 'Noto Sans', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 235, 59, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 50%, rgba(76, 175, 80, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(229, 57, 53, 0.05) 0%, transparent 40%);
  overflow-x: hidden;
  position: relative;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all var(--transition-speed) ease;
}

a:hover {
  color: var(--accent-color);
}

img {
  max-width: 100%;
  height: auto;
}

/* 容器样式 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部样式 */
header {
  background: var(--background-gradient);
  color: var(--light-text-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
  margin-right: 10px;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 导航样式 */
nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin-right: 20px;
}

.nav-menu li {
  margin: 0 10px;
}

.nav-menu a {
  color: var(--light-text-color);
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-speed) ease;
}

.nav-menu a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* 语言切换按钮样式 */
.language-selector {
  display: flex;
  gap: 10px;
  margin-left: 20px;
}

.language-btn {
  padding: 5px 10px;
  border: 1px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

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

/* 汉堡菜单图标 */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--light-text-color);
  border-radius: 3px;
  transition: all var(--transition-speed) ease;
}

/* 移动端导航样式 */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
  }
  
  .menu-toggle {
    display: flex;
    z-index: 1001;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: var(--primary-color);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right var(--transition-speed) ease;
    z-index: 1000;
    margin: 0;
    padding: 50px 0;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-menu li {
    margin: 15px 0;
  }
  
  .language-selector {
    margin: 10px 0;
    justify-content: center;
  }
}

/* 英雄区域样式 */
.hero {
  background: var(--background-gradient);
  color: var(--light-text-color);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.1);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 15px 30px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.hero-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  z-index: -1;
  transition: opacity var(--transition-speed) ease;
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.4);
}

.hero-btn:hover::before {
  opacity: 1;
}

/* 游戏区样式 */
.game-section {
  padding: 5rem 0;
  background-color: #fff;
  box-shadow: var(--box-shadow);
  position: relative;
  overflow: hidden;
}

.game-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(255, 235, 59, 0.05) 0%, transparent 30%),
    radial-gradient(circle at 80% 50%, rgba(76, 175, 80, 0.05) 0%, transparent 30%),
    radial-gradient(circle at 40% 80%, rgba(229, 57, 53, 0.05) 0%, transparent 30%);
  z-index: 1;
}

.game-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 2;
  border: 5px solid white;
  background: linear-gradient(135deg, rgba(255, 235, 59, 0.1), rgba(229, 57, 53, 0.1));
}

.game-container iframe {
  width: 100%;
  border: none;
  display: block;
}

.game-controls {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.control-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 15px;
  margin: 0 5px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-speed) ease;
}

.control-btn:hover {
  background-color: var(--accent-color);
}

/* 特色和介绍区域 */
.features {
  padding: 5rem 0;
  background-color: #fffdf7;
  position: relative;
  overflow: hidden;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FF8C00' fill-opacity='0.05'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10zm10 8c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm40 40c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--primary-color);
  position: relative;
  z-index: 2;
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--background-gradient);
  margin: 15px auto 0;
  border-radius: 2px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 35px;
  box-shadow: var(--box-shadow);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  position: relative;
  z-index: 2;
  background-image: var(--card-gradient);
  border-bottom: 4px solid var(--primary-color);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  background: -webkit-linear-gradient(var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.feature-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.feature-desc {
  color: #666;
}

/* 食谱区域 */
.recipes {
  padding: 5rem 0;
  background-color: #fff;
  position: relative;
  overflow: hidden;
}

.recipes::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 30% 30%, rgba(255, 140, 0, 0.05) 0%, transparent 35%),
    radial-gradient(circle at 70% 70%, rgba(76, 175, 80, 0.05) 0%, transparent 35%);
  z-index: 1;
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  position: relative;
  z-index: 2;
}

.recipe-card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.recipe-image {
  height: 220px;
  width: 100%;
  object-fit: cover;
  transition: transform var(--transition-speed) ease;
}

.recipe-card:hover .recipe-image {
  transform: scale(1.05);
}

.recipe-content {
  padding: 25px;
}

.recipe-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--primary-color);
  font-family: 'Baloo 2', cursive;
  font-weight: 600;
}

.recipe-desc {
  color: #666;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.recipe-btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 8px 15px;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  transition: background-color var(--transition-speed) ease;
}

.recipe-btn:hover {
  background-color: var(--accent-color);
}

/* 食物背景效果 */
.food-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.food-item {
  position: absolute;
  display: inline-block;
  opacity: 0.35;
  filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.2));
  animation: floatFood 20s linear infinite;
  will-change: transform;
  transform-origin: center;
}

@keyframes floatFood {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.35;
  }
  90% {
    opacity: 0.35;
  }
  100% {
    transform: translate(var(--moveX), var(--moveY)) rotate(var(--rotate)) scale(0.8);
    opacity: 0;
  }
}

/* 页脚样式 */
footer {
  background-color: #333;
  color: white;
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background-gradient);
  opacity: 0.95;
  z-index: 1;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  position: relative;
  z-index: 2;
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.footer-section h3:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--accent-color);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition-speed) ease;
}

.footer-links a:hover {
  color: white;
}

.social-icons {
  display: flex;
  margin-top: 15px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin-right: 10px;
  transition: all var(--transition-speed) ease;
}

.social-icon:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* 响应式调整 */
@media (max-width: 992px) {
  .hero h2 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 576px) {
  .hero h2 {
    font-size: 1.8rem;
  }
  
  .hero-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .feature-title {
    font-size: 1.1rem;
  }
}

/* 加载指示器 */
.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fade-out {
  opacity: 0;
}

/* 动态食物背景增强效果 */
.food-background.active {
  opacity: 0.5;
}

.food-item:nth-child(odd) {
  animation-duration: 20s;
}

.food-item:nth-child(even) {
  animation-duration: 25s;
}

.food-item:nth-child(3n) {
  animation-duration: 18s;
} 