/* ===== 全局重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #e85d04;
  --primary-dark: #c44c03;
  --accent: #ffba08;
  --bg: #fafafa;
  --bg-dark: #1a1a2e;
  --text: #222;
  --text-muted: #666;
  --card-bg: #fff;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,.10);
  --shadow-hover: 0 12px 40px rgba(232,93,4,.22);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== 导航 ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #f0e9e0;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); letter-spacing: -.5px; }

.nav a {
  margin-left: 28px; text-decoration: none;
  color: var(--text); font-weight: 500; font-size: .95rem;
  transition: color .2s;
}
.nav a:hover { color: var(--primary); }

.menu-btn {
  display: none; background: none; border: none;
  font-size: 1.4rem; cursor: pointer; color: var(--text);
}

.nav-mobile {
  display: none; flex-direction: column;
  background: #fff; padding: 12px 20px 16px;
  border-top: 1px solid #f0e9e0;
}
.nav-mobile a {
  padding: 10px 0; text-decoration: none;
  color: var(--text); font-weight: 500; border-bottom: 1px solid #f5f0eb;
}
.nav-mobile.open { display: flex; }

/* ===== 英雄区 ===== */
.hero {
  min-height: 560px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; text-align: center;
  padding: 80px 20px 60px;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(232,93,4,.25) 0%, transparent 70%);
}

.hero-content { position: relative; z-index: 2; }
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  color: #fff; font-weight: 900; line-height: 1.2;
  margin-bottom: 20px;
}
.highlight { color: var(--accent); }
.hero-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #c9d1d9; max-width: 560px; margin: 0 auto 36px;
}

.btn-primary {
  display: inline-block;
  background: var(--primary); color: #fff;
  padding: 14px 40px; border-radius: 50px;
  text-decoration: none; font-weight: 700; font-size: 1.05rem;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(232,93,4,.4);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(232,93,4,.5);
}

.hero-food-icons {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
}

.float-icon {
  position: absolute;
  font-size: 2.5rem;
  animation: float 4s ease-in-out infinite;
  animation-delay: var(--delay);
  opacity: .7;
}

.float-icon:nth-child(1) { top: 15%; left: 8%; }
.float-icon:nth-child(2) { top: 20%; right: 10%; }
.float-icon:nth-child(3) { bottom: 25%; left: 12%; }
.float-icon:nth-child(4) { bottom: 15%; right: 8%; }
.float-icon:nth-child(5) { top: 50%; left: 5%; }
.float-icon:nth-child(6) { top: 40%; right: 6%; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}

