/* ============================================
   通天猴WiFi双平台代理中心 - 全局样式
   ============================================ */

:root {
  --bg-primary: #FAFBFD;
  --bg-card: #FFFFFF;
  --text-title: #1A2A3A;
  --text-body: #4A5568;
  --text-muted: #94A3B8;
  --border-light: #EEF2F6;
  --orange: #F59E0B;
  --orange-dark: #FF8C00;
  --blue: #1E6FDF;
  --blue-dark: #1a5fc0;
  --shadow: 0 8px 24px rgba(0,0,0,0.04);
  --shadow-hover: 0 12px 32px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }

img { max-width: 100%; height: auto; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== 导航栏 ========== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-title);
}

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-body);
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--orange-dark);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--orange-dark));
  border-radius: 2px;
}

.nav-cta {
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(245,158,11,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-title);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.btn-blue {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(30,111,223,0.3);
}

.btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,111,223,0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--orange);
  color: var(--orange-dark);
}

.btn-outline:hover {
  background: var(--orange);
  color: #fff;
}

.btn-sm { padding: 6px 16px; font-size: 0.8rem; border-radius: 8px; }

.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 14px; }

/* 汉堡菜单 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-title);
  border-radius: 2px;
  transition: var(--transition);
}

/* ========== 页面内容区 ========== */
.page-content {
  padding-top: 64px;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-title);
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 48px;
}

/* ========== 卡片 ========== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

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

.card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ========== 标签 ========== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-orange {
  background: rgba(245,158,11,0.1);
  color: var(--orange-dark);
}

.tag-blue {
  background: rgba(30,111,223,0.1);
  color: var(--blue);
}

.tag-green {
  background: rgba(16,185,129,0.1);
  color: #059669;
}

.tag-red {
  background: rgba(239,68,68,0.1);
  color: #DC2626;
}

/* ========== 表格 ========== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.data-table th,
.data-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.data-table th {
  background: #F8FAFC;
  font-weight: 600;
  color: var(--text-title);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: #F8FAFC; }

/* ========== 步骤 ========== */
.steps {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 240px;
  max-width: 320px;
  text-align: center;
  position: relative;
}

.step-number {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(245,158,11,0.3);
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========== 页脚 ========== */
.footer {
  background: var(--text-title);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

.footer-links a:hover {
  color: var(--orange);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
}

/* ========== 模态窗口 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0,0,0,0.2);
  animation: modalIn 0.3s ease;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-title);
}

.modal-close {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: none;
  background: var(--border-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-close:hover {
  background: #FEE2E2;
  color: #DC2626;
}

.modal-body {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  min-height: 500px;
  border: none;
}

.modal-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 全屏模态 */
.modal-fullscreen .modal-container {
  max-width: 100%;
  max-height: 100vh;
  border-radius: 0;
  height: 100vh;
}

/* ========== 加载动画 ========== */
.loading-spinner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border-light);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ========== Toast提示 ========== */
.toast-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--text-title);
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  display: flex;
  align-items: center;
  gap: 8px;
}

@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); }
}

/* ========== 底部TabBar（移动端） ========== */
.mobile-tabbar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-tabbar-inner {
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  color: var(--text-muted);
  font-size: 0.7rem;
  transition: var(--transition);
}

.tab-item i {
  font-size: 1.3rem;
}

.tab-item.active {
  color: var(--orange-dark);
}

/* ========== 横幅提示 ========== */
.alert-banner {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1px solid #F59E0B;
  border-radius: var(--radius);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.alert-banner-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.alert-banner-text {
  flex: 1;
  font-size: 0.9rem;
  color: #92400E;
}

.alert-banner-btn {
  flex-shrink: 0;
}

/* ========== 收益计算器 ========== */
.calculator {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}

.calculator-row {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.calculator-field {
  flex: 1;
  min-width: 200px;
}

.calculator-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-title);
  margin-bottom: 8px;
}

.calculator-field input,
.calculator-field select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--text-title);
  background: var(--bg-primary);
  transition: var(--transition);
}

.calculator-field input:focus,
.calculator-field select:focus {
  outline: none;
  border-color: var(--orange);
}

.calculator-result {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: #fff;
}

.calculator-result-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.calculator-result-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ========== 选项卡 ========== */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 2px;
}

.tab-btn {
  padding: 12px 24px;
  border: none;
  background: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 12px 12px 0 0;
  transition: var(--transition);
  position: relative;
}

.tab-btn.active {
  color: var(--orange-dark);
  background: rgba(245,158,11,0.08);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-dark));
  border-radius: 3px 3px 0 0;
}

.tab-panel {
  display: none;
}

.tab-panel.active { display: block; }

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  .section { padding: 48px 0; }
  .section-title { font-size: 1.5rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .mobile-tabbar { display: block; }
  body { padding-bottom: 70px; }

  .steps { flex-direction: column; align-items: center; }
  .step { max-width: 100%; }

  .modal-container { max-height: 95vh; }
  .modal-body iframe { min-height: 400px; }

  .calculator { padding: 24px; }
  .calculator-row { flex-direction: column; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .card { padding: 20px; }
  .btn-lg { padding: 12px 24px; font-size: 0.9rem; }
}

/* ========== 动画 ========== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ========== 滚动显示 ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== 手机菜单 ========== */
.mobile-menu {
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: none;
  flex-direction: column;
  padding: 24px;
}

.mobile-menu.active { display: flex; }

.mobile-menu a {
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-title);
  border-bottom: 1px solid var(--border-light);
}

.mobile-menu a:hover { color: var(--orange-dark); }

/* ========== 浮动客服 ========== */
.float-contact {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 998;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.float-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.float-btn:hover { transform: scale(1.1); }

.float-btn-wechat { background: #07C160; }
.float-btn-phone { background: var(--orange); }
.float-btn-top {
  background: var(--text-title);
  opacity: 0;
  pointer-events: none;
}

.float-btn-top.visible {
  opacity: 1;
  pointer-events: auto;
}
