/* ═══════════════════════════════════════════════════════════
   威视界 - 全局样式系统 v2.0
   设计理念：专业 · 现代 · 温暖
   ═══════════════════════════════════════════════════════════ */

/* ─── CSS Variables / Design Tokens ──────────── */
:root {
  /* Brand */
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-800: #3730a3;
  --brand-900: #312e81;

  /* Accent - Warm Orange */
  --accent-50: #fff7ed;
  --accent-100: #ffedd5;
  --accent-200: #fed7aa;
  --accent-400: #fb923c;
  --accent-500: #f97316;
  --accent-600: #ea580c;

  /* Semantic */
  --success-50: #ecfdf5;
  --success-400: #34d399;
  --success-500: #10b981;
  --success-600: #059669;
  --error-50: #fef2f2;
  --error-400: #f87171;
  --error-500: #ef4444;
  --error-600: #dc2626;
  --warning-50: #fffbeb;
  --warning-400: #fbbf24;
  --warning-500: #f59e0b;
  --warning-600: #d97706;

  /* Neutral */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Semantic mappings */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-500);
  --text-tertiary: var(--gray-400);
  --text-inverse: #ffffff;
  --border-light: var(--gray-200);
  --border-medium: var(--gray-300);
  --bg-page: #f5f5f7;
  --bg-card: #ffffff;
  --bg-hover: var(--gray-50);

  /* Effects */
  --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-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.07), 0 4px 10px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.08), 0 8px 16px rgba(0,0,0,0.04);
  --shadow-brand: 0 4px 14px rgba(99, 102, 241, 0.25);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
}

/* ─── Reset & Base ──────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#main-content { flex: 1 0 auto; }

a {
  color: var(--brand-600);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--brand-700); }

img { max-width: 100%; display: block; }

/* ─── Typography Utilities ───────────────────── */
.text-xs { font-size: 0.75rem; line-height: 1.5; }
.text-sm { font-size: 0.8125rem; line-height: 1.5; }
.text-base { font-size: 0.9375rem; line-height: 1.6; }
.text-lg { font-size: 1.0625rem; line-height: 1.6; }
.text-xl { font-size: 1.25rem; line-height: 1.5; }
.text-2xl { font-size: 1.5rem; line-height: 1.4; }
.text-3xl { font-size: 1.875rem; line-height: 1.3; }
.text-4xl { font-size: 2.25rem; line-height: 1.2; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

/* ─── Gradient Text ─────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-700) 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-warm {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--accent-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════ */

/* navbar (merged) */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 1.5rem;
}

/* 首页：导航与主体间距收紧，其余模块保持 1.5rem */
body.is-home #navbar {
  margin-bottom: 0.6rem;
}

/* LOGO：贴浏览器最左 */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
  padding-left: 2rem;
}

/* 中间区域：1200px 居中容器，菜单在容器内左对齐 */
.navbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.navbar-menu {
  max-width: 1200px;
  width: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
}

.navbar-logo {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(14,165,233,0.28);
}
.navbar-logo svg,
.navbar-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 3px 8px rgba(99,102,241,0.35));
}
.navbar-logo:hover {
  transform: scale(1.12) rotate(-2deg);
}

.navbar-title {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-size: 1.3rem;
  letter-spacing: 0;
}

/* 威 - 稳重有力 */
.brand-wei {
  font-weight: 900;
  color: #1e1b4b;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(99,102,241,0.15);
}

/* 软 - 柔和过渡 */
.brand-ruan {
  font-weight: 600;
  background: linear-gradient(135deg, #4338ca, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.02em;
}

/* 间隔点 */
.brand-dot {
  font-weight: 700;
  color: #a855f7;
  margin: 0 0.1em;
  font-size: 0.9em;
}

/* 助 - 醒目 */
.brand-zhu {
  font-weight: 900;
  color: #f97316;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(249,115,22,0.2);
}

/* 手 - 收尾 */
.brand-shou {
  font-weight: 500;
  color: #6b7280;
  letter-spacing: 0.01em;
}

.navbar-menu a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-out);
}

.navbar-menu a:hover {
  color: var(--brand-600);
  background: var(--brand-50);
}

