/* ============================================
   FileV · 在线文件预览器
   专业 SaaS 风格 · 深色导航 + 浅色主体
   ============================================ */

/* ---------- 设计令牌 ---------- */
:root {
  /* 品牌色 */
  --brand: #6366f1;
  --brand-dark: #4f46e5;
  --brand-light: #818cf8;
  --brand-soft: rgba(99, 102, 241, 0.08);

  /* 中性色 */
  --bg: #f8f9fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;

  /* 功能色 */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* 尺寸 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);

  /* 布局 */
  --nav-h: 64px;
  --max-w: 1200px;
}

/* ---------- 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

svg { display: inline-block; vertical-align: middle; }

/* ============================================
   导航栏
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.brand-name {
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.brand-tag {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  margin-left: 4px;
}

.nav-menu {
  display: flex;
  gap: 4px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- 按钮系统 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-dark), #4338ca);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }

.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: var(--radius); }

.btn-block { width: 100%; }

.btn-text {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}
.btn-text:hover { color: var(--brand); }

.text-link {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.text-link:hover { text-decoration: underline; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-strong); }

/* 导航栏上的特殊按钮 */
.nav-actions .btn-text { color: rgba(255, 255, 255, 0.65); }
.nav-actions .btn-text:hover { color: #fff; }
.nav-actions .btn-primary { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }

/* 用户信息（登录后） */
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.nav-user-name {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
}
.nav-logout {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-logout:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.08); }

/* ============================================
   Hero 区域
   ============================================ */
.hero {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, var(--bg) 100%);
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--brand-light), #c7d2fe, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 17px;
  color: rgba(248, 250, 252, 0.55);
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); color: #fff; }

/* ============================================
   主工作区
   ============================================ */
.workspace {
  padding: 0 24px;
  margin-top: -30px;
  position: relative;
  z-index: 5;
}

.workspace-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  height: 640px;
  min-height: 400px;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-title {
  font-size: 15px;
  font-weight: 700;
}

.file-count-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface-hover);
}

.file-list {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

.file-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 16px;
  color: var(--text-muted);
  text-align: center;
}
.file-list-empty svg { color: var(--text-muted); opacity: 0.5; }
.file-list-empty p { font-size: 13px; font-weight: 500; color: var(--text-secondary); margin: 0; }
.file-list-empty span { font-size: 11px; }

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.12s;
  margin-bottom: 2px;
}

.file-item:hover { background: var(--surface-hover); }
.file-item.active {
  background: var(--brand-soft);
  border-color: rgba(99, 102, 241, 0.2);
}

.fi-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.fi-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fi-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.fi-info { font-size: 11px; color: var(--text-muted); }

.fi-del {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: all 0.15s;
}
.file-item:hover .fi-del { opacity: 1; }
.fi-del:hover { color: var(--danger); background: rgba(239, 68, 68, 0.08); }

/* ---------- 预览区 ---------- */
.preview-area {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.viewer-container {
  flex: 1;
  min-height: 0;
  background: #fff;
  position: relative;
}
.viewer-container:empty::before {
  content: "";
  position: absolute;
  inset: 0;
}

.viewer-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  text-align: center;
  padding: 48px 24px;
}

.empty-illustration {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  margin-bottom: 8px;
}

.viewer-empty h3 { font-size: 18px; font-weight: 700; color: var(--text); margin: 0; }
.viewer-empty p { font-size: 14px; color: var(--text-muted); margin: 0; }

.format-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
  max-width: 400px;
}
.format-chips span {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}

.viewer-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--surface);
}

.viewer-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--danger);
  font-size: 14px;
  text-align: center;
}

/* open-file-viewer 填满 */
#viewer .ofv-root,
#viewer .ofv-viewport,
#viewer .ofv-stage,
#viewer .ofv-stage-inner,
#viewer .ofv-zoomable,
#viewer .ofv-scrollable,
#viewer .ofv-content {
  width: 100% !important;
  height: 100% !important;
}

/* ============================================
   功能特性
   ============================================ */
