/* ============================================================
   智能，为进化而设计 —— 落地页
   单视口全屏视频背景
   ============================================================ */

@font-face {
  font-family: "Geist Pixel Circle";
  src: url("fonts/GeistPixel-Circle.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #8e8e8e;
  --nav-text: #2e2e2e;
  --pill-dark: #28282a;
  --sign-in-text: #c8c8c8;
  --nav-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "BubbledotICG-FinePos", "Geist Pixel Circle", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}

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

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- 背景视频 ---------- */

.bg {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}

/* 整屏均匀暗化：无边界暗角，温和提升白字与视频的对比度 */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 1;
}

/* ---------- 页面容器 ---------- */

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  padding: clamp(16px, 2.4vh, 28px) clamp(14px, 3vw, 32px);
  overflow: hidden;
}

/* v58.2 三套完全独立：挂载点不占盒，让内部视图像 .page 直接子级参与 flex 布局 */
#views-host {
  display: contents;
}

/* ---------- 通用入场动画 ---------- */

.anim {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  filter: blur(6px);
  animation: reveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* 头部用 slideDown，CTA 用 revealPulse，标题不做入场动画 */
.header.anim {
  filter: none;
  animation: slideDown 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.headline.anim {
  opacity: 1;
  transform: none;
  filter: none;
  animation: none;
}

.cta.anim {
  opacity: 1;
  transform: none;
  filter: none;
  animation: revealPulse 0.85s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--d, 0.4s);
}

@keyframes revealPulse {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
    filter: blur(6px);
  }
  55% {
    opacity: 1;
    transform: translateY(-3px) scale(1.03);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ---------- 页头 ---------- */

.header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.8vw, 28px);
  max-width: 720px;
  width: 100%;
  z-index: 1;
}

.logo {
  width: clamp(40px, 4.4vw, 46px);
  height: clamp(40px, 4.4vw, 46px);
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--nav-shadow);
  display: grid;
  place-items: center;
  transition: transform 0.35s ease;
}

.logo:hover {
  transform: scale(1.04);
}

