/* 秒达 UI 增强 — 移动端优先落地页 + 双端下载 + 截图点击登录 */
:root {
  --wp-primary: #047ef8;
  --wp-primary-2: #0365c6;
  --wp-green: #12b76a;
  --wp-ink: #0f172a;
  --wp-muted: #64748b;
  --wp-card: #ffffff;
  --wp-bg: #f5f8fc;
  --wp-radius: 16px;
  --wp-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --wp-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* 隐藏原始单一下载按钮，由 enhance 注入双端卡片 */
body.wp-enhanced .download-box > .single-download-btn,
body.wp-enhanced .download-box > a.single-download-btn {
  display: none !important;
}

/* ========== 落地页通用增强 ========== */
.wp-dl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}
.wp-dl-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 18px 18px 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: var(--wp-shadow);
  text-decoration: none !important;
  color: var(--wp-ink) !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.wp-dl-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
  box-shadow: 0 14px 34px rgba(4, 126, 248, 0.16);
}
.wp-dl-card .wp-dl-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 12px;
}
.wp-dl-card.android .wp-dl-icon { background: #ecfdf3; }
.wp-dl-card.pc .wp-dl-icon { background: #eff6ff; }
.wp-dl-card h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; }
.wp-dl-card p { margin: 0 0 14px; color: var(--wp-muted); font-size: 0.9rem; line-height: 1.45; }
.wp-dl-card .wp-dl-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: auto; padding: 9px 14px; border-radius: 999px;
  font-size: 0.92rem; font-weight: 600; color: #fff;
}
.wp-dl-card.android .wp-dl-cta { background: var(--wp-green); }
.wp-dl-card.pc .wp-dl-cta { background: var(--wp-primary); }

.wp-header-actions {
  display: flex; align-items: center; gap: 8px; margin-left: 12px;
}
.wp-chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  text-decoration: none !important; border: 1px solid transparent; white-space: nowrap;
}
.wp-chip-btn.primary { background: var(--wp-primary); color: #fff !important; }
.wp-chip-btn.primary:hover { background: var(--wp-primary-2); }
.wp-chip-btn.ghost {
  background: #fff; color: var(--wp-ink) !important; border-color: #dbe3ef;
}
.wp-chip-btn.ghost:hover { border-color: #93c5fd; color: var(--wp-primary) !important; }

.wp-top-client {
  display: inline-flex; align-items: center; gap: 6px; margin-right: 12px;
  padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(90deg, #047ef8, #3b82f6);
  color: #fff !important; font-size: 13px; font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(4,126,248,.28);
}

.wp-status-bar {
  position: fixed; right: 16px; bottom: 16px; z-index: 9999;
  display: none; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.92); color: #fff; font-size: 13px;
  box-shadow: 0 10px 24px rgba(0,0,0,.2);
}
.wp-status-bar.show { display: inline-flex; }
.wp-status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.2);
}

/* 截图可点击：上传界面 -> 登录 */
body.wp-enhanced .screenshot-item.wp-shot-upload {
  cursor: pointer;
  position: relative;
  outline: none;
}
body.wp-enhanced .screenshot-item.wp-shot-upload .screenshot-img {
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 8px 24px rgba(4,126,248,.18);
}
body.wp-enhanced .screenshot-item.wp-shot-upload:active .screenshot-img,
body.wp-enhanced .screenshot-item.wp-shot-upload:hover .screenshot-img {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 32px rgba(4,126,248,.28);
}
.wp-shot-badge {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(4, 126, 248, 0.95);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(4,126,248,.35);
  pointer-events: none;
}
.wp-shot-hint {
  margin-top: 8px !important;
  color: var(--wp-primary) !important;
  font-weight: 600 !important;
  font-size: 0.92rem !important;
}

/* Hero 区（注入） */
.wp-hero {
  display: none;
}

/* 底部固定操作栏（手机）— 已移除，保留类名兼容旧缓存 */
.wp-mobile-dock {
  display: none !important;
}

