/* ==========================================================================
   食光 SHIGUANG · 视频落地页样式
   设计基调：暗色影院感 + 暖金点缀，让视频本身成为主体
   ========================================================================== */

/* ------------------------------------------------------------- 1. 基础 */
:root {
  --bg: #0a0806;
  --panel: #16110d;
  --panel-2: #0d0a08;
  --cream: #f6efe3;
  --muted: rgba(246, 239, 227, 0.66);
  --muted-2: rgba(246, 239, 227, 0.42);
  --gold: #e0b262;
  --gold-soft: #f0cf94;
  --chili: #c9482f;
  --line: rgba(246, 239, 227, 0.14);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --serif: "Cormorant Garamond", "Songti SC", "STSong", "SimSun", "Noto Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body { overflow: hidden; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img, video { display: block; }

::selection { background: var(--gold); color: #1a1109; }

/* ------------------------------------------------------------ 2. 竖滑容器 */
.feed {
  position: relative;
  height: 100dvh;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.feed::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  isolation: isolate;
  background: #060504;
}

/* 视频层 */
.slide-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease;
  opacity: 0;
}
.slide-video.is-ready { opacity: 1; }

/* 氛围遮罩：上暗下更暗，保证文字可读 */
.slide-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 5, 4, 0.72) 0%, rgba(6, 5, 4, 0.12) 22%, rgba(6, 5, 4, 0) 40%,
      rgba(6, 5, 4, 0.42) 62%, rgba(6, 5, 4, 0.86) 88%, rgba(6, 5, 4, 0.96) 100%),
    radial-gradient(120% 80% at 50% 30%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.35) 100%);
}

/* 细颗粒质感（CSS 渐变实现，不额外加载图片） */
.slide-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: soft-light;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px);
}

/* --------------------------------------------------- 3. 幻灯片文字内容 */
.slide-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(112px + var(--safe-b));
  z-index: 4;
  padding: 0 22px;
  max-width: 680px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 500;
}
.eyebrow .rule {
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(224, 178, 98, 0));
}
.eyebrow .count {
  color: var(--muted-2);
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}

.dish-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 7.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0.005em;
  margin: 0 0 14px;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.55);
}