.logo img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.nav {
  flex: 1;
  max-width: 430px;
  height: clamp(44px, 5.2vw, 48px);
  background: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  box-shadow: var(--nav-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 0 clamp(10px, 1.4vw, 16px);
  height: 100%;
  display: inline-flex;
  align-items: center;
  color: var(--nav-text);
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: -0.01em;
  opacity: 0.5;
  transition: opacity 0.25s ease;
}

.nav-link:hover {
  opacity: 0.75;
}

.nav-link.active {
  opacity: 1;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #000;
  transform: translateX(-50%);
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}

.sign-in {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: clamp(44px, 5.2vw, 48px);
  padding: 0 clamp(16px, 2vw, 22px);
  background: var(--pill-dark);
  color: var(--sign-in-text);
  border-radius: 999px;
  box-shadow: var(--nav-shadow);
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: -0.01em;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.sign-in:hover {
  background: #323234;
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- 移动端汉堡按钮（桌面端隐藏） ---------- */

.burger {
  display: none;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: var(--pill-dark);
  place-items: center;
  z-index: 1;
  transition: background 0.3s ease;
}

.burger .bar {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #fff;
  border-radius: 2px;
  margin: 3.5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.burger.open {
  background: #fff;
}

.burger.open .bar {
  background: #000;
}

.burger.open .bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.burger.open .bar:nth-child(2) {
  opacity: 0;
}

.burger.open .bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------- 主视觉区 ---------- */

.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 900px;
  width: 100%;
  z-index: 1;
}

/* 大标题 */

.headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 400;
  font-size: clamp(28px, 6.2vw, 80px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
}

.headline .line {
  display: block;
  opacity: 0;
  transform: translateY(14px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 2px 14px rgba(0, 0, 0, 0.5), 0 0 42px rgba(0, 0, 0, 0.35);
  animation: headlineFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.line1 {
  animation-delay: 0.12s;
}

.line2 {
  animation-delay: 0.3s;
}

@keyframes headlineFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 副标题 */

.subhead {
  max-width: min(500px, 92%);
  margin: clamp(16px, 2.5vh, 24px) auto clamp(20px, 3vh, 28px);
  font-size: clamp(calc(13.5px + 2pt), calc(1.55vw + 2pt), calc(16.5px + 2pt));
  color: #d0d0d0;
  opacity: 0.8;
  font-weight: 400;
  line-height: 1.55;
}

/* 行动按钮 */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: clamp(13.5px, 1.5vw, 14.5px);
  letter-spacing: -0.01em;
  padding: clamp(11px, 1.6vh, 13px) clamp(22px, 3vw, 28px);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 22px rgba(255, 255, 255, 0.32), 0 0 44px rgba(255, 255, 255, 0.12);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0 30px rgba(255, 255, 255, 0.45), 0 0 60px rgba(255, 255, 255, 0.18);
}

/* ---------- 统计栏 ---------- */

.stats {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 3vw, 32px);
  max-width: 920px;
  width: 100%;
  z-index: 1;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.stat-icon {
  font-family: var(--font-display);
  color: var(--text);
  font-size: clamp(22px, 3vw, 33px);
  line-height: 1;
}

.stat-value {
  font-family: var(--font-sans);
  color: var(--text);
  font-weight: 500;
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  color: var(--muted);
  font-size: clamp(11px, 1.2vw, 12.5px);
}

/* ---------- 移动端遮罩 + 菜单 ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 50;
  animation: overlayIn 0.28s ease;
}

.overlay[hidden] {
  display: none;
}

@keyframes overlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.mobile-menu {
  position: fixed;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  width: min(340px, calc(100vw - 32px));
  background: #fff;
  border-radius: 28px;
  padding: 22px 18px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: menuIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu[hidden] {
  display: none;
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translate(-50%, -12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.m-link {
  position: relative;
  display: block;
  text-align: center;
  padding: 12px 8px;
  border-radius: 14px;
  color: var(--nav-text);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  opacity: 0;
  animation: linkIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.m-link:nth-child(1) {
  animation-delay: 0.05s;
}

.m-link:nth-child(2) {
  animation-delay: 0.1s;
}

.m-link:nth-child(3) {
  animation-delay: 0.15s;
}

.m-link:nth-child(4) {
  animation-delay: 0.2s;
}

.m-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #000;
  transform: translateX(-50%);
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}

.m-sign-in {
  display: block;
  text-align: center;
  margin-top: 10px;
  padding: 13px;
  border-radius: 999px;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  opacity: 0;
  animation: linkIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.25s;
}

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

/* ---------- 响应式 ---------- */

@media (max-width: 720px) {
  .nav,
  .sign-in {
    display: none;
  }

  .header {
    justify-content: space-between;
  }

  .logo {
    width: 48px;
    height: 48px;
  }

  .burger {
    display: grid;
  }

  .headline {
    line-height: 1.05;
    letter-spacing: -0.08em;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(18px, 3vw, 24px);
  }
}

@media (max-width: 420px) {
  .headline {
    line-height: 1.04;
    letter-spacing: -0.09em;
  }
}

@media (max-height: 700px) {
  .subhead {
    margin-top: 12px;
    margin-bottom: 16px;
  }

  .stat {
    gap: 2px;
  }
}

/* ---------- 减弱动态效果 ---------- */

@media (prefers-reduced-motion: reduce) {
  .anim,
  .header,
  .headline .line,
  .cta,
  .overlay,
  .mobile-menu,
  .m-link,
  .m-sign-in {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ---------- 登录 / 注册 弹窗（auth.html 合并而来） ---------- */

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-modal[hidden] {
  display: none;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: overlayIn 0.28s ease;
}

.auth-card {
  position: relative;
  width: min(400px, 100%);
  background: rgba(20, 20, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 30px 28px 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  animation: authIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

@keyframes authIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.25s ease, transform 0.25s ease;
}

.auth-close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(90deg);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.auth-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  margin-bottom: 22px;
}

.auth-tab {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  font-size: 14px;
  padding: 9px;
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease;
}

.auth-tab.active {
  background: #fff;
  color: #000;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form[hidden] {
  display: none;
}

.auth-form label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

.auth-form input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.auth-form input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.09);
}

.auth-error {
  font-size: 13px;
  color: #ff7a7a;
  margin: -4px 0;
}

.auth-error[hidden] {
  display: none;
}

.auth-note {
  font-size: 13px;
  color: #7ee2a8;
  text-align: center;
  margin-top: 14px;
}

.auth-note[hidden] {
  display: none;
}

.auth-submit {
  margin-top: 4px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, background 0.25s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  background: #f0f0f0;
}

.auth-submit:active {
  transform: translateY(0) scale(0.98);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .auth-card,
  .auth-backdrop {
    animation: none !important;
  }
}

/* ---------- 登录后：账号名 + 用户面板 ---------- */

.sign-caret {
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.7;
}

.user-panel {
  position: fixed;
  top: 88px;
  right: 16px;
  width: min(320px, calc(100vw - 32px));
  z-index: 90;
  background: rgba(20, 20, 22, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  animation: authIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.user-panel[hidden] {
  display: none;
}

.user-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  color: #000;
  display: grid;
  place-items: center;
}

.user-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.user-tag {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.user-placeholder {
  margin: 16px 0 14px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  text-align: center;
}

.user-logout {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.25s ease, color 0.25s ease;
}

.user-logout:hover {
  background: rgba(255, 120, 120, 0.16);
  color: #ff9b9b;
}


@media (prefers-reduced-motion: reduce) {
  .user-panel {
    animation: none !important;
  }
}

/* ---------- 立即开始 → 空白占位页（同一文件内切换视图） ---------- */

/* .hero/.stats 自身设置了 display，需显式覆盖 hidden 属性才能被隐藏 */
.hero[hidden],
.stats[hidden] {
  display: none;
}

/* 占位页 = 独立白色页面：隐藏主视觉、落地页头部与视频背景，
   避免白色页面顶部透出上个页面（头部栏 + 视频） */
body.view-placeholder .page {
  padding: 0;
}

body.view-placeholder .header,
body.view-placeholder .bg {
  display: none;
}

.placeholder {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  overflow-y: auto;
  z-index: 1;
  animation: placeholderIn 0.3s ease;
}

.placeholder[hidden] {
  display: none;
}

@keyframes placeholderIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.placeholder-bar {
  display: flex;
  justify-content: flex-start;
  padding: 20px 28px 0;
}

.placeholder-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #111214;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background 0.25s ease, transform 0.25s ease;
}

.placeholder-back:hover {
  background: #000;
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .placeholder {
    animation: none !important;
  }
}
