/* ========== 变量 ========== */
:root {
  --primary: #007AFF;
  --primary-dark: #0051D5;
  --success: #4CAF50;
  --danger: #F44336;
  --text: #333;
  --text-sub: #666;
  --bg: #f5f5f5;
  --white: #fff;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;
}

/* ========== 重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
.hidden { display: none !important; }

/* ========== 轮播区 ========== */
.hero {
  width: 100%;
  height: 100vh;
  max-height: 600px;
  position: relative;
  overflow: hidden;
  background: var(--white);
}

.carousel { width: 100%; height: 100%; position: relative; overflow: hidden; }

.carousel__track {
  display: flex;
  height: 100%;
  transition: transform .5s ease;
}

.carousel__track img {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit: cover;
}

.carousel__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all .2s ease;
}

.carousel__dot.is-active {
  width: 20px;
  background: var(--white);
}

/* ========== 下载区 ========== */
.download {
  padding: 32px 24px;
  text-align: center;
  background: var(--white);
  margin-top: -80px;
  position: relative;
  z-index: 10;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .08);
}

.download__buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  margin: 0 auto 24px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .5px;
  color: var(--white);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform .3s, box-shadow .3s;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

.download-btn:active { transform: translateY(0); }
.download-btn img { height: 28px; width: auto; filter: brightness(0) invert(1); }

.download-btn--ios {
  background: linear-gradient(135deg, #000, #333);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.download-btn--android {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

/* 平台徽标 */
.download__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--bg);
  border-radius: var(--r-full);
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 16px;
  font-weight: 500;
}

.download__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

/* 倒计时 */
.download__countdown {
  font-size: 14px;
  color: var(--text-sub);
  margin-top: 16px;
  animation: fadeUp .5s ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========== 浏览器引导弹窗 ========== */
.browser-guide {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all .3s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.browser-guide.is-active {
  opacity: 1;
  visibility: visible;
}

.browser-guide__card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 32px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .25);
  transform: scale(.9) translateY(20px);
  transition: transform .3s;
  position: relative;
}

.browser-guide.is-active .browser-guide__card {
  transform: scale(1) translateY(0);
}

.browser-guide__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--bg);
  color: var(--text-sub);
  font-size: 20px;
  transition: all .15s;
}

.browser-guide__close:hover {
  background: var(--danger);
  color: var(--white);
  transform: rotate(90deg);
}

.browser-guide__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-right: 32px;
}

.browser-guide__logo {
  width: 64px;
  height: 64px;
  border-radius: var(--r-md);
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.browser-guide__title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.browser-guide__subtitle { font-size: 14px; color: var(--text-sub); }

.browser-guide__steps { margin-bottom: 24px; }

.browser-guide__steps p {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.8;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.browser-guide__divider {
  text-align: center;
  position: relative;
  margin: 24px 0;
  color: var(--text-sub);
  font-size: 14px;
}

.browser-guide__divider::before,
.browser-guide__divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 90px);
  height: 1px;
  background: #e0e0e0;
}

.browser-guide__divider::before { left: 0; }
.browser-guide__divider::after  { right: 0; }

.browser-guide__copy { display: flex; gap: 8px; }

.browser-guide__copy input {
  flex: 1;
  padding: 8px 16px;
  border: 2px solid #e8e8e8;
  border-radius: var(--r-sm);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}

.browser-guide__copy input:focus { border-color: var(--primary); }

.browser-guide__copy button {
  padding: 8px 24px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  transition: background .15s;
  white-space: nowrap;
}

.browser-guide__copy button:hover { background: var(--primary-dark); }
.browser-guide__copy button.is-copied { background: var(--success); }

/* ========== 网络异常弹窗 ========== */
.net-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 8, 18, .54);
  backdrop-filter: blur(10px);
}

.net-modal__panel {
  width: min(100%, 320px);
  padding: 32px 24px 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, #fff, #f4f7ff);
  box-shadow: 0 24px 44px rgba(0, 0, 0, .28);
  text-align: center;
  color: #182135;
  animation: netPop .22s ease;
}

.net-modal__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff9a56, #ff6b6b);
  box-shadow: 0 8px 18px rgba(255, 107, 107, .28);
}

.net-modal__icon svg { width: 28px; height: 28px; }
.net-modal__title { font-size: 18px; font-weight: 800; color: #1a1a2e; }

.net-modal__desc {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: #667085;
}

.net-modal__button {
  width: 100%;
  margin-top: 22px;
  padding: 14px 0;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(102, 126, 234, .28);
  transition: transform .15s ease;
}

.net-modal__button:active { transform: scale(.96); }

@keyframes netPop {
  from { opacity: 0; transform: scale(.86); }
  to   { opacity: 1; transform: scale(1); }
}

/* ========== 响应式 ========== */
@media (max-width: 375px) {
  .download { padding: 24px 16px; margin-top: -60px; }
  .browser-guide__card { padding: 24px; }
}

@media (min-width: 428px) {
  .hero { max-height: 650px; }
}
