/* 更新后的 style.css */
:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --secondary: #3f37c9;
  --success: #4cc9f0;
  --danger: #f72585;
  --warning: #f8961e;
  --info: #4895ef;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --white: #ffffff;
  --border-radius: 12px;
  --box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  line-height: 1.6; 
  color: #333; 
  background-color: #f5f7fa; 
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* 顶部导航 - 响应式优化 */
.topnav {
  position: sticky; 
  top: 0; 
  z-index: 1000;
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  padding: 12px 16px; 
  background: #fff; 
  border-bottom: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.logo { 
  width: 32px; 
  height: 32px; 
  margin-right: 10px; 
}

.brand { 
  font-weight: 700; 
  font-size: 18px; 
  white-space: nowrap;
}

.nav-left { 
  display: flex; 
  align-items: center; 
  overflow: hidden;
}

.brand-link { 
  display: flex; 
  align-items: center; 
  color: inherit; 
  text-decoration: none; 
  max-width: 100%;
}

.nav-right .btn { 
  margin-left: 8px; 
  white-space: nowrap;
}

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

.userbox .avatar { 
  width: 36px; 
  height: 36px; 
  border-radius: 50%; 
  object-fit: cover;
}

.userbox .uname { 
  font-weight: 600; 
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.userbox .menu {
  position: absolute; 
  top: 100%; 
  right: 0; 
  background: #fff; 
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--border-radius); 
  padding: 8px 0; 
  display: none; 
  min-width: 160px;
  box-shadow: var(--box-shadow);
  z-index: 1001;
}

.userbox:hover .menu,
.userbox:focus-within .menu { 
  display: block; 
}

.userbox .menu a { 
  display: block; 
  padding: 8px 16px; 
  text-decoration: none; 
  color: #333; 
  transition: var(--transition);
}

.userbox .menu a:hover { 
  background: #f8f9fa; 
}

.vip-badge { 
  background: linear-gradient(45deg, #ffd700, #ffae00); 
  color: #000; 
  font-weight: 700; 
  padding: 2px 6px; 
  border-radius: 6px; 
  font-size: 12px; 
  flex-shrink: 0;
}

/* Hero 区域优化 */
.hero { 
  background: linear-gradient(135deg, #e9f0ff 0%, #f8faff 100%); 
  padding: 40px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(67,97,238,0.1) 0%, rgba(67,97,238,0) 70%);
  border-radius: 50%;
}

.hero-content { 
  max-width: 1100px; 
  margin: 0 auto; 
  padding: 0 20px; 
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero h1 { 
  font-size: 2.2rem; 
  margin-bottom: 12px; 
  font-weight: 700;
  line-height: 1.2;
}

.hero p { 
  color: #555; 
  margin-bottom: 24px; 
  font-size: 1.1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

/* 响应式容器 */
.container { 
  max-width: 1100px; 
  margin: 24px auto; 
  padding: 0 16px; 
}

/* 卡片样式优化 */
.card {
  background: #fff; 
  border-radius: var(--border-radius); 
  box-shadow: var(--box-shadow);
  padding: 24px; 
  margin-bottom: 24px; 
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.03);
}

.card:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

h1, h2, h3, h4, h5, h6 { 
  color: var(--dark); 
  margin-top: 0; 
  margin-bottom: 16px;
}

h2 { 
  font-size: 1.5rem; 
  display: flex;
  align-items: center;
  gap: 8px;
}

h2 i {
  font-size: 1.2em;
  color: var(--primary);
}

/* 按钮样式优化 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500; 
  text-align: center; 
  border: 1px solid transparent;
  padding: 0.6rem 1.2rem; 
  font-size: 1rem; 
  line-height: 1.5; 
  border-radius: var(--border-radius);
  transition: var(--transition);
  cursor: pointer; 
  gap: 6px;
}

.btn:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary { 
  color: #fff; 
  background: var(--primary); 
  border-color: var(--primary); 
  text-decoration: none;
}

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

.btn-success { 
  color: #fff; 
  background: #22c55e; 
  border-color: #22c55e; 
  text-decoration: none;
}

.btn-outline { 
  background: #fff; 
  border-color: #d0d7de; 
  color: #333;
}

.btn-outline:hover {
  background: #f8f9fa;
}

.btn-outline-primary { 
  color: var(--primary); 
  background: #fff; 
  border-color: var(--primary); 
}

.btn-outline-success { 
  color: #16a34a; 
  background: #fff; 
  border-color: #16a34a; 
}

.btn-block { 
  display: block; 
  width: 100%; 
}

.btn-small { 
  padding: 6px 12px; 
  font-size: 0.85rem; 
}

/* 表单控件优化 */
.form-control {
  display: block; 
  width: 100%; 
  padding: 12px 14px; 
  border: 1px solid #e5e7eb; 
  border-radius: var(--border-radius);
  background: #fff; 
  font-size: 1rem; 
  outline: none;
  transition: var(--transition);
}

.form-control:focus { 
  border-color: var(--primary); 
  box-shadow: 0 0 0 3px rgba(67,97,238,.15); 
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #444;
}

/* 布局系统优化 */
.row { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 16px; 
  margin: 0 -8px;
}

.col { 
  flex: 1; 
  min-width: 0; 
  padding: 0 8px;
}

.col-md-6 { 
  width: calc(50% - 8px); 
}

@media (max-width: 768px) { 
  .col-md-6 { 
    width: 100%; 
  } 
}

/* 文本工具类 */
.text-center { 
  text-align: center; 
}

.text-muted, .muted { 
  color: #6b7280; 
}

/* 间距工具类 */
.mb-2 { 
  margin-bottom: 8px; 
}

.mb-3 { 
  margin-bottom: 16px; 
}

.mb-4 { 
  margin-bottom: 24px; 
}

.mt-3 { 
  margin-top: 16px; 
}

.p-3 { 
  padding: 16px; 
}

/* 弹性布局工具类 */
.d-flex { 
  display: flex; 
}

.align-items-center { 
  align-items: center; 
}

.justify-content-between { 
  justify-content: space-between; 
}

.rounded-circle { 
  border-radius: 50%; 
}

/* 会员卡片优化 */
.membership-card { 
  border-left: 4px solid var(--primary); 
  border-radius: var(--border-radius); 
  background: #fff; 
  transition: var(--transition);
}

.membership-card.active { 
  border-left-color: #16a34a; 
  background: #f8faf8;
}

.membership-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

.bg-success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.bg-secondary {
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  box-shadow: 0 2px 4px rgba(156, 163, 175, 0.2);
}

/* 会员卡片中的标签特殊样式 */
/* 会员状态标签美化 - 更新版 */
.membership-card .badge {
  min-width: 80px;
  padding: 6px 12px;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 确保图标使用正确的 Font Awesome 类 */
.membership-card .bg-success i {
  font-size: 0.7rem;
}

.membership-card .bg-secondary i {
  font-size: 0.7rem;
}
.card .price { 
  font-size: 1.5rem; 
  font-weight: 700; 
  color: var(--primary); 
  margin: 12px 0;
}

/* 特性网格优化 */
.features-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 16px; 
}

.features-grid .feature { 
  background: #f9fafb; 
  border: 1px solid #eef2f7; 
  border-radius: var(--border-radius); 
  padding: 20px; 
  transition: var(--transition);
}

.features-grid .feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow);
}

.features-grid .feature h4 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--primary);
}

