/* ==================== 全局变量和重置 ==================== */
:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --primary-dark: #3730a3;
  --primary-bg: #eef2ff;
  --accent: #06b6d4;
  --accent-light: #67e8f9;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --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;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-height: 56px;
  --bottom-nav-height: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 8px);
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
img { max-width: 100%; display: block; }
input, textarea, select { font: inherit; }

/* ==================== 通用组件 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}
.btn-primary:active { transform: scale(0.96); }

.btn-outline {
  border: 1.5px solid var(--primary);
  color: var(--primary);
}
.btn-outline:active { background: var(--primary-bg); }

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
}

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ==================== Header ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.logo-icon svg {
  width: 36px;
  height: 36px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-800);
  background-clip: text;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
  letter-spacing: 1px;
}

.header-actions {
  display: flex;
  gap: 4px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 18px;
  transition: all 0.2s;
}
.icon-btn:active {
  background: var(--gray-100);
  transform: scale(0.92);
}

/* 搜索栏 */
.search-bar {
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease;
  padding: 0 16px;
}
.search-bar.open {
  height: 56px;
  padding: 0 16px 12px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--gray-400);
  font-size: 14px;
}

.search-input-wrap input {
  width: 100%;
  height: 42px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 0 40px 0 40px;
  font-size: 15px;
  background: var(--gray-50);
  transition: all 0.3s;
  outline: none;
}
.search-input-wrap input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.search-clear {
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 12px;
}
.search-clear.visible { display: flex; }

/* ==================== Hero Banner ==================== */
.hero {
  position: relative;
  margin-top: var(--header-height);
  height: 260px;
  overflow: hidden;
  transition: margin-top 0.3s ease;
}

body.search-open .hero {
  margin-top: calc(var(--header-height) + 56px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #4338ca 60%, #6366f1 100%);
  background-image: url('https://dm30webimages.geely.com/GeelyPromotion/ANEW2/icon/chocolate/2025/1027/kv.pc.jpg');
  background-size: cover;
  background-position: center 40%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30,27,75,0.75) 0%, rgba(49,46,129,0.6) 40%, rgba(67,56,202,0.5) 100%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  animation: particleFloat 6s ease-in-out infinite;
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-200px) translateX(30px); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  color: white;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-title-line {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 4px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-title-sub {
  font-size: 16px;
  font-weight: 500;
  opacity: 0.9;
  letter-spacing: 6px;
}

.hero-desc {
  margin-top: 10px;
  font-size: 13px;
  opacity: 0.7;
  letter-spacing: 2px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  padding: 10px 24px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-stat-num {
  font-size: 20px;
  font-weight: 800;
}

.hero-stat-label {
  font-size: 11px;
  opacity: 0.7;
}

.hero-stat-divider {
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,0.2);
}

.hero-car-silhouette {
  position: absolute;
  bottom: -10px;
  right: -20px;
  width: 200px;
  height: 100px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'%3E%3Cpath d='M20 70 Q30 40 60 35 Q90 28 110 30 Q140 28 160 40 Q180 50 185 70 Z' fill='rgba(255,255,255,0.06)'/%3E%3Ccircle cx='55' cy='75' r='12' fill='rgba(255,255,255,0.05)'/%3E%3Ccircle cx='155' cy='75' r='12' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  opacity: 0.6;
}

/* ==================== 款式筛选 ==================== */
.filter-section {
  padding: 16px 0 0;
  position: sticky;
  top: var(--header-height);
  z-index: 99;
  background: var(--gray-50);
  transition: top 0.3s ease;
}

body.search-open .filter-section {
  top: calc(var(--header-height) + 56px);
}

.filter-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 16px 12px;
}
.filter-scroll::-webkit-scrollbar { display: none; }

.filter-tabs {
  display: flex;
  gap: 10px;
  width: max-content;
}

.filter-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-xl);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  background: white;
  border: 1.5px solid var(--gray-200);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-tab i {
  font-size: 12px;
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.filter-tab:not(.active):active {
  transform: scale(0.95);
  background: var(--gray-100);
}

/* ==================== 分类网格 ==================== */
.category-section {
  padding: 4px 16px 12px;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.category-card:active {
  transform: scale(0.92);
}

.category-card.active span {
  color: var(--primary);
  font-weight: 600;
}

.category-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s;
}

.category-card:active .category-icon {
  transform: scale(0.9);
}

.category-card span {
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 500;
}

/* ==================== 排序栏 ==================== */
.sort-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 12px;
}

