* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg-main: #0b0b12;
  --bg-card: rgba(22, 22, 35, 0.75);
  --primary-gradient: linear-gradient(135deg, #ff2a75 0%, #8a2be2 100%);
  --primary-glow: rgba(255, 42, 117, 0.4);
  /* 新增：客服按钮专用科技蓝渐变与光晕变量 */
  --support-gradient: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
  --support-glow: rgba(0, 198, 255, 0.4);
  --text-primary: #ffffff;
  --text-secondary: #a0a0b2;
  --border-color: rgba(255, 255, 255, 0.08);
}

body.bg-main {
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  padding-bottom: 24px;
  overflow-x: hidden;
  transition: padding-bottom 0.3s ease;
}

/* 仅在移动端开启聊天窗口时底部预留间隙 */
@media (max-width: 768px) {
  body.bg-main.has-widget {
    padding-bottom: 260px;
  }
}

.gradient-text {
  background: linear-gradient(90deg, #ff2a75, #a855f7, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn {
  border: none;
  border-radius: 9999px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 42, 117, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ccc;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-block {
  width: 100%;
  padding: 14px 20px;
}

.btn-hero-download {
  padding: 16px 42px;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}

.btn-card {
  width: 100%;
  padding: 12px;
  background: rgba(255, 42, 117, 0.9);
  color: #fff;
  border-radius: 12px;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(255, 42, 117, 0.5);
}

.btn-card:hover {
  background: #ff4081;
}

/* 模态弹窗系统 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-card {
  background: rgba(22, 22, 35, 0.95);
  border: 1px solid rgba(255, 42, 117, 0.35);
  padding: 36px 28px;
  border-radius: 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 42, 117, 0.15);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

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

.modal-badge {
  display: inline-block;
  background: rgba(255, 42, 117, 0.18);
  border: 1px solid rgba(255, 42, 117, 0.4);
  color: #ff2a75;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.modal-card h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  line-height: 1.3;
}

.modal-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

.action-popup-card {
  padding-top: 44px;
}

.popup-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
}
.popup-close:hover { color: #fff; }

.popup-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.popup-footer-text, .banner-footer-text {
  margin-top: 14px;
  font-size: 0.85rem;
  color: #8888a0;
}

/* 安全认证图标样式 */
.security-badges-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  color: #c7d2fe;
}

.sec-icon {
  font-style: normal;
  font-size: 0.9rem;
}

/* 导航栏 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(11, 11, 18, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
}

.logo span {
  color: #ff2a75;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#lang-select {
  background: #161623;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.btn-nav {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* Hero 首屏 */
.hero-section {
  position: relative;
  text-align: center;
  padding: 90px 20px 100px;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg-slider {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-bg-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom, 
    rgba(11, 11, 18, 0.85) 0%, 
    rgba(11, 11, 18, 0.65) 40%, 
    rgba(11, 11, 18, 0.92) 80%, 
    #0b0b12 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 850px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 42, 117, 0.15);
  border: 1px solid rgba(255, 42, 117, 0.4);
  color: #ff659b;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.hero-section h1 {
  font-size: 3.2rem;
  line-height: 1.2;
  margin-bottom: 20px;
  font-weight: 800;
}

.hero-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 28px;
  line-height: 1.6;
}

.hero-cta-wrapper {
  margin-top: 10px;
  margin-bottom: 24px;
}

.trust-tags {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 0.85rem;
  color: #8e8ea5;
  flex-wrap: wrap;
}

/* 伴侣模块 */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 32px;
}

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

.character-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.character-card:hover {
  border-color: rgba(255, 42, 117, 0.5);
  transform: translateY(-5px);
}

.card-img-wrapper {
  position: relative;
  height: 340px;
  background-color: #1a1a2e;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.status-badge.online {
  background: rgba(16, 185, 129, 0.85);
  color: #ffffff;
}
.status-badge.online .status-dot {
  width: 8px; height: 8px; background-color: #ffffff; border-radius: 50%; box-shadow: 0 0 6px #fff;
}

.status-badge.offline {
  background: rgba(107, 114, 128, 0.85);
  color: #e5e7eb;
}
.status-badge.offline .status-dot {
  width: 8px; height: 8px; background-color: #d1d5db; border-radius: 50%;
}

.card-hover-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(11, 11, 18, 0.95) 60%, rgba(11, 11, 18, 0.4) 90%, transparent);
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 3;
}

.character-card:hover .card-hover-overlay {
  opacity: 1;
  transform: translateY(0);
}

