/* ============================================================
基础重置
============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f8fafc;
  color: #0f172a;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
顶部导航
============================================================ */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px;
  background: #fff;
  border-radius: 40px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  flex-shrink: 0;
  width: 100%;
  flex-wrap: wrap;
}
.logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: #4f46e5;
  letter-spacing: -0.5px;
}
.logo span { color: #0f172a; font-weight: 300; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.lang-select-nav {
  padding: 6px 12px;
  border-radius: 40px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}
.lang-select-nav:focus { border-color: #4f46e5; }
.auth-btn {
  padding: 6px 18px;
  border-radius: 40px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  transition: 0.2s;
}
.auth-btn.login {
  background: transparent;
  color: #4f46e5;
  border: 1.5px solid #4f46e5;
}
.auth-btn.register {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
}
.auth-btn.logout {
  background: #ef4444;
  color: #fff;
}
.hidden { display: none !important; }
.auth-btn.dashboard {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
}
.auth-btn.dashboard:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.hidden { display: none !important; }

/* ============================================================
品牌标语
============================================================ */
.hero-banner {
  text-align: center;
  padding: 10px 24px 8px;
  max-width: 900px;
  margin: 0 auto;
}
.hero-banner h1 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
}
.hero-banner .sub {
  font-size: 0.95rem;
  color: #64748b;
  margin-top: 4px;
}
.hero-cta {
  margin-top: 6px;
  padding: 8px 28px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 60px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

/* ============================================================
图片轮播（PC两列，手机单张）- 修复右侧露图
============================================================ */
.hero-carousel {
  position: relative;
  overflow: hidden;
  max-width: 1400px;
  margin: 10px auto;
  padding: 0 24px;
}
.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  overflow: hidden;
  flex-wrap: nowrap;
}
.carousel-slide {
  flex: 0 0 50%;
  height: 300px;
  padding: 0 6px;
  min-width: 0;
  box-sizing: border-box;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  max-width: 100%;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.3);
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  border-radius: 30px;
  font-size: 24px;
}
.carousel-btn.prev { left: 30px; }
.carousel-btn.next { right: 30px; }
.carousel-btn:hover { background: rgba(0,0,0,0.5); }

/* ============================================================
套餐控制区
============================================================ */
.plans-control {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 20px;
  width: 100%;
}
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  /* margin-bottom 已移除，因为内容为空 */
}
.controls-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.control-group label {
  font-weight: 600;
  color: #334155;
  font-size: 14px;
}
.form-select {
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  min-width: 120px;
}

/* ============================================================
套餐描述
============================================================ */
.plan-detail-box {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  text-align: center;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.plan-detail-content .plan-name {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}
.plan-detail-content .plan-desc {
  font-size: 16px;
  color: #475569;
  margin-top: 4px;
}

/* ============================================================
套餐卡片网格（2行×3列）
============================================================ */
.plan-grid-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  margin: 0 -16px;
  padding: 0 16px 10px;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  min-width: 100%;
}
.plan-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.plan-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.plan-card.active {
  border-color: #4f46e5;
  background: #eef2ff;
  box-shadow: 0 4px 12px rgba(79,70,229,0.10);
}
.plan-card .p-name { font-size: 1rem; font-weight: 700; }
.plan-card .p-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #4f46e5;
  margin: 4px 0;
}
.plan-card .p-desc {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
  flex: 1;
}
.plan-card .p-features {
  font-size: 0.7rem;
  color: #64748b;
  text-align: left;
  padding-left: 12px;
  margin: 4px 0;
  list-style: disc;
}
.plan-card .plan-actions {
  margin-top: 8px;
}
.plan-card .plan-actions button {
  padding: 6px 16px;
  border: none;
  border-radius: 40px;
  background: #4f46e5;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.2s;
}
.plan-card .plan-actions button:hover {
  background: #4338ca;
}

