
.bottom-nav[data-v-117b13eb] {
  z-index: 1000; /* 统一 z-index 层级，底部导航最高 */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  padding-top: 0.75rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top-left-radius: 1.25rem;
  border-top-right-radius: 1.25rem;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-around;
  align-items: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  /* 性能优化 - 减少抖动和重绘 */
  will-change: transform;
  transform: translateZ(0);
  contain: layout;
}
.nav-item[data-v-117b13eb] {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.25rem 0;
  color: #94a3b8; /* Slate-400 equivalent for inactive */
}
.nav-icon-wrapper[data-v-117b13eb] {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.35rem;
}
.nav-icon-img[data-v-117b13eb] {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.6);
}
.nav-label[data-v-117b13eb] {
  font-size: 0.75rem; /* 12px */
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
}

/* Active State */
.nav-item.active[data-v-117b13eb] {
  color: var(--primary-color-dark, #ff8c00);
}
.nav-item.active .nav-icon-img[data-v-117b13eb] {
  filter: none;
}
.nav-item.active .nav-label[data-v-117b13eb] {
  font-weight: 600;
}

body {
  overflow-x: hidden;
}
.mobile-container {
  position: relative;
  /* 使用 JavaScript 计算的真实视口高度，避免地址栏抖动 */
  min-height: calc(var(--vh, 1vh) * 100);
  /* 顶部状态栏安全区域 */
  padding-top: env(safe-area-inset-top, 0px);
  box-sizing: border-box;
  background-color: #f5f5f5;
  transition: padding-bottom 0.3s ease; /* 过渡效果 */
  /* 使用 flexbox 让子元素自动填充 */
  display: flex;
  flex-direction: column;
}

/* 当有底部导航栏时，动态添加内边距 */
.mobile-container.has-bottom-nav {
  /* 4.5rem 是一个安全的高度值，覆盖 BottomNav 的实际高度 4.35rem */
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}
.main-content {
  width: 100%;
  background-color: #f5f5f5;
  /* 使用 flex: 1 填充剩余空间 */
  flex: 1;
  display: flex;
  flex-direction: column;
}
.desktop-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
}
.error-container {
  background: white;
  border-radius: 20px;
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 480px;
  animation: fadeInUp 0.6s ease;
}
@keyframes fadeInUp {
from {
    opacity: 0;
    transform: translateY(30px);
}
to {
    opacity: 1;
    transform: translateY(0);
}
}
.error-code {
  font-size: 6rem;
  font-weight: 900;
  color: #667eea;
  margin-bottom: 1rem;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}
.error-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 1rem 0;
}
.error-description {
  font-size: 1rem;
  color: #666;
  margin: 0 0 2rem 0;
  line-height: 1.6;
}
.countdown-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.countdown-number {
  font-size: 3rem;
  font-weight: 700;
  color: #667eea;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.countdown-label {
  font-size: 0.9rem;
  color: #888;
}

:root {
  --primary-color: #ff8c00;
  --primary-color-dark: darkorange;
  --safe-area-inset-top: env(safe-area-inset-top);
  --safe-area-inset-right: env(safe-area-inset-right);
  --safe-area-inset-bottom: env(safe-area-inset-bottom);
  --safe-area-inset-left: env(safe-area-inset-left);

  /* 底部导航栏相关变量 */
  --bottom-nav-height: 3.75rem; /* 60px - 底部导航栏高度 */
  --bottom-spacing: calc(var(--bottom-nav-height) + var(--safe-area-inset-bottom)); /* 底部总间距 = 导航栏 + 安全区域 */
  --bottom-content-spacing: calc(var(--bottom-spacing) + 1rem); /* 内容底部间距 = 总间距 + 额外buffer */
}

/* 自适应断点系统 - 设置固定 rem 基准 */
html {
  font-size: 12px; /* 默认小屏 (< 340px) */
}

/* 中小屏手机 320-374px */
@media (min-width: 340px) and (max-width: 394px) {
  html {
    font-size: 14px;
  }
}

/* 中大屏手机 375-413px */
@media (min-width: 395px) and (max-width: 767px) {
  html {
    font-size: 16px;
  }
}

html {
  /* 移除固定高度限制，让页面按内容自然滚动 */
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  background-color: #f5f5f5;
}