.sort-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
}

.sort-right {
  display: flex;
  gap: 4px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.sort-btn {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  border-radius: 6px;
  transition: all 0.2s;
}

.sort-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ==================== 教程卡片 ==================== */
.tutorial-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tutorial-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: all 0.3s ease;
  animation: cardFadeIn 0.5s ease;
  cursor: pointer;
}

.tutorial-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-md);
}

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

.card-content {
  padding: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.card-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.badge-model {
  background: linear-gradient(135deg, var(--primary-bg), #dbeafe);
  color: var(--primary);
}

.badge-category {
  background: var(--gray-100);
  color: var(--gray-600);
}

.badge-cowboy {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-preview {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  font-size: 11px;
  color: var(--primary-light);
  background: var(--primary-bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}

.card-author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.card-author span {
  font-size: 12px;
  color: var(--gray-500);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--gray-400);
}

.meta-item i {
  font-size: 11px;
}

/* 图片卡片变体 */
.card-with-cover {
  display: flex;
  flex-direction: row;
}

.card-cover {
  width: 120px;
  min-height: 100px;
  flex-shrink: 0;
  background: var(--gray-200);
  background-size: cover;
  background-position: center;
}

.card-with-cover .card-content {
  flex: 1;
  min-width: 0;
}

/* ==================== 加载更多 ==================== */
.load-more {
  padding: 20px 16px;
  text-align: center;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xl);
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.load-more-btn:active {
  background: var(--gray-50);
  transform: scale(0.96);
}

/* ==================== 空状态 ==================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--gray-300);
}

.empty-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.empty-hint {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 20px;
}

/* ==================== 加载动画 ==================== */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
  color: var(--gray-400);
  font-size: 13px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== 底部导航 ==================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: var(--gray-400);
  transition: color 0.2s;
  padding: 4px 0;
  min-width: 50px;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item i {
  font-size: 20px;
}

.nav-publish {
  position: relative;
}

.nav-publish-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  margin-top: -20px;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
  transition: all 0.3s;
}

.nav-publish:active .nav-publish-btn {
  transform: scale(0.9);
}

/* ==================== Toast ==================== */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 10px);
  left: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  background: var(--gray-800);
  color: white;
  border-radius: var(--radius-md);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }

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

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

/* ==================== 发布页面 ==================== */
.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.page-header .back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--gray-700);
}
.page-header .back-btn:active { background: var(--gray-100); }

.page-header .page-title {
  font-size: 17px;
  font-weight: 700;
}

.page-header .submit-btn {
  padding: 7px 18px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3);
}
.page-header .submit-btn:active { transform: scale(0.95); }
.page-header .submit-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.publish-page {
  padding-top: calc(var(--header-height) + 16px);
  padding-bottom: 100px;
  min-height: 100vh;
}

.form-group {
  padding: 0 16px;
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

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

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 15px;
  background: white;
  transition: all 0.3s;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

textarea.form-input {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

/* 选择款式 */
.model-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.model-option {
  flex: 1;
  min-width: calc(50% - 5px);
  padding: 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  transition: all 0.3s;
  background: white;
}

.model-option:active {
  transform: scale(0.96);
}

.model-option.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.model-option i {
  display: block;
  font-size: 24px;
  margin-bottom: 4px;
}

/* 内容编辑器 */
.editor-area {
  padding: 0 16px;
  margin-bottom: 16px;
}

.content-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.content-block {
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: cardFadeIn 0.3s ease;
}

.block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
}

.block-type {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.block-type i { color: var(--primary); }

.block-actions {
  display: flex;
  gap: 4px;
}

.block-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--gray-400);
  transition: all 0.2s;
}
.block-action-btn:active {
  background: var(--gray-200);
  color: var(--gray-600);
}
.block-action-btn.delete:active {
  background: #fef2f2;
  color: var(--danger);
}

.block-body {
  padding: 12px;
}