/* ============================================================
分页
============================================================ */
.plan-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 0;
}
.plan-pagination .page-btn {
  padding: 6px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
}
.plan-pagination .page-btn:hover {
  border-color: #4f46e5;
  color: #4f46e5;
}
.plan-pagination .page-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}
.plan-pagination.hidden {
  display: none;
}

/* ============================================================
页脚
============================================================ */
.footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 24px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
  flex-shrink: 0;
  width: 100%;
}
.footer .footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.footer .footer-content .sep { color: #d1d5db; }
.footer a { color: #64748b; text-decoration: none; }
.footer a:hover { color: #4f46e5; }

/* ============================================================
响应式：手机端
============================================================ */
@media (max-width: 767px) {
  .navbar {
    flex-direction: column;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
  }
  .nav-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .lang-select-nav {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  .hero-banner h1 { font-size: 1.3rem; }
  .hero-banner .sub { font-size: 0.8rem; }
  .hero-cta { padding: 6px 20px; font-size: 0.8rem; }

  /* 手机端图片单张左右滑动 */
  .hero-carousel { padding: 0 12px; }
  .carousel-slide {
    flex: 0 0 100%;
    height: 200px;
    padding: 0 4px;
    min-width: 0;
    box-sizing: border-box;
  }
  .carousel-btn { padding: 6px 12px; font-size: 18px; }
  .carousel-btn.prev { left: 16px; }
  .carousel-btn.next { right: 16px; }

  /* 手机端三个下拉框一行 */
  .controls-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 4px 0;
    margin-bottom: 12px;
  }
  .control-group {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    gap: 4px;
    min-width: 0;
  }
  .control-group label {
    font-size: 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .form-select {
    font-size: 11px;
    padding: 4px 6px;
    min-width: 0;
    width: 100%;
  }

  .plan-detail-box { padding: 12px; min-height: 60px; }
  .plan-detail-content .plan-name { font-size: 16px; }
  .plan-detail-content .plan-desc { font-size: 14px; }

  /* 手机端套餐卡片横向滑动 */
  .plan-grid-wrapper {
    margin: 0 -12px;
    padding: 0 12px 10px;
  }
  .plan-grid {
    display: flex;
    gap: 12px;
    width: max-content;
    min-width: 100%;
    grid-template-columns: none;
  }
  .plan-card {
    flex: 0 0 75%;
    scroll-snap-align: start;
    padding: 12px;
  }

  .plan-pagination .page-btn { font-size: 12px; padding: 4px 10px; }
  .footer { font-size: 0.7rem; padding: 8px 16px; }
  .footer .footer-content { flex-wrap: wrap; gap: 4px 6px; }
  .footer .footer-content .sep { display: none; }
}

/* ============================================================
登录/注册弹窗样式
============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex !important;
}

.modal-box {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    padding: 40px 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-box .close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px 8px;
    line-height: 1;
}

.modal-box .close-btn:hover {
    color: #1e293b;
}

.modal-box h2 {
    text-align: center;
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 24px;
}

.modal-box .form-group {
    margin-bottom: 18px;
}

.modal-box .form-group label {
    display: block;
    font-weight: 500;
    color: #334155;
    font-size: 14px;
    margin-bottom: 6px;
}

.modal-box .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    transition: 0.2s;
    background: #fff;
}

.modal-box .form-group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.modal-box .checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-box .checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #4f46e5;
}

.modal-box .checkbox-group label {
    font-size: 14px;
    color: #475569;
}

.modal-box .checkbox-group a {
    color: #4f46e5;
    text-decoration: none;
}

.modal-box .checkbox-group a:hover {
    text-decoration: underline;
}

.modal-box .btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.modal-box .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.modal-box .switch-link {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: #94a3b8;
}

.modal-box .switch-link a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.modal-box .switch-link a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .modal-box {
        padding: 28px 20px;
        margin: 16px;
    }
}

/* ============================================================
   PC端紧凑布局（768px以上）- 让所有内容一屏展示
   ============================================================ */
@media (min-width: 768px) {
  /* ---- 套餐卡片更紧凑 ---- */
  .plan-card {
    padding: 10px 12px !important;
  }
  
  .plan-card .p-name {
    font-size: 0.85rem !important;
  }
  
  .plan-card .p-price {
    font-size: 0.9rem !important;
    margin: 2px 0 !important;
  }
  
  .plan-card .p-desc {
    font-size: 0.7rem !important;
    line-height: 1.3 !important;
    margin-bottom: 2px !important;
  }
  
  .plan-card .p-features {
    font-size: 0.6rem !important;
    padding-left: 0 !important;
    margin: 2px 0 !important;
    list-style: none !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    justify-content: center !important;
  }
  
  .plan-card .p-features li {
    display: inline-block !important;
    background: #f1f5f9;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.55rem !important;
    white-space: nowrap;
  }
  
  .plan-card .plan-actions {
    margin-top: 4px !important;
  }
  
  .plan-card .plan-actions button {
    padding: 3px 12px !important;
    font-size: 0.65rem !important;
  }
  
  /* ---- 套餐网格间距减小 ---- */
  .plan-grid {
    gap: 8px !important;
  }
  
  /* ---- 套餐描述区更紧凑 ---- */
  .plan-detail-box {
    padding: 6px 16px !important;
    min-height: 32px !important;
    margin-bottom: 8px !important;
  }
  
  .plan-detail-content .plan-name {
    font-size: 15px !important;
  }
  .plan-detail-content .plan-desc {
    font-size: 12px !important;
  }
  
  /* ---- 控制区域更紧凑 ---- */
  .controls-row {
    margin-bottom: 8px !important;
    gap: 10px !important;
  }
  .control-group label {
    font-size: 12px !important;
  }
  .form-select {
    padding: 4px 8px !important;
    font-size: 12px !important;
    min-width: 70px !important;
  }
  
  /* ---- 分页更紧凑 ---- */
  .plan-pagination {
    margin-top: 6px !important;
    padding: 4px 0 !important;
  }
  .plan-pagination .page-btn {
    padding: 2px 10px !important;
    font-size: 12px !important;
  }
  
  /* ---- 页脚更紧凑 ---- */
  .footer {
    padding: 4px 24px !important;
    font-size: 0.7rem !important;
  }
  .footer .footer-content {
    gap: 6px !important;
  }
  
  /* ---- 图片轮播高度减小 ---- */
  .carousel-slide {
    height: 200px !important;
  }
  
  /* ---- 品牌标语更紧凑 ---- */
  .hero-banner {
    padding: 6px 24px 4px !important;
  }
  .hero-banner h1 {
    font-size: 1.5rem !important;
  }
  .hero-banner .sub {
    font-size: 0.85rem !important;
  }
  .hero-cta {
    padding: 4px 20px !important;
    font-size: 0.8rem !important;
  }
}

/* ============================================================
验证码点选式样式
============================================================ */
.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 300px;
  margin: 8px 0;
}

.captcha-grid .captcha-item {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  text-align: center;
  transition: all 0.2s;
  background: #fff;
  font-size: 36px;
  user-select: none;
}

.captcha-grid .captcha-item:hover {
  border-color: #94a3b8;
  transform: scale(1.02);
}

.captcha-grid .captcha-item.selected {
  border-color: #4f46e5;
  background: #eef2ff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.captcha-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.captcha-hint {
  font-size: 14px;
  color: #334155;
}

.captcha-target {
  font-weight: 700;
  color: #4f46e5;
  font-size: 20px;
}

.captcha-refresh {
  font-size: 12px;
  color: #999;
  cursor: pointer;
  margin-left: auto;
  transition: color 0.2s;
}

.captcha-refresh:hover {
  color: #4f46e5;
}

.captcha-status {
  margin-top: 8px;
  font-size: 12px;
  color: #999;
}