.nav-menu-link.nav-menu-active {
  color: var(--brand-600) !important;
  background: var(--brand-50) !important;
  font-weight: 700 !important;
}


/* 后台管理导航（admin navbar 右侧） */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0 2rem 0 0;
}

.navbar-nav li {
  display: flex;
  align-items: center;
  list-style: none;
}

.navbar-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-out);
}

.navbar-nav a:hover {
  color: var(--brand-600);
  background: var(--brand-50);
}

.admin-nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  background: var(--accent-50);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-600);
  white-space: nowrap;
}

/* 用户区 */
.navbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding-right: 2rem;
}

.nav-user-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  background: var(--brand-50);
  border-radius: var(--radius-full);
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500), #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.nav-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-700);
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* Primary */
.btn-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  color: white;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

/* Secondary */
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1.5px solid var(--border-light);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-medium);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--brand-600);
  border: 1.5px solid var(--brand-300);
}
.btn-outline:hover:not(:disabled) {
  background: var(--brand-50);
  border-color: var(--brand-500);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Danger */
.btn-danger {
  background: var(--error-500);
  color: white;
}
.btn-danger:hover:not(:disabled) {
  background: var(--error-600);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Success */
.btn-success {
  background: var(--success-500);
  color: white;
}
.btn-success:hover:not(:disabled) {
  background: var(--success-600);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Sizes */
.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
}
.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-xs);
}
.btn-xl {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-block { width: 100%; }

/* Loading state */
.btn-loading {
  pointer-events: none;
  color: transparent !important;
}
.btn-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════════ */

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.form-label .required {
  color: var(--error-500);
  margin-left: 2px;
}

.form-input {
  width: 100%;
  padding: 0.65rem 0.875rem;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
  box-shadow: var(--shadow-xs);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-input:hover {
  border-color: var(--border-medium);
}

.form-input:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--shadow-xs);
}

.form-input.error {
  border-color: var(--error-400);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}
.form-input.error:focus {
  border-color: var(--error-500);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-input.success {
  border-color: var(--success-400);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.3rem;
}

.form-error {
  font-size: 0.75rem;
  color: var(--error-500);
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: all var(--duration-fast) var(--ease-out);
}
.form-error.show {
  opacity: 1;
  height: auto;
}

.input-group {
  display: flex;
  gap: 0.625rem;
}
.input-group .form-input { flex: 1; }

/* Code button in input group */
.btn-send-code {
  min-width: 115px;
  padding: 0.65rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--brand-600);
  border: 1.5px solid var(--brand-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.btn-send-code:hover:not(:disabled) {
  background: var(--brand-50);
  border-color: var(--brand-500);
}
.btn-send-code.counting {
  color: var(--text-tertiary);
  border-color: var(--border-light);
  background: var(--bg-page);
}

/* Select */
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-500);
  cursor: pointer;
}

/* ═══════════════════════════════════════════════
   AUTH PAGES (注册/登录)
   ═══════════════════════════════════════════════ */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 30%, #312e81 60%, #1e1b4b 100%);
}

/* Animated background orbs */
.auth-wrapper::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 70%);
  top: -200px;
  right: -150px;
  animation: orb-float-1 12s ease-in-out infinite;
}

.auth-wrapper::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.2), transparent 70%);
  bottom: -180px;
  left: -120px;
  animation: orb-float-2 15s ease-in-out infinite;
}

@keyframes orb-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes orb-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-30px, -20px) scale(1.1); }
  66% { transform: translate(20px, 30px) scale(0.92); }
}

.auth-container {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 2.5rem 2.25rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  width: 56px;
  height: 56px;
  background: transparent;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
  overflow: hidden;
}
.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 1.75rem;
  gap: 3px;
}

.auth-tab {
  flex: 1;
  padding: 0.55rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  border-radius: 6px;
  transition: all var(--duration-fast) var(--ease-out);
}

.auth-tab.active {
  background: white;
  color: var(--brand-600);
  box-shadow: var(--shadow-sm);
}