/* ===== 搜索栏 ===== */
.search-bar {
  background: var(--primary);
  padding: 24px 0;
}
.search-inner {
  display: flex; max-width: 660px; margin: 0 auto;
  background: #fff; border-radius: 50px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.search-inner input {
  flex: 1; border: none; outline: none;
  padding: 14px 24px; font-size: 1rem; color: var(--text);
}
.btn-search {
  background: var(--accent); border: none; cursor: pointer;
  padding: 14px 24px; font-size: .95rem; font-weight: 700;
  color: #222; transition: background .2s; white-space: nowrap;
}
.btn-search:hover { background: #f0a800; }
.btn-reset {
  display: none;
  background: #f0e9e0; border: none; cursor: pointer;
  padding: 14px 20px; font-size: .9rem; font-weight: 700;
  color: #888; transition: background .2s, color .2s; white-space: nowrap;
}
.btn-reset.visible { display: block; }
.btn-reset:hover { background: #e8ddd4; color: var(--primary); }

/* ===== 吸顶筛选栏 ===== */
.filter-bar {
  position: sticky;
  top: 64px; /* 导航栏高度 */
  z-index: 90;
  background: #fff;
  border-bottom: 1px solid #f0e9e0;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.filter-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; overflow-x: auto;
  scrollbar-width: none;
}
.filter-inner::-webkit-scrollbar { display: none; }
.filter-label {
  font-size: .85rem; color: #999; font-weight: 600;
  white-space: nowrap; flex-shrink: 0;
}
.filter-tabs {
  display: flex; gap: 8px; flex-shrink: 0;
}
.ftab {
  display: flex; align-items: center; gap: 5px;
  background: #f5f0eb; color: #555;
  border: 1.5px solid transparent;
  border-radius: 50px; padding: 7px 16px;
  cursor: pointer; font-size: .88rem; font-weight: 600;
  white-space: nowrap; transition: all .18s;
}
.ftab-icon { font-size: 1rem; }
.ftab:hover { background: #fff3e0; color: var(--primary); border-color: #ffd4a8; }
.ftab.active {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(232,93,4,.3);
}
.filter-result-count {
  margin-left: auto; white-space: nowrap; flex-shrink: 0;
  font-size: .82rem; color: #aaa; font-weight: 500;
  padding-right: 4px;
}

/* ===== 通用区块 ===== */
.section { padding: 80px 0; }
.section-dark {
  background: linear-gradient(135deg, #16213e, #1a1a2e);
  color: #e8e8e8;
}
.section-dark .section-sub { color: #9ab; }

.section-title {
  text-align: center; font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800; margin-bottom: 10px;
}
.section-dark .section-title { color: #fff; }
.section-sub {
  text-align: center; color: var(--text-muted);
  font-size: 1.05rem; margin-bottom: 48px;
}

/* ===== 食品卡片网格 ===== */
.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.food-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
}
.food-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

.food-card-img {
  width: 100%; height: 200px;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.food-card-body { padding: 18px 20px 22px; }
.food-card-tag {
  display: inline-block;
  background: #fff3e0; color: var(--primary);
  font-size: .75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .5px;
}
.food-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.food-card p { color: var(--text-muted); font-size: .9rem; line-height: 1.5; }
.food-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0e9e0;
}
.food-card-rating { color: var(--accent); font-weight: 700; font-size: .9rem; }
.food-card-btn {
  background: var(--primary); color: #fff;
  border: none; border-radius: 20px;
  padding: 6px 16px; font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: background .2s;
}
.food-card-btn:hover { background: var(--primary-dark); }

/* 深色背景下的卡片 */
.section-dark .food-card { background: #0d1b2a; color: #e8e8e8; }
.section-dark .food-card p { color: #9ab; }
.section-dark .food-card-footer { border-color: #1e3a5f; }

/* ===== 空状态提示 ===== */
.empty-tip {
  grid-column: 1 / -1; text-align: center;
  padding: 60px 0; color: #bbb; font-size: 1.1rem;
}

/* ===== 烹饪小贴士 ===== */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.tip-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
  transition: transform .2s, box-shadow .2s;
}
.tip-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.tip-icon { font-size: 2.4rem; margin-bottom: 14px; }
.tip-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; color: var(--primary); }
.tip-card p { color: var(--text-muted); font-size: .92rem; line-height: 1.6; }

/* ===== 关于我们 ===== */
.about-inner {
  display: flex; align-items: center; gap: 60px; flex-wrap: wrap;
}
.about-text { flex: 1; min-width: 260px; }
.about-text h2 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 20px; }
.about-text p { color: #9ab; margin-bottom: 12px; line-height: 1.7; }

.about-stats {
  display: flex; gap: 32px; flex-wrap: wrap;
}
.stat {
  text-align: center;
  background: rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.stat-num { display: block; font-size: 2rem; font-weight: 900; color: var(--accent); }
.stat span:last-child { font-size: .9rem; color: #9ab; }

/* ===== 页脚 ===== */
.footer {
  background: #111; color: #666;
  text-align: center; padding: 24px 0;
  font-size: .9rem;
}

/* ===== 弹窗 ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.6); z-index: 200;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }

.modal {
  background: #fff; border-radius: 20px;
  max-width: 520px; width: 90%; max-height: 85vh;
  overflow-y: auto; padding: 36px;
  position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: slideUp .3s ease;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: #f5f0eb; border: none; width: 34px; height: 34px;
  border-radius: 50%; cursor: pointer; font-size: 1rem;
  transition: background .2s;
}
.modal-close:hover { background: #e8e0d5; }

.modal-emoji { font-size: 5rem; margin-bottom: 16px; }
.modal h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; }
.modal-tag {
  display: inline-block; background: #fff3e0; color: var(--primary);
  font-size: .8rem; font-weight: 700; padding: 4px 12px;
  border-radius: 20px; margin-bottom: 16px;
}
.modal p { color: var(--text-muted); line-height: 1.7; margin-bottom: 12px; }
.modal-detail-list { list-style: none; margin: 16px 0; }
.modal-detail-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #f5f0eb;
  font-size: .95rem;
}
.modal-detail-list li:last-child { border: none; }

/* ===== 隐藏动画 ===== */
.hidden { display: none !important; }
.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .nav { display: none; }
  .menu-btn { display: block; }
  .about-inner { flex-direction: column; gap: 32px; }
  .about-stats { justify-content: center; }
  .hero { min-height: 420px; }
  .float-icon { font-size: 1.8rem; }
}