.block-body textarea {
  width: 100%;
  min-height: 80px;
  border: none;
  outline: none;
  resize: vertical;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-700);
}

.block-body textarea::placeholder {
  color: var(--gray-400);
}

.block-image-preview {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--gray-100);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.block-image-preview img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.block-image-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px;
  color: var(--gray-400);
  cursor: pointer;
}

.block-image-upload i {
  font-size: 32px;
}

.block-video-input {
  width: 100%;
  padding: 10px;
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  text-align: center;
}

.block-video-input:focus {
  border-color: var(--primary);
}

/* 添加内容块按钮 */
.add-block-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 16px;
}

.add-block-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 20px;
  background: white;
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-md);
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s;
  flex: 1;
}

.add-block-btn i {
  font-size: 20px;
  color: var(--primary);
}

.add-block-btn:active {
  border-color: var(--primary);
  background: var(--primary-bg);
  transform: scale(0.96);
}

/* ==================== 教程详情页 ==================== */
.tutorial-page {
  padding-top: var(--header-height);
  padding-bottom: calc(80px + var(--safe-bottom));
  min-height: 100vh;
}

.tutorial-hero {
  background: linear-gradient(135deg, #1e1b4b, #4338ca);
  padding: 24px 16px;
  color: white;
}

.tutorial-model-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-xl);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  backdrop-filter: blur(10px);
}

.tutorial-detail-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 14px;
}

.tutorial-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  opacity: 0.8;
}

.tutorial-info-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 教程内容 */
.tutorial-body {
  padding: 20px 16px;
}

.tutorial-text-block {
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray-700);
  margin-bottom: 16px;
}

.tutorial-text-block h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 20px 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}

.tutorial-text-block h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 16px 0 8px;
}

.tutorial-text-block ul, .tutorial-text-block ol {
  padding-left: 20px;
  margin: 8px 0;
}

.tutorial-text-block li {
  margin-bottom: 4px;
}

.tutorial-text-block strong {
  color: var(--gray-800);
}

.tutorial-text-block code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.tutorial-image-block {
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--gray-100);
}

.tutorial-image-block img {
  width: 100%;
}

.tutorial-video-block {
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  position: relative;
  padding-bottom: 56.25%;
}

.tutorial-video-block iframe,
.tutorial-video-block video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* 互动栏 */
.tutorial-actions {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--gray-50);
  transition: all 0.3s;
}

.action-btn:active {
  transform: scale(0.95);
}

.action-btn.liked {
  color: var(--danger);
  background: #fef2f2;
}

.action-btn i {
  font-size: 18px;
}

/* 评论区 */
.comments-section {
  padding: 16px;
  padding-bottom: 120px;
}

.comments-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comments-count {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
}

.comment-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
  animation: cardFadeIn 0.3s ease;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.comment-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.comment-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.comment-time {
  font-size: 12px;
  color: var(--gray-400);
}

.comment-content {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
  padding-left: 40px;
}

/* 评论输入框 */
.comment-input-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px;
  padding-bottom: calc(10px + var(--safe-bottom));
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  z-index: 100;
}

.comment-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  transition: border-color 0.3s;
}

.comment-input-wrap:focus-within {
  border-color: var(--primary);
}

.comment-name-input {
  border: none;
  background: none;
  font-size: 12px;
  color: var(--gray-500);
  outline: none;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray-200);
}

.comment-text-input {
  border: none;
  background: none;
  font-size: 14px;
  outline: none;
  min-height: 20px;
  max-height: 80px;
  resize: none;
}

.comment-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3);
  transition: all 0.3s;
}

.comment-send-btn:active {
  transform: scale(0.9);
}

.comment-send-btn:disabled {
  opacity: 0.5;
}

/* ==================== 管理后台 ==================== */
.admin-page {
  padding-top: var(--header-height);
  min-height: 100vh;
  background: var(--gray-50);
}

/* 登录页 */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: white;
  border-radius: var(--radius-xl);
  padding: 36px 24px;
  box-shadow: var(--shadow-xl);
}

.login-logo {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}

.login-logo h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-800);
}

.login-logo p {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 4px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-group {
  position: relative;
}

.input-group i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 16px;
}