.dish-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(0.98rem, 3.6vw, 1.16rem);
  line-height: 1.55;
  color: rgba(246, 239, 227, 0.88);
  margin: 0 0 16px;
  max-width: 34ch;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.5);
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
  border: 1px solid rgba(246, 239, 227, 0.24);
  color: rgba(246, 239, 227, 0.8);
  background: rgba(10, 8, 6, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tag--hot { border-color: rgba(201, 72, 47, 0.5); color: #f0a793; }

/* 入场动画：仅当前屏播放 */
.slide-content > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.slide.is-active .slide-content > * { opacity: 1; transform: none; }
.slide.is-active .slide-content > *:nth-child(1) { transition-delay: 0.05s; }
.slide.is-active .slide-content > *:nth-child(2) { transition-delay: 0.12s; }
.slide.is-active .slide-content > *:nth-child(3) { transition-delay: 0.2s; }
.slide.is-active .slide-content > *:nth-child(4) { transition-delay: 0.28s; }

/* ------------------------------------------------------- 4. 右侧操作栏 */
.rail {
  position: absolute;
  right: 14px;
  bottom: calc(178px + var(--safe-b));
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.rail-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: rgba(12, 10, 8, 0.42);
  border: 1px solid rgba(246, 239, 227, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.35s var(--ease), background 0.25s, border-color 0.25s;
}
.rail-btn:active { transform: scale(0.9); }
.rail-btn svg { width: 20px; height: 20px; }
.rail-btn.is-on { color: #1a1109; background: var(--gold); border-color: var(--gold); }
.rail-btn .off-line {
  position: absolute;
  width: 22px;
  height: 1.5px;
  background: var(--cream);
  transform: rotate(-45deg);
  border-radius: 2px;
  pointer-events: none;
}
.rail-btn { position: relative; }
.rail-btn.is-on .off-line { display: none; }

/* 带声音的自动播放被拦截时：金色呼吸环，提示点一下开声 */
.rail-btn.is-hint::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid rgba(224, 178, 98, 0.85);
  animation: hintRing 1.7s ease-out infinite;
  pointer-events: none;
}
@keyframes hintRing {
  0% { transform: scale(0.86); opacity: 0.9; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* --------------------------------------------------------- 5. 行动按钮 */
.slide-cta {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: calc(40px + var(--safe-b));
  z-index: 5;
  display: flex;
  gap: 10px;
  max-width: 268px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 22px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.25s, border-color 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--gold {
  flex: 1.25;
  color: #221507;
  background: linear-gradient(160deg, var(--gold-soft), var(--gold) 55%, #c9944a);
  box-shadow: 0 10px 30px -10px rgba(224, 178, 98, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn--gold:hover { box-shadow: 0 14px 38px -10px rgba(224, 178, 98, 0.75); }

.btn--ghost {
  flex: 1;
  color: var(--cream);
  border: 1px solid rgba(246, 239, 227, 0.3);
  background: rgba(10, 8, 6, 0.34);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.btn--ghost:hover { border-color: rgba(224, 178, 98, 0.6); }

/* --------------------------------------------------------- 6. 顶部导航 */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + var(--safe-t)) 18px 14px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 5, 4, 0.6), rgba(6, 5, 4, 0));
}
.topbar > * { pointer-events: auto; }

.brand {
  display: flex;
  align-items: baseline;
  gap: 9px;
  text-decoration: none;
  color: var(--cream);
}
.brand__cn {
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.brand__en {
  font-size: 0.6rem;
  letter-spacing: 0.34em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 500;
}

.topbar__actions { display: flex; align-items: center; gap: 8px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--cream);
  border: 1px solid rgba(246, 239, 227, 0.2);
  background: rgba(12, 10, 8, 0.38);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.25s, background 0.25s;
}
.pill:hover { border-color: rgba(224, 178, 98, 0.55); }
.pill svg { width: 14px; height: 14px; }

/* --------------------------------------------------- 7. 进度条与滑动提示 */
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  z-index: 6;
  background: rgba(246, 239, 227, 0.12);
}
.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  box-shadow: 0 0 12px rgba(224, 178, 98, 0.7);
}

.swipe-hint {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.swipe-hint.is-hidden { opacity: 0; transform: translate(-50%, 12px); }
.swipe-hint svg { width: 16px; height: 16px; animation: nudge 1.9s var(--ease) infinite; }
@keyframes nudge {
  0%, 100% { transform: translateY(2px); opacity: 0.55; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* ------------------------------------------------------------- 8. 弹层 */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 3, 2, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.scrim.is-open { opacity: 1; visibility: visible; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  transition: visibility 0.5s;
}
.sheet.is-open { visibility: visible; }

.sheet__panel {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #191310 0%, var(--panel-2) 100%);
  border: 1px solid rgba(224, 178, 98, 0.16);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -30px 80px -20px rgba(0, 0, 0, 0.85);
  transform: translateY(100%);
  transition: transform 0.55s var(--ease);
  overflow: hidden;
}
.sheet.is-open .sheet__panel { transform: translateY(0); }

.sheet__handle {
  width: 44px;
  height: 4px;
  border-radius: 4px;
  background: rgba(246, 239, 227, 0.22);
  margin: 10px auto 0;
  flex: none;
}

.sheet__head {
  flex: none;
  padding: 16px 22px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.sheet__title {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: 0.01em;
}
.sheet__sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.x-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--cream);
  flex: none;
  transition: border-color 0.25s, background 0.25s;
}
.x-btn:hover { border-color: rgba(224, 178, 98, 0.5); background: rgba(224, 178, 98, 0.08); }
.x-btn svg { width: 16px; height: 16px; }

.sheet__scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 8px 22px calc(18px + var(--safe-b));
}

/* ------------------------------------------------------- 9. 菜单列表项 */
.menu-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(246, 239, 227, 0.09);
  cursor: pointer;
  transition: opacity 0.25s;
}
.menu-item:last-of-type { border-bottom: 0; }
.menu-item:hover { opacity: 0.82; }

.menu-item__thumb {
  width: 92px;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(246, 239, 227, 0.12);
  background: #1d1712;
}

.menu-item__body { min-width: 0; }
.menu-item__region {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 5px;
}
.menu-item__name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 5px;
}
.menu-item__desc {
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.menu-foot__note {
  font-size: 0.7rem;
  color: var(--muted-2);
  line-height: 1.6;
  margin: 0 0 14px;
}

/* ------------------------------------------------------ 10. 语言选择层 */
.pill__code {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.12em;
}

.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 6px 0 10px;
}
.lang-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(246, 239, 227, 0.12);
  background: rgba(246, 239, 227, 0.03);
  font-size: 0.86rem;
  text-align: left;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.lang-opt:hover { border-color: rgba(224, 178, 98, 0.45); }
.lang-opt:active { transform: scale(0.98); }
.lang-opt__flag { font-size: 1.15rem; line-height: 1; }
.lang-opt__code {
  margin-left: auto;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--muted-2);
  text-transform: uppercase;
}
.lang-opt.is-active {
  border-color: var(--gold);
  background: rgba(224, 178, 98, 0.12);
  color: #fff;
}
.lang-opt.is-active .lang-opt__code { color: var(--gold); }

/* ------------------------------------------------------------ 12. 提示条 */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-b));
  transform: translate(-50%, 16px);
  z-index: 80;
  padding: 11px 18px;
  border-radius: 100px;
  background: rgba(20, 15, 11, 0.94);
  border: 1px solid rgba(224, 178, 98, 0.3);
  color: var(--cream);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.4s var(--ease), visibility 0.3s;
  white-space: nowrap;
}
.toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ------------------------------------------------------------- 13. 加载 */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: opacity 0.8s ease, visibility 0.8s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__inner { text-align: center; }
.loader__cn {
  font-family: var(--serif);
  font-size: 2.6rem;
  letter-spacing: 0.3em;
  margin-bottom: 12px;
  text-indent: 0.3em;
}
.loader__bar {
  width: 120px;
  height: 1.5px;
  margin: 0 auto;
  background: rgba(246, 239, 227, 0.14);
  overflow: hidden;
}
.loader__bar i {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--gold);
  animation: load 1.1s var(--ease) infinite;
}
@keyframes load {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

/* --------------------------------------------------- 14. iOS 播放兜底 */
.play-backdrop {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  place-items: center;
  background: rgba(6, 5, 4, 0.5);
}
.slide.is-blocked .play-backdrop { display: grid; }
.play-backdrop button {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(246, 239, 227, 0.14);
  border: 1px solid rgba(246, 239, 227, 0.34);
  backdrop-filter: blur(10px);
  color: #fff;
}
.play-backdrop svg { width: 26px; height: 26px; margin-left: 3px; }

/* --------------------------------------------------------- 15. 响应式 */
@media (min-width: 720px) {
  .slide-content { padding: 0 48px; bottom: calc(126px + var(--safe-b)); }
  .slide-cta { left: 48px; right: auto; bottom: calc(48px + var(--safe-b)); }
  .rail { right: 30px; bottom: calc(190px + var(--safe-b)); }
  .dish-name { font-size: clamp(2.6rem, 4.2vw, 3.9rem); }
  .dish-caption { font-size: 1.18rem; }
  .topbar { padding: calc(20px + var(--safe-t)) 40px 20px; }
  .brand__cn { font-size: 1.6rem; }
  .swipe-hint { bottom: calc(110px + var(--safe-b)); }
}

@media (min-width: 1100px) {
  .slide-content { max-width: 620px; }
  .dish-name { font-size: 4.1rem; }
}

/* 桌面端横向空间大，右侧加一层柔光让构图更稳 */
@media (min-width: 900px) {
  .slide-scrim {
    background:
      linear-gradient(180deg, rgba(6, 5, 4, 0.72) 0%, rgba(6, 5, 4, 0.1) 22%, rgba(6, 5, 4, 0) 38%,
        rgba(6, 5, 4, 0.5) 60%, rgba(6, 5, 4, 0.9) 88%, rgba(6, 5, 4, 0.97) 100%),
      linear-gradient(90deg, rgba(6, 5, 4, 0.55) 0%, rgba(6, 5, 4, 0) 55%);
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .swipe-hint svg { animation: none; }
}