/* 登录页手机优化 */
@media (max-width: 768px) {
  body.wp-enhanced.wp-landing {
    background: var(--wp-bg);
  }

  body.wp-enhanced.wp-landing .app-container {
    padding-bottom: 16px;
  }

  /* 顶栏更紧凑 */
  body.wp-enhanced.wp-landing .header {
    padding: 10px 14px !important;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,.92) !important;
    border-bottom: 1px solid #eef2f7;
  }
  body.wp-enhanced.wp-landing .wp-header-actions {
    margin-left: auto;
    gap: 6px;
  }
  body.wp-enhanced.wp-landing .wp-chip-btn {
    padding: 7px 10px;
    font-size: 12px;
  }

  /* 主内容减少上下堆砌间距 */
  body.wp-enhanced.wp-landing .main-content {
    padding: 0 0 12px !important;
  }
  body.wp-enhanced.wp-landing .section {
    padding: 18px 14px !important;
    margin: 0 !important;
  }
  body.wp-enhanced.wp-landing .section-title {
    font-size: 1.25rem !important;
    margin-bottom: 10px !important;
    text-align: left !important;
  }
  body.wp-enhanced.wp-landing .section-title::after {
    content: none !important;
  }

  /* Hero */
  body.wp-enhanced.wp-landing .wp-hero {
    display: block;
    margin: 12px 14px 8px;
    padding: 18px 16px 16px;
    border-radius: 18px;
    color: #fff;
    background:
      radial-gradient(120% 100% at 100% 0%, rgba(255,255,255,.22) 0%, transparent 50%),
      linear-gradient(135deg, #047ef8 0%, #2563eb 55%, #1d4ed8 100%);
    box-shadow: 0 12px 28px rgba(4,126,248,.28);
  }
  body.wp-enhanced.wp-landing .wp-hero h1 {
    margin: 0 0 8px;
    font-size: 1.45rem;
    line-height: 1.25;
    font-weight: 800;
  }
  body.wp-enhanced.wp-landing .wp-hero p {
    margin: 0 0 14px;
    opacity: .95;
    font-size: .95rem;
    line-height: 1.5;
  }
  body.wp-enhanced.wp-landing .wp-hero-actions {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 10px;
  }
  body.wp-enhanced.wp-landing .wp-hero-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
  }
  body.wp-enhanced.wp-landing .wp-hero-btn.primary {
    background: #fff;
    color: #0365c6 !important;
  }
  body.wp-enhanced.wp-landing .wp-hero-btn.ghost {
    background: rgba(255,255,255,.16);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.35);
  }

  /* 介绍长文折叠，避免无限堆砌 */
  body.wp-enhanced.wp-landing .intro-section .section-content {
    position: relative;
  }
  body.wp-enhanced.wp-landing .intro-section .section-content p {
    font-size: .92rem !important;
    line-height: 1.55 !important;
    color: #334155 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 !important;
  }
  body.wp-enhanced.wp-landing .intro-section.wp-intro-open .section-content p {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
  body.wp-enhanced.wp-landing .wp-intro-toggle {
    display: inline-flex;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--wp-primary);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
  }

  /* 截图：横向滑动，不再上下堆两张大图 */
  body.wp-enhanced.wp-landing .app-screenshots {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 10px !important;
    margin: 12px 0 8px !important;
  }
  body.wp-enhanced.wp-landing .app-screenshots::-webkit-scrollbar { height: 0; }
  body.wp-enhanced.wp-landing .app-screenshots .screenshot-item {
    flex: 0 0 58% !important;
    width: 58% !important;
    max-width: 220px !important;
    scroll-snap-align: start;
    margin: 0 !important;
  }
  body.wp-enhanced.wp-landing .app-screenshots .screenshot-img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 340px !important;
    object-fit: cover;
    object-position: top center;
    border-radius: 16px !important;
    display: block;
  }
  body.wp-enhanced.wp-landing .screenshot-caption {
    font-size: .82rem !important;
    margin-top: 8px !important;
  }

  /* 特色卡片：横向紧凑 3 列，不再竖着堆 */
  body.wp-enhanced.wp-landing .features-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin-top: 8px !important;
  }
  body.wp-enhanced.wp-landing .feature-card {
    padding: 12px 8px !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    border: 1px solid #e8eef6 !important;
    background: #fff !important;
  }
  body.wp-enhanced.wp-landing .feature-card .feature-icon {
    font-size: 1.2rem !important;
    margin-bottom: 4px !important;
  }
  body.wp-enhanced.wp-landing .feature-card h3 {
    font-size: .85rem !important;
    margin: 0 0 4px !important;
  }
  body.wp-enhanced.wp-landing .feature-card p {
    font-size: .72rem !important;
    line-height: 1.35 !important;
    color: var(--wp-muted) !important;
    margin: 0 !important;
  }

  /* 登录 / 下载卡片更紧凑 */
  body.wp-enhanced.wp-landing .login-box,
  body.wp-enhanced.wp-landing .download-box {
    max-width: none !important;
    padding: 16px !important;
    border-radius: 16px !important;
  }
  body.wp-enhanced.wp-landing .login-box p,
  body.wp-enhanced.wp-landing .download-description {
    font-size: .95rem !important;
    margin-bottom: 12px !important;
  }
  body.wp-enhanced.wp-landing .wp-dl-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  body.wp-enhanced.wp-landing .wp-dl-card {
    padding: 14px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  body.wp-enhanced.wp-landing .wp-dl-card .wp-dl-icon {
    margin: 0;
    flex-shrink: 0;
  }
  body.wp-enhanced.wp-landing .wp-dl-card h3 {
    margin: 0 0 2px;
    font-size: .98rem;
  }
  body.wp-enhanced.wp-landing .wp-dl-card p {
    margin: 0;
    font-size: .8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  body.wp-enhanced.wp-landing .wp-dl-card .wp-dl-cta {
    margin-left: auto;
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: .82rem;
  }

  /* 页脚压缩 */
  body.wp-enhanced.wp-landing .footer {
    padding: 16px 14px 24px !important;
    font-size: .8rem !important;
  }
  body.wp-enhanced.wp-landing .footer-links {
    gap: 12px !important;
  }

  /* toast */
  body.wp-enhanced.wp-landing .wp-status-bar {
    bottom: 16px;
    right: 12px;
    left: 12px;
    justify-content: center;
  }

  /* 登录页本身 */
  body.wp-enhanced .login-container {
    min-height: 100vh !important;
    padding: 20px 16px 32px !important;
    box-sizing: border-box;
  }
  body.wp-enhanced .login-container .login-content {
    width: 100% !important;
    max-width: 420px;
    margin: 0 auto;
  }
  body.wp-enhanced .login-container .login-form-v,
  body.wp-enhanced .login-container .login-form {
    width: 100% !important;
  }
  body.wp-enhanced .login-container .el-button {
    min-height: 48px !important;
    font-size: 16px !important;
    border-radius: 12px !important;
  }

  /* ===== 手机触控 / 按钮尺寸（≥44–48px）===== */
  body.wp-enhanced {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  /* 全局可点控件最小高度，避免点不准 */
  body.wp-enhanced button,
  body.wp-enhanced .el-button,
  body.wp-enhanced .action-btn,
  body.wp-enhanced .single-download-btn,
  body.wp-enhanced input[type="button"],
  body.wp-enhanced input[type="submit"] {
    min-height: 48px !important;
    min-width: 48px;
    font-size: 16px !important;
    line-height: 1.25 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    border-radius: 12px !important;
    touch-action: manipulation;
  }

  body.wp-enhanced .el-button--mini,
  body.wp-enhanced .el-button--small {
    min-height: 40px !important;
    font-size: 14px !important;
    padding: 8px 14px !important;
  }

  /* Element 输入框：手机放大避免 iOS 自动缩放，触控更稳 */
  body.wp-enhanced .el-input__inner,
  body.wp-enhanced .el-textarea__inner,
  body.wp-enhanced input.el-input__inner,
  body.wp-enhanced input[type="text"],
  body.wp-enhanced input[type="password"],
  body.wp-enhanced input[type="email"],
  body.wp-enhanced input[type="search"],
  body.wp-enhanced input[type="number"] {
    min-height: 48px !important;
    height: 48px !important;
    font-size: 16px !important;
    line-height: 48px !important;
    border-radius: 12px !important;
  }
  body.wp-enhanced .el-form-item {
    margin-bottom: 16px !important;
  }

  /* 落地页主操作按钮更大 */
  body.wp-enhanced.wp-landing .wp-hero-btn {
    min-height: 48px !important;
    font-size: 16px !important;
    padding: 0 16px !important;
  }
  body.wp-enhanced.wp-landing .action-btn,
  body.wp-enhanced.wp-landing .login-box .action-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 48px !important;
    font-size: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 下载卡：整卡更好点，CTA 更大 */
  body.wp-enhanced.wp-landing .wp-dl-card {
    min-height: 72px;
    padding: 14px 12px !important;
    gap: 10px !important;
  }
  body.wp-enhanced.wp-landing .wp-dl-card .wp-dl-cta {
    min-height: 40px;
    padding: 10px 14px !important;
    font-size: 14px !important;
    white-space: nowrap;
  }
  body.wp-enhanced.wp-landing .wp-dl-card h3 {
    font-size: 1rem !important;
  }

  /* 顶栏 chip 加大 */
  body.wp-enhanced.wp-landing .wp-chip-btn {
    min-height: 40px;
    padding: 8px 14px !important;
    font-size: 14px !important;
  }

  /* 汉堡菜单更容易点 */
  body.wp-enhanced.wp-landing .hamburger {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  /* 导航/导航链接等底部按钮 */
  body.wp-enhanced .el-dialog__footer .el-button,
  body.wp-enhanced .dialog-footer .el-button {
    min-height: 44px !important;
    flex: 1 1 auto;
  }

  /* 登录后侧栏/顶栏 */
  body.wp-enhanced .wp-top-client {
    min-height: 40px;
    padding: 8px 14px !important;
    font-size: 14px !important;
  }
  body.wp-enhanced .content .contLi,
  body.wp-enhanced .contBox .contLi {
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    padding: 10px 12px !important;
  }

  /* 表格操作：手机允许横滑，操作按钮不挤扁 */
  body.wp-enhanced .el-table {
    font-size: 14px !important;
  }
  body.wp-enhanced .el-table .el-button {
    min-height: 40px !important;
    margin: 2px 0 !important;
  }
  body.wp-enhanced .el-table__body-wrapper {
    -webkit-overflow-scrolling: touch;
  }

  /* 底部 tab / 发送接收等常见条 */
  body.wp-enhanced .tabBtn .tabBtnLi,
  body.wp-enhanced .tabBtnLi {
    min-height: 48px !important;
    padding: 8px 10px !important;
  }

  /* 导航页等大号上传按钮 */
  body.wp-enhanced .upload-btn,
  body.wp-enhanced .send-btn,
  body.wp-enhanced .receive-btn {
    min-height: 48px !important;
    font-size: 16px !important;
  }

  /* 链接型按钮可点范围 */
  body.wp-enhanced.wp-landing .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    font-size: 15px !important;
  }

  /* 展开介绍 */
  body.wp-enhanced.wp-landing .wp-intro-toggle {
    min-height: 40px;
    padding: 8px 4px !important;
    font-size: 15px !important;
  }

  /* 防止 fixed 元素挡住底部操作 */
  body.wp-enhanced .el-message-box,
  body.wp-enhanced .el-dialog {
    max-width: calc(100vw - 24px);
  }
  body.wp-enhanced .el-dialog__body {
    max-height: 60vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* 超小屏：截图再窄一点，特征卡更紧 */
@media (max-width: 380px) {
  body.wp-enhanced.wp-landing .app-screenshots .screenshot-item {
    flex-basis: 64% !important;
    width: 64% !important;
  }
  body.wp-enhanced.wp-landing .feature-card p { display: none; }

  body.wp-enhanced.wp-landing .wp-hero-actions {
    grid-template-columns: 1fr !important;
  }
  body.wp-enhanced.wp-landing .wp-dl-card {
    flex-wrap: wrap;
  }
  body.wp-enhanced.wp-landing .wp-dl-card .wp-dl-cta {
    width: 100%;
    justify-content: center;
    margin-left: 0 !important;
  }
}

/* 桌面端也给上传截图一点可点提示 */
@media (min-width: 769px) {
  body.wp-enhanced .screenshot-item.wp-shot-upload .wp-shot-badge {
    top: 14px; left: 14px;
  }
  body.wp-enhanced.wp-landing .wp-hero {
    display: block;
    max-width: 1000px;
    margin: 24px auto 8px;
    padding: 28px 32px;
    border-radius: 20px;
    color: #fff;
    background:
      radial-gradient(120% 100% at 100% 0%, rgba(255,255,255,.2) 0%, transparent 50%),
      linear-gradient(135deg, #047ef8 0%, #2563eb 55%, #1d4ed8 100%);
    box-shadow: 0 16px 36px rgba(4,126,248,.22);
  }
  body.wp-enhanced.wp-landing .wp-hero h1 {
    margin: 0 0 10px;
    font-size: 1.8rem;
  }
  body.wp-enhanced.wp-landing .wp-hero p {
    margin: 0 0 16px;
    max-width: 640px;
    opacity: .95;
  }
  body.wp-enhanced.wp-landing .wp-hero-actions {
    display: flex;
    gap: 12px;
  }
  body.wp-enhanced.wp-landing .wp-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none !important;
    border: 0;
    cursor: pointer;
  }
  body.wp-enhanced.wp-landing .wp-hero-btn.primary {
    background: #fff;
    color: #0365c6 !important;
  }
  body.wp-enhanced.wp-landing .wp-hero-btn.ghost {
    background: rgba(255,255,255,.16);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.35);
  }
}

/* 登录后手机主界面：侧栏/内容适配 */
@media (max-width: 768px) {
  body.wp-enhanced #app,
  body.wp-enhanced #app > div {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* 常见左侧菜单在手机改为可滚动，避免挤占 */
  body.wp-enhanced .leftPage,
  body.wp-enhanced [class*="left"] {
    max-width: 100%;
  }

  /* 顶栏用户名可收缩 */
  body.wp-enhanced .content .rightName,
  body.wp-enhanced .rightName {
    max-width: 36vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 页面主内容内边距 */
  body.wp-enhanced .content {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}
