/* ==========================================================================
   Y2视频外链 官网 —— 纯静态样式（无框架、无预处理器、无构建）
   官网站点根目录为 /usr/share/nginx/site，资源统一放在 /assets/site/
   ========================================================================== */

:root {
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --text: #1f1f1f;
  --muted: #555;
  --subtle: #888;
  --border: #f0f0f0;
  --bg: #fff;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img, svg { display: block; }

/* ---------- 布局容器 ---------- */
.container { max-width: 1100px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section { padding-top: 48px; }
.section--tight { padding-top: 32px; }
.section--bottom { padding-bottom: 72px; }
.text-center { text-align: center; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--text); line-height: 1.35; }
h1 { font-size: 38px; }
h2 { font-size: 26px; margin-bottom: 24px; }
h3 { font-size: 16px; }
p { margin: 0; }

.lead { font-size: 17px; color: var(--muted); max-width: 660px; margin: 0 auto; }
.subtle { color: var(--subtle); }
.section-sub { color: var(--muted); max-width: 760px; margin: -12px auto 0; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.brand__logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1677ff 0%, #36cfc9 100%);
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.brand:hover .brand__logo {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.45);
}
.brand__name { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 8px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 15px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: #4096ff; border-color: #4096ff; color: #fff; }
.btn--text { background: transparent; border-color: transparent; }
.btn--text:hover { background: rgba(22, 119, 255, 0.06); border-color: transparent; }
.btn--lg { min-height: 40px; padding: 8px 22px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn.is-loading { opacity: 0.65; cursor: not-allowed; pointer-events: none; }
.btn-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #e6f4ff 0%, #f6ffed 100%);
  padding: 72px 24px 56px;
  text-align: center;
}
.hero h1 { margin-bottom: 14px; }
.hero__badge {
  display: inline-block;
  margin-bottom: 20px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.1);
  color: var(--primary-dark);
  font-size: 13px;
}

/* ---------- 卡片 / 网格 ---------- */
.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 20px;
}
.card--center { text-align: center; }
.step-num {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  line-height: 40px;
}
.feature-icon { color: var(--primary); margin-bottom: 10px; }
.feature-desc { color: var(--muted); font-size: 13px; margin-top: 6px; }

.faq-list { display: grid; gap: 12px; max-width: 900px; margin: 0 auto; }
.faq-item { padding: 14px 18px; }
.faq-item h3 { margin-bottom: 6px; }
.faq-item p { color: var(--muted); }

/* ---------- 套餐卡片 ---------- */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.plan {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.plan__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.plan__tag {
  padding: 1px 8px;
  border-radius: 4px;
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #389e0d;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}
.plan__body { padding: 18px; flex: 1; }
.plan__price { font-size: 30px; font-weight: 600; margin: 0 0 12px; }
.plan__price small { font-size: 14px; font-weight: 400; color: var(--subtle); }
.plan__line { color: var(--muted); margin-bottom: 4px; }
.plan__desc { color: var(--subtle); font-size: 13px; margin-top: 8px; }
/* 按钮与卡片左右留出 12px 间距，避免贴边（沿用原官网定价按钮的修正） */
.plan__foot { padding: 12px; border-top: 1px solid var(--border); }
.plan__foot .btn { width: 100%; padding: 4px 12px; }
.plans-note { text-align: center; color: var(--subtle); font-size: 12px; margin-top: 12px; }

/* ---------- 登录 / 注册 ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 64px 24px 96px; }
.auth-card {
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 28px;
}
.auth-card h1 { font-size: 20px; text-align: center; margin-bottom: 18px; }
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
  flex: 1;
  padding: 8px 0 12px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
}
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-weight: 500; }
.field input {
  width: 100%;
  height: 36px;
  padding: 4px 11px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12); }
.field__hint { color: var(--subtle); font-size: 12px; margin-top: 5px; }
.field__errors { min-height: 20px; color: #ff4d4f; font-size: 12px; margin-top: 4px; }
.form-alert {
  display: none;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid #ffccc7;
  background: #fff2f0;
  border-radius: 6px;
  color: #cf1322;
  font-size: 13px;
}
.form-alert.is-visible { display: block; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: var(--subtle);
  font-size: 13px;
}

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed;
  top: 76px;
  left: 50%;
  z-index: 100;
  transform: translate(-50%, -8px);
  max-width: min(90vw, 460px);
  padding: 9px 18px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast--success { border-left: 3px solid #52c41a; }
.toast--error { border-left: 3px solid #ff4d4f; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .grid--4, .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .hero { padding: 52px 20px 40px; }
  .grid--3, .grid--4, .plans { grid-template-columns: 1fr; }
  .site-header__inner { padding: 0 14px; }
  .brand__name { font-size: 15px; }
  .site-nav { gap: 2px; }
  .site-nav .btn { padding: 4px 9px; font-size: 13px; }
  .container { padding-left: 16px; padding-right: 16px; }
}
