/* CM Video Toolkit — 官网样式（沿用 App 调色板） */
:root {
  --bg: #1a1a1a;
  --bg2: #232323;
  --bg3: #2d2d2d;
  --accent: #007AFF;
  --accent2: #0062CC;
  --accent-glow: rgba(0, 122, 255, 0.15);
  --success: #4caf50;
  --info: #2196f3;
  --text: #e0e0e0;
  --text2: #a0a0a0;
  --muted: #666;
  --border: #3a3a3a;
  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 28px; height: 28px; border-radius: 7px; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: .2px; }

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--text2); font-size: 14px; font-weight: 600; transition: color .15s; }
.nav-links a:hover { color: var(--text); }

.lang-toggle {
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all .15s;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all .15s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--bg3); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--bg3); }
.btn-lg { padding: 14px 30px; font-size: 16px; }

/* ===== Hero（文案居中 + 大截图横铺） ===== */
/* 不限制 .hero 宽度，让截图能放大到 1680px；文案与截图各自居中 */
.hero {
  padding: 72px 24px 56px;
  text-align: center;
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-inner h1 {
  font-size: 44px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.5px;
  color: #fff;
}
.hero-sub { margin: 18px auto 0; font-size: 17px; color: var(--text2); max-width: 52ch; }
.hero-cta { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-meta { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* 真实界面截图：大屏最多 1680px 宽，且限高 78vh 保证一屏可见、比例不变形 */
.hero-shot { margin: 44px auto 0; line-height: 0; }
.hero-shot img {
  display: inline-block;
  width: auto;
  height: auto;
  max-width: min(1680px, 100%);
  max-height: 78vh;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}

/* ===== Sections ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 64px 24px; }
.section-alt { background: var(--bg2); max-width: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-title { font-size: 28px; font-weight: 800; margin-bottom: 36px; text-align: center; }

/* ===== Features ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-ico { color: var(--accent); margin-bottom: 12px; line-height: 0; }
.card-ico svg { width: 28px; height: 28px; }
.card h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.card p { font-size: 13.5px; color: var(--text2); }

/* ===== Specs ===== */
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.spec {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
}
.spec h4 { font-size: 13px; color: var(--accent); font-weight: 800; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.spec p { font-size: 14px; color: var(--text2); }

/* ===== Download ===== */
.download { text-align: center; }
.dl-sub { color: var(--text2); margin-bottom: 24px; max-width: 50ch; margin-left: auto; margin-right: auto; }
.dl-note { margin-top: 16px; font-size: 12px; color: var(--muted); }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 28px 24px; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 13px; color: var(--muted);
}
.footer-links { display: inline-flex; gap: 18px; }
.footer-inner a { color: var(--text2); }
.footer-inner a:hover { color: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .hero { padding-top: 48px; }
  .hero-inner h1 { font-size: 34px; }
  .hero-shot { margin-top: 36px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .specs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.lang-toggle) { display: none; }
  .grid, .specs { grid-template-columns: 1fr; }
  .hero-inner h1 { font-size: 28px; }
  .footer-inner { flex-direction: column; }
}

/* ===== 联系按钮 / 弹窗 ===== */
.footer-contact {
  border: none;
  background: transparent;
  color: var(--text2);
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.footer-contact:hover { color: var(--accent); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.hidden { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(2px);
}
.modal-box {
  position: relative;
  width: 460px;
  max-width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 17px; font-weight: 800; }
.modal-x {
  border: none; background: transparent; color: var(--text2);
  cursor: pointer; width: 28px; height: 28px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-x svg { width: 18px; height: 18px; }
.modal-x:hover { background: var(--bg3); color: var(--text); }

.contact-form { padding: 18px; display: flex; flex-direction: column; }
.contact-form label { font-size: 13px; color: var(--text2); margin-bottom: 6px; font-weight: 600; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); }

/* 自定义留言框滚动条 */
.contact-form textarea { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.contact-form textarea::-webkit-scrollbar { width: 8px; }
.contact-form textarea::-webkit-scrollbar-track { background: transparent; }
.contact-form textarea::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.contact-form textarea::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.contact-status { font-size: 13px; margin-bottom: 12px; min-height: 18px; display: flex; align-items: center; gap: 7px; }
.contact-status svg { width: 15px; height: 15px; flex-shrink: 0; }
.contact-status.ok { color: var(--success); }
.contact-status.err { color: #ff6b6b; }
.contact-actions { display: flex; justify-content: flex-end; gap: 10px; }
.contact-actions .btn { padding: 9px 18px; font-size: 14px; }
.btn[disabled] { opacity: .6; cursor: default; }

/* 发送中：按钮旋转圈动画 */
.btn.loading { pointer-events: none; }
.btn.loading::before {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin .6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* 发送成功：横幅高亮 + 弹入动画，让用户明确看到 */
.contact-success {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 14px; padding: 16px;
  background: rgba(76, 175, 80, .12);
  border: 1px solid rgba(76, 175, 80, .4);
  border-radius: var(--radius-sm);
  color: var(--success); font-size: 15px; font-weight: 700;
  animation: success-pop .25s ease;
}
.contact-success svg { width: 24px; height: 24px; flex-shrink: 0; }
.contact-success-note { margin-top: 4px; color: var(--text2); font-size: 13px; font-weight: 400; }
.contact-success-view { padding: 18px; }
#contact-form.hidden, .contact-success-view.hidden { display: none; }
@keyframes success-pop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 520px) {
  .modal-box { width: 100%; }
}

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.char-count { text-align: right; font-size: 11px; color: var(--muted); margin: -8px 0 12px; }
.char-count.over { color: #ff6b6b; }