/* 确保根容器可以根据内容伸展 */
#app {
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
  width: 100%;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
}

/* 图片懒加载样式 */
img.lazy-image {
  opacity: 0;
  background: linear-gradient(90deg, #f5f5f5 25%, #e0e0e0 37%, #f5f5f5 63%);
  background-size: 400% 100%;
  animation: lazy-loading-skeleton 1.5s ease-in-out infinite;
  transition: opacity 0.3s ease;
}

img.lazy-loading {
  opacity: 0;
}

img.lazy-loaded {
  opacity: 1;
  animation: none;
  background: none;
}

img.lazy-error {
  opacity: 0.5;
  background: #f5f5f5;
  animation: none;
}

@keyframes lazy-loading-skeleton {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* 只防止顶部的过度滚动（下拉刷新），保持正常滚动 */
body {
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}

/* 防止长按选择 - 已放开以避免触摸交互干扰 */
* {
  -webkit-touch-callout: none;
  -webkit-user-select: auto;
  -khtml-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

/* 允许输入框选择文本 */
input, textarea {
  -webkit-user-select: text;
  -khtml-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* 禁用 iOS Safari 输入框上方的 accessory bar（上一个/下一个/完成按钮） */
input, textarea, select {
  /* 禁用 iOS 自动样式 */
  -webkit-appearance: none;
  appearance: none;
  /* 禁用圆角（iOS 默认） */
  border-radius: 0;
}

/* iOS 键盘工具栏隐藏 - 通过设置输入框属性实现 */
input:not([type="date"]):not([type="datetime-local"]):not([type="month"]):not([type="time"]):not([type="week"]) {
  /* 禁用 iOS 输入建议和自动完成功能，这会简化键盘工具栏 */
  -webkit-text-security: none;
}

/* iOS WKWebView 特定样式 - 隐藏键盘附属视图 */
@supports (-webkit-touch-callout: none) {
  /* 仅在 iOS Safari/WKWebView 中生效 */
  input, textarea {
    /* 禁用输入框的 iOS 默认样式 */
    -webkit-appearance: none;
    /* 防止 iOS 自动调整字体大小 */
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
  }
}

/* PWA模式下的样式调整 */
@media (display-mode: standalone) {
  body {
    background-color: #f5f5f5;
    overflow-y: auto;
  }
}

/* ========== 通用点击反馈样式 ========== */

/* 可点击元素的基础样式 */
.tap-effect {
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.15s ease,
              background-color 0.15s ease;
  cursor: pointer;
  /* 性能优化 - 限制重排范围，启用 GPU 加速 */
  contain: layout style;
  will-change: transform;
}

/* 按下状态 - 缩放效果 */
.tap-effect:active,
.tap-effect.pressed {
  transform: scale(0.96);
  opacity: 0.85;
}

/* 按钮专用点击效果 */
.btn-tap {
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.12s ease,
              opacity 0.12s ease;
  cursor: pointer;
  /* 性能优化 - 限制重排范围，启用 GPU 加速 */
  contain: layout style;
  will-change: transform;
}

.btn-tap:active,
.btn-tap.pressed {
  transform: scale(0.95);
  opacity: 0.9;
}

/* 卡片点击效果 */
.card-tap {
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.2s ease;
  cursor: pointer;
  /* 性能优化 - 限制重排范围，启用 GPU 加速 */
  contain: layout style;
  will-change: transform;
}

.card-tap:active,
.card-tap.pressed {
  transform: scale(0.98);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 列表项点击效果 */
.list-item-tap {
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease;
  cursor: pointer;
}

.list-item-tap:active,
.list-item-tap.pressed {
  background-color: rgba(0, 0, 0, 0.05);
}

/* 图标点击效果 */
.icon-tap {
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.15s ease;
  cursor: pointer;
  /* 性能优化 - 限制重排范围，启用 GPU 加速 */
  contain: layout style;
  will-change: transform;
}

.icon-tap:active,
.icon-tap.pressed {
  transform: scale(0.85);
  opacity: 0.7;
}

/*
 * Prevents browser autofill on password fields by treating them as text fields
 * and visually masking the input.
 */
.password-mask {
  -webkit-text-security: disc;
  text-security: disc;
}
