/* ==========================================
   在线教育平台 - 样式表
   ========================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --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;
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== 导航栏 ===== */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gray-900);
  font-size: 20px;
  font-weight: 700;
}

.nav-brand .logo-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 6px;
}

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

.nav-links a {
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link {
  color: var(--gray-700);
}

.nav-link:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-danger {
  background: var(--danger);
  color: var(--white);
}
.btn-danger:hover { opacity: 0.9; }

.btn-warning {
  background: #f59e0b;
  color: var(--white);
}
.btn-warning:hover { opacity: 0.9; }

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* ===== 用户信息 ===== */
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

/* ===== 主容器 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ===== Hero区域 ===== */

/* 轮播容器 */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}

.hc-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hc-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 60px;
  position: relative;
  overflow: hidden;
}

/* 各幻灯片背景 */
.hc-slide.s1 {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 40%, #2d6aa0 100%);
}
.hc-slide.s2 {
  background: linear-gradient(135deg, #1a1325 0%, #3d2d5e 40%, #6b4c9a 100%);
}
.hc-slide.s3 {
  background: linear-gradient(135deg, #0c1a14 0%, #164e33 40%, #1a8a5c 100%);
}
.hc-slide.s4 {
  background: linear-gradient(135deg, #1c0e0a 0%, #5c2a1a 40%, #b3542a 100%);
}
.hc-slide.s5 {
  background: linear-gradient(135deg, #0a0e1c 0%, #1c2860 40%, #3b4fb0 100%);
}
.hc-slide.s6 {
  background: linear-gradient(135deg, #1a0c1c 0%, #4a1a3c 40%, #c0392b 100%) center/cover, url('/img/xinzhidianfeng.png') center/contain no-repeat;
}
.hc-slide.s7 {
  background: linear-gradient(135deg, #0d1b2a 0%, #1b4332 40%, #2d6a4f 100%) center/cover, url('/img/xinzhixue_books.png') center/contain no-repeat;
}

/* 装饰光效 */
.hc-slide::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  top: -150px;
  right: -100px;
  pointer-events: none;
}

.hc-slide::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  bottom: -100px;
  left: -60px;
  pointer-events: none;
}

.slide-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
  color: white;
}

.slide-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 50px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.2);
}

.slide-content h1 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.slide-content p {
  font-size: 17px;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto;
}

/* 指示点 */
.hc-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.hc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s;
}
.hc-dot.active {
  background: white;
  width: 28px;
  border-radius: 5px;
}

/* 箭头 */
.hc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  backdrop-filter: blur(8px);
  line-height: 1;
}
.hc-arrow:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.4);
}

.hc-prev { left: 20px; }
.hc-next { right: 20px; }

/* 搜索栏（轮播外） */
.search-hero {
  padding: 16px 24px;
  background: var(--gray-50);
  display: flex;
  justify-content: center;
}

.search-hero .search-bar {
  margin-bottom: 0;
  width: 100%;
}

/* ===== 搜索栏 ===== */
.search-bar {
  max-width: 600px;
  margin: 0 auto 32px;
  display: flex;
  gap: 12px;
}

.search-input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid var(--gray-200);
  border-radius: 50px;
  font-size: 15px;
  outline: none;
  transition: border 0.2s;
}

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

/* ===== 分类筛选 ===== */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  justify-content: center;
}

.cat-tab {
  padding: 8px 18px;
  border-radius: 50px;
  border: 1.5px solid var(--gray-200);
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  transition: all 0.2s;
}

.cat-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cat-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

/* ===== 课程卡片网格 ===== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.course-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: all 0.3s;
  cursor: pointer;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.course-cover {
  height: 180px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
  position: relative;
}

.course-cover.c1 { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.course-cover.c2 { background: linear-gradient(135deg, #10b981, #059669); }
.course-cover.c3 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.course-cover.c4 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.course-cover.c5 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.course-cover.c6 { background: linear-gradient(135deg, #06b6d4, #0891b2); }

.course-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  color: white;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.course-body {
  padding: 20px;
}

.course-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--gray-900);
}

.course-desc {
  font-size: 14px;
  color: var(--gray-500);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.course-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--gray-500);
}

.course-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== 产品商城 ===== */
.products-section {
  padding: 48px 0 0;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0;
}
.section-more {
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.section-more:hover { text-decoration: underline; }

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

.product-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-100);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.product-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, #f0f4ff, #e8ecf4);
}
.product-image-placeholder {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: linear-gradient(135deg, #f0f4ff, #e8ecf4);
}

.product-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-category {
  display: inline-block;
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  width: fit-content;
}
.product-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
  line-height: 1.4;
}
.product-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}
.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}
.product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price-current {
  font-size: 24px;
  font-weight: 800;
  color: #ef4444;
}
.price-current::before { content: '¥'; font-size: 16px; }
.price-original {
  font-size: 14px;
  color: var(--gray-400);
  text-decoration: line-through;
}
.price-original::before { content: '¥'; }