.input-group input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 15px;
  outline: none;
  transition: all 0.3s;
}

.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* 管理后台仪表盘 */
.admin-dashboard {
  padding: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}

.stat-card-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-800);
}

.stat-card-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* 管理列表 */
.admin-section {
  background: white;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.admin-section-title {
  font-size: 16px;
  font-weight: 700;
}

.admin-filter-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--gray-100);
}

.admin-filter-btn {
  padding: 5px 14px;
  border-radius: var(--radius-xl);
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--gray-100);
  white-space: nowrap;
  transition: all 0.2s;
}

.admin-filter-btn.active {
  background: var(--primary);
  color: white;
}

.admin-tutorial-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-50);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-tutorial-info {
  flex: 1;
  min-width: 0;
}

.admin-tutorial-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.admin-tutorial-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--gray-400);
}

.admin-tutorial-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.admin-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s;
}

.admin-action-btn.edit {
  background: #eff6ff;
  color: #3b82f6;
}
.admin-action-btn.approve {
  background: #ecfdf5;
  color: var(--success);
}
.admin-action-btn.reject {
  background: #fef2f2;
  color: var(--danger);
}
.admin-action-btn.delete {
  background: var(--gray-100);
  color: var(--gray-500);
}

.status-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.status-approved {
  background: #ecfdf5;
  color: var(--success);
}

.status-pending {
  background: #fffbeb;
  color: var(--warning);
}

.status-rejected {
  background: #fef2f2;
  color: var(--danger);
}

/* 修改密码弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: white;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 400px;
  padding: 24px;
  animation: slideUp 0.3s ease;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions .btn {
  flex: 1;
}

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

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

/* ==================== 响应式适配 ==================== */
@media (min-width: 768px) {
  .main-content {
    max-width: 640px;
    margin: 0 auto;
  }

  .bottom-nav {
    max-width: 640px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .hero { height: 260px; }
  .hero-title-line { font-size: 36px; }
  .hero-title-sub { font-size: 18px; }

  .category-grid {
    grid-template-columns: repeat(8, 1fr);
  }

  .comment-input-bar {
    max-width: 640px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 2px;
}

/* ==================== 页面过渡 ==================== */
.page-transition {
  animation: pageIn 0.4s ease;
}

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

/* ==================== 骨架屏 ==================== */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
}

.skeleton-title {
  height: 20px;
  width: 80%;
  margin-bottom: 10px;
}

.skeleton-text {
  height: 14px;
  width: 100%;
  margin-bottom: 6px;
}

.skeleton-text-short {
  height: 14px;
  width: 60%;
}

.skeleton-meta {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.skeleton-meta-item {
  height: 12px;
  width: 50px;
}

/* ==================== 下拉刷新动画 ==================== */
.pull-refresh {
  text-align: center;
  padding: 16px;
  color: var(--gray-400);
  font-size: 13px;
  display: none;
}

/* ==================== 标签选择 ==================== */
.tag-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag-input-wrap .tag {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
}

.tag-input-wrap .tag:active {
  background: var(--primary);
  color: white;
}

.tag-input-wrap input {
  flex: 1;
  min-width: 100px;
  border: none;
  outline: none;
  font-size: 14px;
  padding: 6px 0;
}

/* ==================== 分类选择器（发布页） ==================== */
.category-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-option {
  padding: 8px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xl);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  transition: all 0.3s;
  background: white;
}

.category-option.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary);
}

/* ==================== 封面上传 ==================== */
.cover-upload {
  position: relative;
  width: 100%;
  height: 180px;
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gray-400);
  cursor: pointer;
  overflow: hidden;
  background: var(--gray-50);
  transition: all 0.3s;
}

.cover-upload:active {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.cover-upload i {
  font-size: 36px;
}

.cover-upload span {
  font-size: 13px;
}

.cover-upload img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-upload .cover-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 2;
}

/* ==================== 确认弹窗 ==================== */
.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  animation: fadeIn 0.2s ease;
}

.confirm-box {
  position: relative;
  background: white;
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  animation: slideUp 0.3s ease;
}

.confirm-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
}

.confirm-actions .btn { flex: 1; }