.features-grid .feature ul {
  padding-left: 20px;
  margin: 0;
}

.features-grid .feature li {
  margin-bottom: 6px;
}

.perks { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
  gap: 24px; 
  text-align: center; 
}

.perk { 
  padding: 20px; 
  border-radius: var(--border-radius); 
  background: #f9fafb; 
  transition: var(--transition);
}

.perk:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow);
}

.perk i { 
  font-size: 2rem; 
  margin-bottom: 12px; 
  color: var(--primary);
}

.perk h4 {
  margin-top: 0;
  margin-bottom: 8px;
}

/* 兑换框优化 */
.redeem-box { 
  display: flex; 
  gap: 12px; 
  max-width: 520px; 
  flex-wrap: wrap;
}

.redeem-box .form-control {
  flex: 1;
  min-width: 200px;
}

/* 弹窗优化 */
.modal.hidden { 
  display: none; 
}

.modal { 
  position: fixed; 
  inset: 0; 
  z-index: 2000; 
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop { 
  position: absolute; 
  inset: 0; 
  background: rgba(0,0,0,.5); 
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative; 
  z-index: 2001; 
  width: 100%; 
  max-width: 520px; 
  max-height: 90vh;
  margin: auto; 
  background: #fff; 
  border-radius: var(--border-radius); 
  box-shadow: 0 24px 80px rgba(0,0,0,.2); 
  overflow: hidden;
  animation: modalFadeIn 0.3s ease;
}

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

.modal-header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 20px; 
  border-bottom: 1px solid #eef2f7; 
  background: #f9fafb;
}

.modal-close { 
  background: none; 
  border: none; 
  font-size: 24px; 
  cursor: pointer; 
  color: #6b7280;
  transition: var(--transition);
  padding: 4px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--danger);
  transform: rotate(90deg);
}

.modal-body { 
  padding: 20px; 
  overflow-y: auto;
  max-height: calc(90vh - 80px);
}

.tabs { 
  display: flex; 
  gap: 8px; 
  margin-bottom: 16px; 
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 8px;
}

.tabs .tab { 
  background: #f1f5ff; 
  border-radius: 8px; 
  padding: 10px 16px; 
  border: none; 
  cursor: pointer; 
  font-weight: 500;
  transition: var(--transition);
}

.tabs .tab.active { 
  background: var(--primary); 
  color: #fff;
}

.tab-panel.hidden { 
  display: none; 
}