.auth-tab-content {
  display: none;
  animation: fadeSlideIn 0.3s var(--ease-out);
}
.auth-tab-content.active {
  display: block;
}

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

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--brand-600);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.auth-footer a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════
   HOMEPAGE (首页)
   ═══════════════════════════════════════════════ */

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 4rem 2rem 3rem;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  background: var(--brand-50);
  color: var(--brand-600);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid var(--brand-200);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--brand-500);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

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

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand-400), transparent);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.9rem;
  transition: transform var(--duration-normal) var(--ease-out);
}
.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

.feature-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Platform icon colors */
.icon-red { background: #fef2f2; }
.icon-blue { background: #eff6ff; }
.icon-green { background: #ecfdf5; }
.icon-purple { background: #f5f3ff; }
.icon-amber { background: #fffbeb; }
.icon-rose { background: #fff1f2; }

/* ═══════════════════════════════════════════════
   HOME DASHBOARD (已登录首页)
   ═══════════════════════════════════════════════ */

.home-dashboard {
  animation: fadeInUp 0.35s var(--ease-out);
}

.home-welcome {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  margin-bottom: 1.5rem;
}

.home-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500), #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

.home-welcome h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.home-welcome p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.home-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  text-align: center;
}
.home-action-card:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.home-action-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0.75rem 0 0.3rem;
}
.home-action-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

.ha-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.ha-icon-write { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.ha-icon-live { background: linear-gradient(135deg, #f97316, #ef4444); }
.ha-icon-hot { background: linear-gradient(135deg, #10b981, #059669); }

.home-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.home-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}

.home-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-600);
  line-height: 1.2;
}

.home-stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ═══════════════════════════════════════════════
   WORKSPACE (撰写软文 - 登录后)
   ═══════════════════════════════════════════════ */

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.workspace-greeting h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.workspace-greeting p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.quick-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.quick-action-card:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.quick-action-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.quick-action-card p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card-mini {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon-mini {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.stat-info-mini .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-info-mini .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════
   ADMIN PANEL (后台管理)
   ═══════════════════════════════════════════════ */

.admin-layout {
  display: flex;
  min-height: calc(100vh - 64px);
}

.admin-sidebar {
  width: 250px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-light);
  padding: 1.5rem 1rem;
  flex-shrink: 0;
}

.admin-sidebar-section {
  margin-bottom: 1.5rem;
}

.admin-sidebar-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  margin-bottom: 0.15rem;
}
.menu-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.menu-item.active {
  background: var(--brand-50);
  color: var(--brand-600);
  font-weight: 600;
}

.menu-item .menu-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.admin-content {
  flex: 1;
  padding: 2rem 2.5rem;
  overflow-x: auto;
  background: var(--bg-page);
}

/* Page Header */
.page-header {
  margin-bottom: 1.5rem;
}
.page-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-header p {
  margin-top: 0.25rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  transition: all var(--duration-fast) var(--ease-out);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card .stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.stat-card .stat-trend {
  font-size: 0.75rem;
  margin-top: 0.4rem;
}
.stat-card .stat-trend.up { color: var(--success-500); }
.stat-card .stat-trend.down { color: var(--error-500); }

/* Table */
.table-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  gap: 1rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  max-width: 340px;
  position: relative;
}

.search-box .search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.search-box input {
  flex: 1;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  outline: none;
  transition: all var(--duration-fast) var(--ease-out);
  background: var(--bg-page);
}
.search-box input:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
  background: white;
}

/* Table styles */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table thead th {
  padding: 0.8rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

table tbody td {
  padding: 0.85rem 1.25rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--text-primary);
}

table tbody tr {
  transition: background var(--duration-fast) var(--ease-out);
}
table tbody tr:hover {
  background: var(--brand-50);
}
table tbody tr:last-child td {
  border-bottom: none;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.status-badge.active {
  background: var(--success-50);
  color: var(--success-600);
}
.status-badge.disabled {
  background: var(--error-50);
  color: var(--error-600);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.active { background: var(--success-500); box-shadow: 0 0 4px var(--success-400); }
.status-dot.disabled { background: var(--error-400); }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.25rem;
  border-top: 1px solid var(--border-light);
}

.pagination button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pagination button:hover:not(:disabled):not(.active) {
  border-color: var(--brand-300);
  color: var(--brand-600);
  background: var(--brand-50);
}
.pagination button.active {
  background: var(--brand-500);
  color: white;
  border-color: var(--brand-500);
  font-weight: 600;
}
.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-left: 0.75rem;
}

/* ═══════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  pointer-events: none;
}

.toast {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  animation: toast-in 0.35s var(--ease-out);
  max-width: 400px;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.toast.success {
  background: rgba(236, 253, 245, 0.95);
  color: var(--success-600);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.toast.error {
  background: rgba(254, 242, 242, 0.95);
  color: var(--error-600);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.toast.warning {
  background: rgba(255, 251, 235, 0.95);
  color: var(--warning-600);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.toast.info {
  background: rgba(239, 246, 255, 0.95);
  color: #1e40af;
  border: 1px solid rgba(147, 197, 253, 0.3);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(60px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.toast-out {
  animation: toast-out 0.25s var(--ease-in-out) forwards;
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(80px) scale(0.9); }
}

/* ═══════════════════════════════════════════════
   MODAL / DIALOG
   ═══════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: overlay-in 0.2s var(--ease-out);
}

@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2rem;
  max-width: 440px;
  width: 90%;
  animation: modal-in 0.25s var(--ease-out);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.modal-body {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
}

/* ═══════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 3.5rem 2rem;
  color: var(--text-tertiary);
}

.empty-state .empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.empty-state h4 {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.empty-state p {
  font-size: 0.8125rem;
}

/* ═══════════════════════════════════════════════
   SPINNER
   ═══════════════════════════════════════════════ */

.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--border-light);
  border-top-color: var(--brand-500);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.spinner-lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.spinner-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

/* ═══════════════════════════════════════════════
   SKELETON LOADING
   ═══════════════════════════════════════════════ */

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-xs);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
  }
  .admin-content { padding: 1.25rem; }
  .page-container { padding: 1.25rem; }
  .auth-card { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.6rem; }
}