/* ==================== 媒体浏览器（图片查看器 + 视频播放器） ==================== */
.mv-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.2s ease;
  /* 关键：阻止浏览器默认的手势缩放 */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.mv-overlay.mv-active {
  opacity: 1;
}

/* 顶部工具栏 */
.mv-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  flex-shrink: 0;
  z-index: 2;
}

.mv-counter {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
}

.mv-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
}

.mv-close-btn:active {
  background: rgba(255, 255, 255, 0.3);
}

/* 图片画布区域 */
.mv-canvas {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.mv-canvas:active {
  cursor: grabbing;
}

.mv-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
}

/* 底部提示 */
.mv-hint {
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  flex-shrink: 0;
}

/* 视频播放器覆盖层 */
.mv-video-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mv-video-player {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  background: #000;
}

.mv-video-frame {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  border: none;
}

/* 教程中的视频播放按钮覆盖层 */
.tutorial-video-block .video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background 0.2s;
  z-index: 1;
}

.tutorial-video-block .video-play-overlay:active {
  background: rgba(0, 0, 0, 0.5);
}

.tutorial-video-block .video-play-overlay i {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 图片点击提示 */
.tutorial-image-block img {
  cursor: zoom-in;
}

/* ==================== 附件块 ==================== */
/* 发布页 - 已上传附件 */
.attachment-uploaded {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
}

.attachment-file-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.attachment-file-info {
  flex: 1;
  min-width: 0;
}

.attachment-file-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-file-meta {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}

/* 详情页 - 附件下载卡 */
.tutorial-attachment-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
}

.tutorial-attachment-block:active {
  transform: scale(0.98);
  border-color: var(--primary);
  background: var(--primary-bg);
}

.attachment-download-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3);
}

.block-attachment-preview {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--gray-100);
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== 启动页 ==================== */
.splash-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99999;
  overflow: hidden;
  background: #8b6aae;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.splash-screen.fade-out {
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
}

/* 全屏背景图 - object-fit cover 铺满 */
.splash-hero {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
}
.splash-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
  animation: splashKenBurns 3.5s ease-out both;
}
@keyframes splashKenBurns {
  0% { transform: scale(1.08); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* 顶部区域 */
.splash-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 35%;
  z-index: 3;
}
.splash-top-mask {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom,
    rgba(80, 45, 110, 0.85) 0%,
    rgba(80, 45, 110, 0.5) 50%,
    transparent 100%);
}
.splash-top-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(15vh);
  gap: 0;
}
.splash-logo-text {
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 10px;
  text-shadow: 0 2px 20px rgba(80, 45, 110, 0.5);
  animation: splashTitleIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
@keyframes splashTitleIn {
  0% { opacity: 0; transform: translateY(-30px) scale(0.9); letter-spacing: 20px; }
  100% { opacity: 1; transform: translateY(0) scale(1); letter-spacing: 10px; }
}
.splash-divider {
  width: 40px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  margin: 14px 0 12px;
  border-radius: 1px;
  animation: splashDividerIn 0.8s ease-out 0.6s both;
}
@keyframes splashDividerIn {
  0% { opacity: 0; width: 0; }
  100% { opacity: 1; width: 40px; }
}
.splash-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 6px;
  font-weight: 300;
  animation: splashSubIn 0.8s ease-out 0.8s both;
}
@keyframes splashSubIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 底部区域 */
.splash-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 22%;
  z-index: 3;
}
.splash-bottom-mask {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top,
    rgba(80, 45, 110, 0.9) 0%,
    rgba(80, 45, 110, 0.4) 60%,
    transparent 100%);
}
.splash-bottom-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: calc(36px + var(--safe-bottom));
  gap: 18px;
}

/* 进度条加载动画 */
.splash-loader {
  width: 120px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 1px;
  overflow: hidden;
  animation: splashFadeIn 0.6s ease-out 1s both;
}
.splash-loader-bar {
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  border-radius: 1px;
  animation: splashLoaderSlide 1.5s ease-in-out infinite;
}
@keyframes splashLoaderSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.splash-brand {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 3px;
  font-weight: 300;
  animation: splashFadeIn 0.6s ease-out 1.2s both;
}
@keyframes splashFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