.product-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.product-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}

@media (max-width: 768px) {
  .products-grid { grid-template-columns: 1fr; }
  .product-image, .product-image-placeholder { height: 180px; }
}

/* ===== 课程详情页 ===== */
.detail-header {
  background: white;
  padding: 40px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.detail-hero {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.detail-cover {
  width: 400px;
  height: 240px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: white;
  flex-shrink: 0;
}

.detail-info {
  flex: 1;
  min-width: 280px;
}

.detail-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.detail-inst {
  font-size: 16px;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.detail-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--gray-500);
}

.detail-desc {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 20px;
}

.detail-actions {
  display: flex;
  gap: 12px;
}

/* ===== 视频播放区 ===== */
.video-section {
  background: white;
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.video-player {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}

.video-player video {
  width: 100%;
  display: block;
}

.lesson-list {
  margin-top: 24px;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.lesson-item:hover {
  background: var(--gray-50);
  border-color: var(--gray-200);
}

.lesson-item.active {
  background: var(--primary-light);
  border-color: var(--primary);
}

.lesson-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.lesson-item.active .lesson-num {
  background: var(--primary);
  color: white;
}

.lesson-item.completed .lesson-num {
  background: var(--success);
  color: white;
}

.lesson-title {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

/* ===== 登录/注册页 ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  padding: 24px;
}

.auth-card {
  background: white;
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
}

.auth-sub {
  font-size: 14px;
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  transition: border 0.2s;
}

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

.form-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 12px;
}

.form-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--gray-500);
}

.form-switch a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ===== 仪表盘 ===== */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.dash-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.dash-stat {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
}

.dash-label {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 4px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  margin-top: 12px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #7c3aed);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ==========================================
   后台管理
   ========================================== */

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

.admin-sidebar {
  width: 220px;
  background: white;
  border-right: 1px solid var(--gray-200);
  padding: 16px 0;
  flex-shrink: 0;
}

.admin-nav-item {
  padding: 14px 24px;
  cursor: pointer;
  font-size: 15px;
  color: var(--gray-700);
  transition: all 0.2s;
  border-left: 3px solid transparent;
  font-weight: 500;
}

.admin-nav-item:hover {
  background: var(--gray-50);
  color: var(--primary);
}

.admin-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.admin-main {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.admin-main h2 {
  margin-bottom: 24px;
  font-size: 22px;
}

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

.admin-header h2 { margin-bottom: 0; }

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

.admin-stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.admin-stat-num {
  font-size: 40px;
  font-weight: 800;
  color: var(--gray-900);
}

.admin-stat-label {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 6px;
}

.admin-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.admin-col {}

.admin-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  overflow: hidden;
}

.admin-card h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--gray-700);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table-wrap th,
.admin-table-wrap td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
}

.admin-table-wrap th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
  font-size: 13px;
  text-transform: uppercase;
}

.admin-table-wrap tr:hover { background: var(--gray-50); }

.action-cell {
  white-space: nowrap;
}

.action-cell button {
  margin-right: 4px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.badge-teacher {
  background: #fef3c7;
  color: #92400e;
}

.badge-student {
  background: var(--primary-light);
  color: var(--primary);
}

.role-select {
  width: auto;
  padding: 6px 12px;
  font-size: 13px;
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box {
  background: white;
  border-radius: var(--radius);
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-lg { max-width: 700px; }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
}

.modal-head h3 { font-size: 18px; margin: 0; }

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--gray-500);
  padding: 4px 8px;
  border-radius: 4px;
}

.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }

.modal-body { padding: 24px; }

.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group textarea.form-input {
  resize: vertical;
  font-family: inherit;
}

/* 课时管理行 */
.admin-lesson-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.admin-lesson-row:last-child { border-bottom: none; }

.lesson-sort {
  width: 32px;
  height: 28px;
  background: var(--gray-100);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  flex-shrink: 0;
}

.lesson-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

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

/* ===== Toast 消息 ===== */
.toast {
  position: fixed;
  top: 80px;
  right: 24px;
  background: white;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  max-width: 400px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .course-grid { grid-template-columns: 1fr; }
  .detail-hero { flex-direction: column; }
  .detail-cover { width: 100%; height: 200px; }
  .navbar { padding: 0 12px; }
  .container { padding: 16px 12px; }
  /* 轮播响应 */
  .hero-carousel { height: 340px; }
  .hc-slide { padding: 24px 32px; }
  .slide-content h1 { font-size: 24px; }
  .slide-content p { font-size: 14px; }
  .hc-arrow { width: 36px; height: 36px; font-size: 20px; }
  .hc-prev { left: 8px; }
  .hc-next { right: 8px; }
  .admin-stats { grid-template-columns: 1fr; }
  .admin-cols { grid-template-columns: 1fr; }
  .admin-container { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--gray-200); padding: 0; }
  .admin-nav-item { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; padding: 14px 16px; }
  .admin-nav-item.active { border-left-color: transparent; border-bottom-color: var(--primary); }
  .admin-main { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .modal-lg { max-width: 95%; }
}

/* ===== 空白状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.empty-state .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--gray-700);
}

/* ===== 加载动画 ===== */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--gray-500);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

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