.card-hover-overlay h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

/* 优势模块 */
.app-benefits-section {
  max-width: 1100px;
  margin: 50px auto;
  padding: 0 20px;
}

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

.benefit-card {
  background: rgba(18, 18, 28, 0.8);
  border: 1px solid var(--border-color);
  padding: 24px 20px;
  border-radius: 18px;
  text-align: center;
  transition: all 0.3s;
}

.benefit-card:hover {
  border-color: rgba(255, 42, 117, 0.3);
  transform: translateY(-3px);
}

.benefit-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.benefit-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.benefit-card p {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* 下载 Banner */
.download-banner {
  max-width: 900px;
  margin: 60px auto 20px;
  background: linear-gradient(135deg, rgba(255, 42, 117, 0.15), rgba(138, 43, 226, 0.15));
  border: 1px solid rgba(255, 42, 117, 0.3);
  border-radius: 24px;
  padding: 48px 24px;
  text-align: center;
}

.banner-content h2 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.banner-content p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Footer */
.site-footer {
  max-width: 1100px;
  margin: 60px auto 0;
  padding: 30px 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand p {
  font-size: 0.85rem;
  margin-top: 6px;
  color: #71718a;
}

.footer-copyright {
  font-size: 0.85rem;
  color: #71718a;
}

/* ==========================================================
   右下角悬浮区：客服按钮与聊天窗口层级和颜色样式
   ================================================          */

/* 仿真聊天窗口：定位在最底层（贴近屏幕底部） */
.floating-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 280px;
  background: rgba(16, 16, 26, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
  z-index: 90;
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.widget-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.widget-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.widget-status {
  font-size: 0.7rem;
  color: #4ade80;
}

.widget-close {
  background: none;
  border: none;
  color: #888;
  font-size: 1.2rem;
  cursor: pointer;
}
.widget-close:hover { color: #fff; }

.widget-body {
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  color: #e0e0e0;
  margin-bottom: 12px;
  line-height: 1.4;
}

.w-full { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 0.8rem; }

/* 客服悬浮区：定位在聊天窗口上方 */
.support-dock {
  position: fixed;
  bottom: 242px;
  right: 24px;
  z-index: 95;
}

/* 客服按钮：已换成全新的科技蓝渐变色（--support-gradient） */
.support-main-btn {
  background: var(--support-gradient);
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 6px 20px var(--support-glow);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.support-main-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 198, 255, 0.6);
}

.support-panel {
  position: absolute;
  bottom: 44px;
  right: 0;
  width: 280px;
  background: rgba(16, 16, 26, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.support-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.support-close {
  background: none;
  border: none;
  color: #888;
  font-size: 1.3rem;
  cursor: pointer;
}
.support-close:hover { color: #fff; }

.support-channels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.channel-group {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: 12px;
}

.channel-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.channel-links {
  display: flex;
  gap: 8px;
}

.channel-btn {
  flex: 1;
  background: rgba(0, 198, 255, 0.12);
  border: 1px solid rgba(0, 198, 255, 0.25);
  color: #38bdf8;
  text-align: center;
  padding: 6px 0;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.channel-btn:hover {
  background: var(--support-gradient);
  color: #fff;
}

/* 响应式断点适配 (手机端 <= 768px) */
@media (max-width: 1024px) {
  .character-grid { grid-template-columns: repeat(3, 1fr); }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .navbar { padding: 12px 16px; }
  .btn-nav { display: none; }
  .hero-section { padding: 50px 16px 70px; min-height: 420px; }
  .hero-section h1 { font-size: 2.1rem; }
  .btn-hero-download { width: 100%; padding: 15px; font-size: 1rem; }

  .character-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card-img-wrapper { height: 240px; }
  .card-hover-overlay { display: none !important; }

  .benefits-grid { grid-template-columns: 1fr; gap: 12px; }
  .download-banner { padding: 32px 16px; margin: 40px 16px 20px; }
  
  /* 手机端聊天窗口贴底 */
  .floating-chat-widget {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
  }

  /* 手机端客服按钮位于聊天窗口上方 */
  .support-dock {
    right: 16px;
    bottom: 235px;
    left: 16px;
    display: flex;
    justify-content: flex-end;
  }
  
  .support-main-btn {
    padding: 9px 16px;
    font-size: 0.82rem;
    border-radius: 9999px;
  }

  .support-panel {
    bottom: 44px;
    left: auto;
    right: 0;
    width: 280px;
  }

  .footer-container { flex-direction: column; text-align: center; gap: 10px; }
}