.social-login { 
  margin-top: 0px; 
  display: flex; 
  flex-direction: column;
  align-items: center; 
  gap: 12px; 
}

.social-buttons { 
  display: flex; 
  gap: 12px;
  width: 100%;
}

.social-buttons .btn { 
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 个人中心样式优化 */
.profile-header { 
  display: flex; 
  align-items: center; 
  gap: 20px; 
  margin-bottom: 20px;
}

.avatar-lg { 
  width: 80px; 
  height: 80px; 
  border-radius: 50%; 
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.table { 
  width: 100%; 
  border-collapse: collapse; 
  margin-bottom: 16px;
}

.table th, .table td { 
  padding: 12px; 
  border-bottom: 1px solid #f0f0f0; 
  text-align: left;
}

.table th {
  background: #f9fafb;
  font-weight: 600;
  color: #444;
}

/* 绑定卡片 */
.bind-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 12px;
}

.bind-card { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  border: 1px solid #eef2f7; 
  border-radius: var(--border-radius); 
  padding: 16px; 
  background: #fff;
  transition: var(--transition);
}

.bind-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.bind-left { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
}

.bind-icon { 
  width: 48px; 
  height: 48px; 
  border-radius: 50%; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  background: #f3f4f6;
  flex-shrink: 0;
}

.bind-icon i { 
  font-size: 24px; 
}

.notice { 
  font-size: 0.85rem; 
  color: #6b7280; 
  margin-top: 8px; 
  line-height: 1.4;
}

/* 邀请区域 */
.invite-box {
  background: #f9fafb;
  border-radius: var(--border-radius);
  padding: 16px;
  border: 1px solid #eef2f7;
}

.invite-output {
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border-radius: var(--border-radius);
  border: 1px dashed #e5e7eb;
}

.invite-output div {
  margin-bottom: 8px;
  word-break: break-all;
}

/* 吐司提示优化 */
.toast {
  position: fixed; 
  bottom: 24px; 
  left: 50%; 
  transform: translateX(-50%); 
  background: #111827; 
  color: #fff; 
  padding: 12px 20px; 
  border-radius: var(--border-radius); 
  opacity: 0;
  pointer-events: none; 
  transition: opacity .2s ease; 
  z-index: 3000;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.toast.show { 
  opacity: .95; 
  animation: toastSlideUp 0.3s ease;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 0.95;
    transform: translateX(-50%) translateY(0);
  }
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.pagination .btn {
  min-width: 100px;
}

/* 表格操作按钮 */
.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.table-actions .btn {
  padding: 6px;
  min-width: 0;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .container {
    padding: 0 12px;
  }
  
  .card {
    padding: 16px;
  }
  
  .features-grid,
  .perks {
    grid-template-columns: 1fr;
  }
  
  .modal-panel {
    max-height: 80vh;
  }
  
  .modal-body {
    max-height: calc(80vh - 80px);
  }
  
  .social-buttons {
    flex-direction: column;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
  
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* 管理界面特定样式 */
.admin-toolbar { 
  display: flex; 
  gap: 12px; 
  align-items: flex-end; 
  flex-wrap: wrap; 
  margin-bottom: 16px;
}

.admin-toolbar .form-group { 
  margin: 0; 
  flex: 1;
  min-width: 200px;
}

.grid-3 { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 16px; 
}

.table-actions button { 
  margin-right: 6px; 
}

/* 加载动画 */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

.btn.loading .loading-spinner {
  margin-right: 8px;
}

/* 移除导航菜单链接下划线 */
.userbox .menu a {
  text-decoration: none;
}

/* 移除个人中心按钮下划线 */
.btn-outline {
  text-decoration: none;
}

/* 表单验证样式 */
.is-invalid {
  border-color: var(--danger) !important;
}

.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(247, 37, 133, 0.15) !important;
}

.form-hint {
  font-size: 0.8rem;
  margin-top: 4px;
  color: #6b7280;
}

.form-hint.invalid {
  color: var(--danger);
}

/* 视频弹窗特定样式 */
#video-modal .modal-panel {
  max-width: 800px;
}

#video-modal video {
  outline: none;
  background: #000;
}

/* 确保视频在移动端也能正常显示 */
@media (max-width: 768px) {
  #video-modal .modal-panel {
    width: 95%;
  }
  
  #video-modal video {
    height: auto;
  }
}

/* 安装指南特定样式 */
.step-code {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  font-family: monospace;
  margin: 10px 0;
  border-left: 3px solid var(--primary);
}

.alert {
  padding: 12px;
  border-radius: 6px;
  margin: 15px 0;
}

.alert-info {
  background: #e7f5ff;
  border-left: 3px solid #4dabf7;
}

.alert i {
  margin-right: 8px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1.1rem;
}

.faq-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dashed #eee;
}

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

.faq-item h4 {
  color: var(--primary);
}

.hidden {
  display: none !important;
}

/* 修改注册表单HTML结构，添加提示信息 */