/* ═══════════════════════════════════════════════
   LIVE PAGE - 直播精灵页面
   ═══════════════════════════════════════════════ */

.live-page {
  animation: fadeInUp 0.35s var(--ease-out);
}

.live-page-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  margin-bottom: 1.5rem;
}

.live-page-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f97316, #ef4444);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 20px rgba(249,115,22,0.35);
  flex-shrink: 0;
}

.live-page-hero h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.live-page-hero p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.live-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.live-page-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: all var(--duration-normal) var(--ease-out);
}
.live-page-card:hover {
  border-color: var(--accent-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.live-page-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.live-page-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.live-page-card p {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.live-page-footer {
  text-align: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  color: var(--accent-600);
  font-weight: 500;
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .live-page-grid { grid-template-columns: 1fr; }
  .home-actions { grid-template-columns: 1fr; }
  .home-stats-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════
   会员中心 / 会员相关 (membership)
   ═══════════════════════════════════ */

/* 会员等级徽章 */
.member-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.member-badge.normal {
  background: var(--gray-100);
  color: var(--gray-600);
  border-color: var(--gray-200);
}
.member-badge.silver {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #475569;
  border-color: #cbd5e1;
}
.member-badge.gold {
  background: linear-gradient(135deg, #fef9c3, #fde68a);
  color: #92400e;
  border-color: #fcd34d;
}
.member-badge.diamond {
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  color: #4338ca;
  border-color: #a5b4fc;
}

/* 首页会员状态横幅 —— 仅首页展示，宽度与下方主体（.page-container 1200px）一致 */
.member-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin: 0 0 0.9rem;
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  background: var(--bg-card);
  animation: fadeInDown 0.35s var(--ease-out);
}
/* 首页：收窄会员条与顶部菜单之间的间距 */
.is-home .page-container { padding-top: 1.25rem; }
.member-banner-normal {
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border-color: #fed7aa;
}
.member-banner-vip {
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  border-color: #c7d2fe;
}
.member-banner-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.member-banner-badge {
  font-size: 0.8125rem;
}

/* 会员中心页面 */
.member-page { animation: fadeInUp 0.35s var(--ease-out); }
.member-header { margin-bottom: 1.5rem; }
.member-header h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.member-header p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.25rem; }

/* 当前会员状态卡片 */
.member-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}
.member-status-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--brand-400);
}
.member-status-card.silver::before { background: linear-gradient(180deg, #94a3b8, #64748b); }
.member-status-card.gold::before { background: linear-gradient(180deg, #fbbf24, #d97706); }
.member-status-card.diamond::before { background: linear-gradient(180deg, #818cf8, #4338ca); }
.member-status-left { display: flex; align-items: center; gap: 1rem; }
.member-status-left .member-badge { font-size: 0.9375rem; padding: 0.3rem 0.85rem; }
.member-status-name { font-size: 1rem; font-weight: 700; margin-bottom: 0.15rem; }
.member-status-meta { font-size: 0.8125rem; color: var(--text-secondary); }
.member-status-meta strong { color: var(--brand-600); font-size: 0.9375rem; }
.member-status-tag {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--success-600);
  background: var(--success-50);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
}

/* 普通博主提示条 */
.member-tip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--warning-50);
  border: 1px solid #fde68a;
  color: var(--warning-600);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
.member-tip-icon { font-size: 1.1rem; }
.member-tip strong { color: var(--warning-600); }

/* 套餐区 */
.member-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
}
.member-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.member-plan-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--duration-normal) var(--ease-out);
}
.member-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.member-plan-card.silver { border-top: 4px solid #94a3b8; }
.member-plan-card.gold { border-top: 4px solid #fbbf24; }
.member-plan-card.diamond {
  border-top: 4px solid #818cf8;
  background: linear-gradient(180deg, #faf5ff, #ffffff);
  box-shadow: var(--shadow-md);
}
.member-plan-flag {
  position: absolute;
  top: 1rem;
  right: -0.5px;
  background: linear-gradient(135deg, var(--brand-500), #a855f7);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full) 0 0 var(--radius-full);
}
.member-plan-name { font-size: 1.125rem; font-weight: 800; margin-bottom: 0.5rem; }
.member-plan-price { font-size: 2rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.member-price-symbol { font-size: 1.1rem; font-weight: 700; vertical-align: super; margin-right: 0.1rem; }
.member-plan-cycle { font-size: 0.8125rem; font-weight: 500; color: var(--text-tertiary); margin-left: 0.2rem; }
.member-benefits {
  list-style: none;
  margin: 1.25rem 0;
  flex: 1;
}
.member-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 0.35rem 0;
  line-height: 1.5;
}
.member-benefit-check {
  color: var(--success-500);
  font-weight: 700;
  flex-shrink: 0;
}
.member-plan-btn { margin-top: auto; }

/* 支付弹窗 */
.pay-modal { max-width: 420px; text-align: center; }
.pay-body { display: flex; flex-direction: column; align-items: center; }
.pay-amount { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin: 0.5rem 0 1.25rem; }
.pay-amount strong { font-size: 2rem; }
.pay-cycle { font-size: 0.8125rem; color: var(--text-tertiary); font-weight: 500; }
.pay-qr {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.pay-qr-img { width: 100%; height: 100%; object-fit: contain; }
.pay-qr-placeholder { text-align: center; color: var(--text-tertiary); font-size: 0.8125rem; line-height: 1.8; }
.pay-hint { font-size: 0.8125rem; color: var(--text-tertiary); margin-bottom: 1rem; }

@media (max-width: 768px) {
  .member-plans-grid { grid-template-columns: 1fr; }
  .member-status-card { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ═══════════════════════════════════════════════════════════
   小说天下 (Novel World) — 章 / 节 / 内容 三栏布局
   层级：章 → 节 → 内容（节才有内容，节在章下）
   ═══════════════════════════════════════════════════════════ */
.nv-3col {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1.25rem;
  height: calc(100vh - 64px);
}

.nv-col-ch, .nv-col-sec, .nv-col-tree {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - 96px);
}
.nv-col-edit { background: transparent; min-width: 0; }

.nv-ch-head, .nv-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--gray-50);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  flex-shrink: 0;
}
.nv-side-title { font-weight: 700; font-size: .95rem; color: var(--text-primary); }
.nv-list { overflow: auto; padding: .5rem; flex: 1; }

.nv-li, .nv-sec-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem .8rem;
  margin-bottom: .4rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.nv-li:hover, .nv-sec-item:hover { background: var(--bg-hover); border-color: var(--border-light); }
.nv-li.active, .nv-sec-item.active {
  background: var(--brand-50);
  border-color: var(--brand-200);
  box-shadow: inset 3px 0 0 var(--brand-500);
}
.nv-li-main { min-width: 0; flex: 1; }
.nv-li-main h4, .nv-sec-item h4 {
  margin: 0 0 .2rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nv-li p, .nv-meta { margin: 0; font-size: .76rem; color: var(--text-secondary); line-height: 1.4; }
.nv-li-del {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--error-500);
  font-size: 1rem;
  cursor: pointer;
  padding: .2rem .45rem;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast);
}
.nv-li-del:hover { background: var(--error-50); }

.nv-empty {
  text-align: center;
  color: var(--text-tertiary);
  font-size: .85rem;
  padding: 2rem 1rem;
  line-height: 1.7;
}

/* 章节树形：章为可折叠父节点，节为子节点 */
.nv-tree { overflow: auto; padding: .5rem .6rem; flex: 1; }
.nv-tnode { margin-bottom: .3rem; }
.nv-tch {
  position: relative;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem .55rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.nv-tch:hover { background: var(--bg-hover); border-color: var(--border-light); }
.nv-tch.active { background: var(--brand-50); border-color: var(--brand-200); }
.nv-tch.active .nv-tch-main h4 { color: var(--brand-700); }
.nv-tcaret {
  flex-shrink: 0;
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .7rem; color: var(--text-secondary);
}
.nv-tch-main { min-width: 0; flex: 1; }
.nv-tch-main h4 {
  margin: 0 0 .18rem;
  font-size: .9rem; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nv-tch-main p { margin: 0; font-size: .74rem; color: var(--text-secondary); line-height: 1.4; }
.nv-tchildren {
  margin: .15rem 0 .3rem .95rem;
  padding-left: .55rem;
  border-left: 2px solid var(--border-light);
}
.nv-tsec {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.nv-tsec:hover { background: var(--bg-hover); }
.nv-tsec.active { background: var(--brand-50); border-color: var(--brand-200); box-shadow: inset 3px 0 0 var(--brand-500); }
.nv-tsec.active .nv-tsec-main h4 { color: var(--brand-700); }
.nv-tdot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-300); flex-shrink: 0; }
.nv-tsec-main { min-width: 0; flex: 1; }
.nv-tsec-main h4 {
  margin: 0 0 .15rem;
  font-size: .85rem; font-weight: 500; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nv-tsec-main p { margin: 0; font-size: .72rem; color: var(--text-secondary); line-height: 1.4; }
.nv-tempty { font-size: .76rem; color: var(--text-tertiary); padding: .35rem .55rem .15rem; }
.nv-tsec-add {
  margin: .3rem .2rem .15rem;
  padding: .3rem .6rem;
  font-size: .76rem;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px dashed var(--brand-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--duration-fast);
}
.nv-tsec-add:hover { background: var(--brand-100); }

/* 编辑区卡片 */
.nv-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.nv-card h3 { margin: 0; font-size: 1.05rem; color: var(--text-primary); }

.nv-form-row { display: flex; gap: .75rem; align-items: flex-end; margin-bottom: .75rem; }
.nv-form-row > div { display: flex; flex-direction: column; gap: .3rem; }
.nv-form-row label { font-size: .76rem; color: var(--text-secondary); }

.nv-input {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: .9rem;
  font-family: var(--font-sans);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.nv-input:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }

.nv-editor {
  width: 100%;
  min-height: 46vh;
  max-height: 60vh;
  padding: .9rem 1rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: .95rem;
  line-height: 1.8;
  font-family: var(--font-sans);
  resize: vertical;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.nv-editor:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }

.nv-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .5rem 0; }

/* AI 生成标题候选浮层 */
.nv-name-picker {
  margin: .6rem 0 .2rem;
  padding: .6rem;
  border: 1px solid var(--brand-200, #c7d2fe);
  border-radius: var(--radius-lg);
  background: var(--brand-50, #eef2ff);
  box-shadow: var(--shadow-sm);
}
.nv-np-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .82rem; font-weight: 600; color: var(--brand-600, #5b50e6);
  margin-bottom: .5rem;
}
.nv-np-close {
  background: transparent; border: none; cursor: pointer;
  font-size: .9rem; color: var(--text-tertiary); padding: .1rem .4rem; border-radius: 6px;
}
.nv-np-close:hover { background: rgba(0,0,0,.06); }
.nv-np-item {
  display: block; width: 100%; text-align: left;
  margin: .3rem 0; padding: .55rem .7rem;
  border: 1px solid var(--border-light); border-radius: var(--radius-md);
  background: var(--bg-card); color: var(--text-primary);
  font-size: .92rem; cursor: pointer; transition: all var(--duration-fast);
}
.nv-np-item:hover { border-color: var(--brand-400); background: #fff; box-shadow: 0 0 0 3px var(--brand-100); }

/* 响应式：窄屏堆叠 */
@media (max-width: 1024px) {
  .nv-3col { grid-template-columns: 1fr; height: auto; }
  .nv-col-ch, .nv-col-sec, .nv-col-tree { max-height: 420px; }
}

/* ───────────────────────── 全站页脚 (site-footer) ───────────────────────── */
.site-footer {
  background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 45%, #312e81 100%);
  color: #cbd5e1;
  margin-top: 0;
}
.sf-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 28px;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 32px;
}
.sf-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}
.sf-logo img,
.sf-logo-w {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
}
.sf-logo img {
  object-fit: cover;
  padding: 0;
}
.sf-desc {
  margin: 14px 0 16px;
  line-height: 1.8;
  font-size: 14px;
  color: #a5b4fc;
  max-width: 340px;
}
.sf-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #cbd5e1;
}
.sf-h {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
}
.sf-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sf-link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: color .15s;
}
.sf-link:hover { color: #fff; }
.sf-plats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sf-plat {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: #e2e8f0;
  font-size: 13px;
}
.sf-time {
  margin-top: 6px;
  font-size: 13px;
  color: #94a3b8;
}
.sf-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 18px 24px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}
.sf-bottom p { margin: 2px 0; }
.sf-icp { color: #64748b; }
@media (max-width: 900px) {
  .sf-wrap { grid-template-columns: 1fr 1fr; gap: 24px; }
  .sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .sf-wrap { grid-template-columns: 1fr; padding: 32px 18px 20px; }
}

/* 公众号二维码悬浮卡片（与服务器同步，禁止删除） */
.floating-qrcode {
  position: fixed;
  right: 20px;
  bottom: 100px;
  z-index: 9999;
  width: 170px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  padding: 14px;
  text-align: center;
  font-family: 'Plus Jakarta Sans','PingFang SC',sans-serif;
  animation: fq-slide-in .35s ease-out;
}
@keyframes fq-slide-in {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.fq-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  line-height: 22px;
  cursor: pointer;
  border-radius: 50%;
  transition: .2s;
}
.fq-close:hover { background: #f1f5f9; color: #475569; }
.fq-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}
.floating-qrcode img {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}
.fq-tip {
  margin: 10px 0 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}
@media (max-width: 768px) {
  .floating-qrcode { right: 12px; bottom: 80px; width: 150px; padding: 12px; }
  .floating-qrcode img { width: 120px; height: 120px; }
  .fq-title { font-size: 13px; }
}

/* 登录方式切换（密码 / 短信验证码）：与顶部登录/注册 tab 保持完全一致的胶囊样式 */
.login-method-tabs {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
  margin-bottom: 1.25rem;
}
.login-method-tabs .auth-tab {
  flex: 1;
  padding: 0.55rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-500);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.login-method-tabs .auth-tab.active {
  background: #fff;
  color: var(--brand-600);
  box-shadow: var(--shadow-sm);
}