/* ===== 服务与收费页 ===== */

.pricing-hero {
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  color: white;
  padding: 48px 24px 40px;
  text-align: center;
}
.pricing-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.pricing-hero p { font-size: 16px; color: rgba(255,255,255,0.75); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: -20px auto 40px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.pricing-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.15); }

.pc-header {
  padding: 28px 24px 20px;
  text-align: center;
  color: white;
}
.pricing-card.free .pc-header { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.pricing-card.basic .pc-header { background: linear-gradient(135deg, #6366f1, #818cf8); }
.pricing-card.pro .pc-header { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

.pc-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 50px;
  background: rgba(255,255,255,0.2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.pc-price {
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}
.pc-symbol { font-size: 20px; vertical-align: super; }
.pc-amount { font-size: 40px; }
.pc-unit { font-size: 14px; opacity: 0.8; }

.pc-duration {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 12px;
  border-radius: 50px;
  background: rgba(0,0,0,0.15);
  font-size: 13px;
}

.pc-body {
  padding: 24px;
  flex: 1;
}
.pc-body h3 {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}
.pc-subtitle {
  font-size: 13px;
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 20px;
}

.pc-features {
  list-style: none;
  margin-bottom: 20px;
}
.pc-features li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}
.pc-features li::before { content: '✓ '; color: var(--success); font-weight: 700; }

.pc-highlights {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}
.pc-highlights h4 {
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 8px;
  margin-top: 8px;
}
.pc-highlights h4:first-child { margin-top: 0; }
.pc-highlights ul {
  list-style: none;
  padding-left: 0;
}
.pc-highlights ul li {
  padding: 3px 0;
  font-size: 13px;
  color: var(--gray-700);
}
.pc-highlights ul li::before { content: '✦ '; color: var(--primary); }

.pc-target {
  padding: 12px;
  background: #fffbeb;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--warning);
}
.pc-target strong { font-size: 13px; color: var(--gray-700); display: block; margin-bottom: 4px; }
.pc-target p { font-size: 13px; color: var(--gray-500); line-height: 1.5; }

.pc-footer {
  padding: 16px 24px 24px;
}
.btn-block { display: block; width: 100%; }

/* 对比表 */
.pricing-compare {
  padding-bottom: 60px;
}
.pricing-compare h2 {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 24px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.compare-table th, .compare-table td {
  padding: 14px 20px;
  text-align: center;
  font-size: 14px;
}
.compare-table thead th {
  background: var(--gray-900);
  color: white;
  font-weight: 600;
  font-size: 15px;
}
.compare-table thead th span {
  display: block;
  font-size: 12px;
  opacity: 0.7;
  font-weight: 400;
  margin-top: 2px;
}
.compare-table thead th:first-child { background: transparent; border-bottom: 1px solid var(--gray-200); }
.compare-table tbody td { border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
.compare-table tbody td:first-child { font-weight: 600; background: var(--gray-50); color: var(--gray-900); }
.compare-table tbody tr:last-child td { border-bottom: none; }

.compare-table .col-free { background: #0891b2; }
.compare-table .col-basic { background: #6366f1; }
.compare-table .col-pro { background: #7c3aed; }

/* 响应式 */
@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 500px; }
}
@media (max-width: 768px) {
  .compare-table { font-size: 12px; }
  .compare-table th, .compare-table td { padding: 10px 8px; font-size: 12px; }
}

/* ===== 公司介绍页 ===== */

.about-hero {
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  color: white;
  padding: 48px 24px;
  text-align: center;
}
.about-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.about-hero p { font-size: 16px; color: rgba(255,255,255,0.75); }

.about-content { padding: 32px 0 60px; line-height: 1.8; color: var(--gray-700); }
.about-section { margin-bottom: 36px; }
.about-section h2 { font-size: 22px; font-weight: 700; color: var(--gray-900); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.about-section h3 { font-size: 17px; margin: 16px 0 8px; color: var(--primary); }
.about-section p { margin-bottom: 10px; }
.about-default { }

.bmc-triad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0;
}
.bmc-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}
.bmc-item:nth-child(1) { border-top-color: #10b981; }
.bmc-item:nth-child(2) { border-top-color: #6366f1; }
.bmc-item:nth-child(3) { border-top-color: #f59e0b; }
.bmc-icon { font-size: 36px; margin-bottom: 12px; }
.bmc-item h3 { font-size: 16px; margin-bottom: 8px; }
.bmc-item p { font-size: 13px; color: var(--gray-500); }

@media (max-width: 768px) {
  .bmc-triad { grid-template-columns: 1fr; }
}

/* ===== 新闻页 ===== */

.news-header { margin-bottom: 24px; }
.news-header h1 { font-size: 28px; font-weight: 800; }

.news-card-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.news-card-item:hover { transform: translateX(4px); }
.news-card-body h3 { font-size: 18px; margin-bottom: 8px; }
.news-title-link { color: var(--gray-900); text-decoration: none; }
.news-title-link:hover { color: var(--primary); }
.news-summary { font-size: 14px; color: var(--gray-500); line-height: 1.6; margin-bottom: 8px; }
.news-meta { font-size: 13px; color: var(--gray-500); }

/* 新闻详情 */
.news-article h1 { font-size: 28px; font-weight: 800; margin-bottom: 12px; line-height: 1.4; }
.news-article .news-meta { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--gray-200); }
.news-body { font-size: 15px; line-height: 1.9; color: var(--gray-700); }
.news-body h2 { font-size: 20px; margin: 24px 0 12px; }
.news-body h3 { font-size: 17px; margin: 20px 0 10px; }
.news-body p { margin-bottom: 12px; }

.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; }

/* ===== 留言板 ===== */

.guestbook-header { margin-bottom: 24px; }
.guestbook-header h1 { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.guestbook-header p { color: var(--gray-500); font-size: 14px; }

.guestbook-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}
.guestbook-form h3 { font-size: 18px; margin-bottom: 16px; }

.gb-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.gb-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.gb-author { font-weight: 700; font-size: 15px; color: var(--gray-900); }
.gb-time { font-size: 12px; color: var(--gray-500); }
.gb-body { font-size: 14px; line-height: 1.7; color: var(--gray-700); }
.gb-reply {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--primary-dark);
}

.empty-state { text-align: center; padding: 48px 0; color: var(--gray-500); font-size: 14px; }

/* ===== 网站页脚 ===== */

.site-footer {
  background: #4f5d6b;
  color: var(--gray-200);
  padding: 0;
  margin-top: 60px;
  font-size: 13px;
  line-height: 1.5;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-info p { margin: 4px 0; }
.footer-copyright { font-weight: 600; color: var(--white); font-size: 15px; letter-spacing: 0.5px; }
.footer-icp, .footer-contact, .footer-address { color: var(--gray-200); font-size: 13px; }
.footer-icp a { color: var(--gray-200); text-decoration: none; }
.footer-icp a:hover { color: var(--white); text-decoration: underline; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--gray-200); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--white); }
.footer-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-qr-img { width: 100px; height: 100px; border-radius: 8px; border: 2px solid var(--gray-600); }
.footer-qr-label { font-size: 13px; color: var(--gray-300); }

@media (max-width: 768px) {
  .footer-content { flex-direction: column; text-align: center; align-items: center; }
  .footer-links { justify-content: center; }
  .footer-qr { order: -1; margin-bottom: 16px; }
}

/* 幻灯片管理 - 平台切换标签 */
.banner-platform-tab {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.banner-platform-tab.active {
  background: white;
  color: #1e293b;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.banner-platform-tab:hover:not(.active) {
  color: #334155;
}