.features, .formats, .faq {
  padding: 72px 24px;
}

.section-container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c, var(--brand)) 12%, transparent);
  color: var(--c, var(--brand));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }

/* ============================================
   格式展示
   ============================================ */
.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.format-cat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.format-cat h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.fmt-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fmt-list span {
  background: var(--surface-hover);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
}

/* ============================================
   FAQ
   ============================================ */
.faq-list { max-width: 760px; margin: 0 auto; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 24px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--text-muted);
  font-weight: 300;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
  padding: 0 24px 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* ============================================
   页脚
   ============================================ */
.footer {
  background: #0f172a;
  padding: 32px 24px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}
.footer-copy { color: rgba(255, 255, 255, 0.3); font-size: 12px; font-weight: 400; }
.footer-links { display: flex; gap: 8px; color: rgba(255, 255, 255, 0.4); font-size: 12px; }
.footer-links a { color: rgba(255, 255, 255, 0.7); }

/* ============================================
   登录/注册模态弹窗
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay[hidden] { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 420px;
  padding: 32px 36px;
  position: relative;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--surface-hover);
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--surface-hover); color: var(--text); }

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--surface-hover);
  padding: 4px;
  border-radius: var(--radius);
}
.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.auth-form { display: none; }
.auth-form.active { display: flex; flex-direction: column; gap: 16px; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.form-field input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--surface);
  color: var(--text);
}
.form-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.form-code { display: flex; gap: 8px; align-items: flex-end; }
.form-code input { flex: 1; }
.btn-code {
  white-space: nowrap;
  border: 1px solid var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.btn-code:hover { background: var(--brand); color: #fff; }
.btn-code:disabled { opacity: 0.5; cursor: not-allowed; }

.form-row { display: flex; justify-content: flex-end; margin-top: -8px; }

.auth-msg {
  margin-top: 12px;
  padding: 0;
  font-size: 13px;
  text-align: center;
  border-radius: var(--radius-sm);
  min-height: 0;
  overflow: hidden;
  transition: all 0.2s;
}
.auth-msg.show {
  padding: 10px 14px;
  min-height: 36px;
}
.auth-msg.success { background: rgba(16, 185, 129, 0.08); color: var(--success); }
.auth-msg.error { background: rgba(239, 68, 68, 0.08); color: var(--danger); }
.auth-msg.info { background: var(--brand-soft); color: var(--brand); }

/* ============================================
   拖拽提示（右下角小卡片）
   ============================================ */
.drop-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
  background: var(--surface);
  border: 2px dashed var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  animation: slideInRight 0.2s ease;
}
.drop-toast[hidden] { display: none; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   Toast 消息
   ============================================ */
.toast-container {
  position: fixed;
  top: calc(var(--nav-h) + 16px);
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.25s ease;
  max-width: 380px;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--brand); }

.toast.fade-out { animation: fadeOut 0.3s ease forwards; }
@keyframes fadeOut { to { opacity: 0; transform: translateX(40px); } }

/* ============================================
   登录门控遮罩
   ============================================ */
.gate-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  z-index: 10;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
}
.gate-locked .gate-overlay {
  display: flex;
}
.gate-content {
  text-align: center;
  color: var(--text-inverse);
  padding: 32px;
}
.gate-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-light);
}
.gate-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}
.gate-content p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 960px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-menu { display: none; }
  .brand-tag { display: none; }
}

@media (max-width: 768px) {
  .hero { padding: 56px 20px 44px; }
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }

  .workspace { padding: 0 16px; margin-top: -20px; }
  .workspace-inner {
    grid-template-columns: 1fr;
    grid-template-rows: 200px 1fr;
    height: auto;
    min-height: 500px;
  }

  .features, .formats, .faq { padding: 48px 16px; }
  .section-title { font-size: 26px; }
  .feature-grid { grid-template-columns: 1fr; }
  .format-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; text-align: center; }

  .modal { padding: 24px 20px; max-width: calc(100vw - 32px); }
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }