/* ============================================================
   Are You OK? · 小米风格致敬站
   主色：小米橙 #FF6900
   ============================================================ */

:root {
  --mi-orange: #ff6900;
  --mi-orange-soft: #ff8c3a;
  --mi-orange-deep: #e05a00;

  --bg: #08080a;
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.72);
  --ink-dim: rgba(255, 255, 255, 0.45);

  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(18, 18, 20, 0.55);
  --glass-strong: rgba(14, 14, 16, 0.78);

  --radius: 18px;
  --radius-sm: 12px;

  --font: "MiSans", "PingFang SC", "HarmonyOS Sans SC", "Helvetica Neue",
    "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  position: relative;
}

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ---------------- 视频舞台 ---------------- */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
}

.stage__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #000;
}

/* 渐变遮罩：上下压暗，中间保留画面 */
.stage__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(8, 8, 10, 0.86) 0%,
      rgba(8, 8, 10, 0.28) 22%,
      rgba(8, 8, 10, 0.12) 46%,
      rgba(8, 8, 10, 0.55) 72%,
      rgba(8, 8, 10, 0.95) 100%
    ),
    radial-gradient(120% 80% at 50% 0%, rgba(255, 105, 0, 0.16), transparent 55%);
}

/* 细微噪点，让画面更有质感 */
.stage__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------- 顶部栏 ---------------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: max(1rem, env(safe-area-inset-top)) clamp(1rem, 3vw, 2rem) 1rem;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--mi-orange);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 20px -6px rgba(255, 105, 0, 0.9);
}

.brand__text {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.topbar__actions {
  display: flex;
  gap: 0.55rem;
}

/* 胶囊按钮 */
.pillbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.3s var(--ease), transform 0.25s var(--ease),
    border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.pillbtn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

.pillbtn:active {
  transform: scale(0.97);
}

.pillbtn--ghost {
  background: transparent;
}

/* 未开声音时高亮，引导点击 */
.pillbtn.is-highlight {
  background: var(--mi-orange);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 26px -8px rgba(255, 105, 0, 0.95);
  animation: breathe 2.6s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 8px 26px -10px rgba(255, 105, 0, 0.85);
  }
  50% {
    box-shadow: 0 10px 34px -6px rgba(255, 105, 0, 1);
  }
}

.pillbtn__icon {
  width: 17px;
  height: 17px;
  flex: none;
}

/* ---------------- 主文案 ---------------- */
.hero {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 clamp(1.2rem, 5vw, 4.5rem);
  padding-bottom: clamp(11rem, 26vh, 15rem);
  pointer-events: none;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(255, 105, 0, 0.45);
  border-radius: 999px;
  background: rgba(255, 105, 0, 0.12);
  color: var(--mi-orange-soft);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mi-orange);
  box-shadow: 0 0 10px 2px rgba(255, 105, 0, 0.9);
  animation: pulseDot 1.8s ease-in-out infinite;
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.82);
  }
}

.hero__title {
  margin: 0;
  font-size: clamp(3rem, 12vw, 7.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-shadow: 0 12px 60px rgba(0, 0, 0, 0.75);
}

.hero__title--accent {
  color: var(--mi-orange);
  text-shadow: 0 0 60px rgba(255, 105, 0, 0.55);
}

.hero__subtitle {
  margin: 1.1rem 0 0;
  font-size: clamp(0.9rem, 2.4vw, 1.1rem);
  color: var(--ink-soft);
  letter-spacing: 0.16em;
  font-weight: 500;
}

/* ---------------- 视频选择器 ---------------- */
.picker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 0.9rem clamp(1rem, 3vw, 2rem)
    calc(0.9rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(6, 6, 8, 0.96), rgba(6, 6, 8, 0.55) 60%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.picker__label {
  margin: 0 0 0.6rem;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.picker__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  max-width: 900px;
}

/* 视频卡片 */
.clip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  text-align: left;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    transform 0.25s var(--ease), box-shadow 0.3s var(--ease);
  overflow: hidden;
}

.clip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.clip__index {
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.clip__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.clip__name {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip__desc {
  font-size: 0.72rem;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip__badge {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  background: var(--mi-orange);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.clip--active {
  background: rgba(255, 105, 0, 0.14);
  border-color: rgba(255, 105, 0, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 105, 0, 0.25) inset,
    0 12px 34px -16px rgba(255, 105, 0, 0.9);
}

.clip--active .clip__index,
.clip--active .clip__name {
  color: var(--mi-orange-soft);
}

/* ---------------- 页脚 ---------------- */
.foot {
  display: none;
}

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(8.5rem + env(safe-area-inset-bottom));
  z-index: 60;
  transform: translate(-50%, 1.5rem);
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 0.82rem;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  white-space: nowrap;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 760px) {
  .hero {
    justify-content: flex-start;
    padding-top: clamp(5.5rem, 18vh, 9rem);
    padding-bottom: 13rem;
  }

  .hero__title {
    font-size: clamp(2.9rem, 15vw, 4.2rem);
  }

  .picker__list {
    display: flex;
    overflow-x: auto;
    gap: 0.55rem;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .picker__list::-webkit-scrollbar {
    display: none;
  }

  .clip {
    flex: 0 0 auto;
    min-width: 11.5rem;
  }

  .brand__text {
    display: none;
  }

  .pillbtn span {
    display: none;
  }

  .pillbtn {
    padding: 0.55rem 0.7rem;
  }

  .pillbtn.is-highlight span {
    display: inline;
  }

  .pillbtn.is-highlight {
    padding: 0.55rem 0.95rem;
  }
}

@media (max-width: 400px) {
  .hero__kicker {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  .clip {
    min-width: 10.5rem;
  }
}

/* 横屏手机 */
@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    justify-content: center;
    padding-top: 4rem;
    padding-bottom: 8rem;
  }

  .hero__title {
    font-size: clamp(2rem, 7vw, 3rem);
  }

  .hero__kicker {
    margin-bottom: 0.5rem;
  }
}

/* ---------------- 减少动效 ---------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
