:root {
  --bg: #050816;
  --bg-soft: #070b20;
  --bg-alt: #050816;
  --primary: #6366f1;
  --primary-soft: rgba(99, 102, 241, 0.18);
  --primary-strong: #4f46e5;
  --accent: #22c55e;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.25);
  --card-bg: rgba(15, 23, 42, 0.9);
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.75);
  --radius-lg: 20px;
  --radius-full: 999px;
  --transition-fast: 0.18s ease-out;
  --transition-normal: 0.25s ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1d2340 0, #020617 55%, #000 100%);
  color: var(--text-main);
}

body {
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.9),
    rgba(2, 6, 23, 0.7),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 18px;
  background: linear-gradient(135deg, #e5e7eb, #a855f7, #22c55e);
  -webkit-background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

.nav a {
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  transition: width var(--transition-fast);
}

.nav a:hover {
  color: #e5e7eb;
}

.nav a:hover::after {
  width: 100%;
}

.auth-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: background-color var(--transition-normal),
    border-color var(--transition-fast), box-shadow var(--transition-normal),
    transform var(--transition-fast), color var(--transition-fast),
    opacity var(--transition-fast);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: white;
  box-shadow: 0 18px 45px rgba(79, 70, 229, 0.65);
}

.btn.primary:hover {
  transform: translateY(-1px) translateZ(0);
  box-shadow: 0 22px 60px rgba(79, 70, 229, 0.85);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--text-main);
}

.btn.ghost:hover {
  background: rgba(30, 64, 175, 0.25);
  border-color: rgba(129, 140, 248, 0.8);
}

.btn.white {
  background: white;
  color: #020617;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.6);
}

.btn.white:hover {
  transform: translateY(-1px) translateZ(0);
}

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

.btn.full {
  width: 100%;
}

.hero {
  padding: 48px 0 32px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: 0.02em;
  background: radial-gradient(
    circle at top left,
    #e5e7eb 0,
    #c4b5fd 32%,
    #e5e7eb 60%
  );
  -webkit-background-clip: text;
  color: transparent;
}

.hero-text p {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 15px;
}

.hero-text p strong {
  color: #e5e7eb;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.hero-meta span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.hero-card {
  position: relative;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -40px -24px -30px;
  background: radial-gradient(
    circle at top,
    rgba(59, 130, 246, 0.3),
    transparent 60%
  );
  opacity: 0.7;
  filter: blur(8px);
  z-index: -1;
}

.hero-chat-window {
  background: radial-gradient(
      circle at top left,
      rgba(56, 189, 248, 0.22),
      transparent 50%
    ),
    linear-gradient(145deg, #020617, #020617);
  border-radius: 24px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-soft);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 13px;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow: hidden;
  font-size: 13px;
}

.msg {
  padding: 10px 12px;
  border-radius: 14px;
  max-width: 100%;
}

.msg.user {
  align-self: flex-end;
  background: rgba(15, 23, 42, 0.85);
  border-bottom-right-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.msg.ai {
  align-self: flex-start;
  background: rgba(15, 23, 42, 0.75);
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.5);
}

.msg.ai.highlight {
  border-color: rgba(236, 72, 153, 0.7);
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.25);
}

.section {
  padding: 28px 0;
}

.section-alt {
  background: radial-gradient(
      circle at top,
      rgba(30, 64, 175, 0.4),
      transparent 60%
    ),
    radial-gradient(circle at bottom, rgba(15, 23, 42, 0.9), #020617);
}

.section-title {
  font-size: 24px;
  margin: 0 0 8px;
  text-align: center;
}

.section-subtitle {
  margin: 0 0 22px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.grid {
  display: grid;
  gap: 18px;
}

.features-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.card {
  background: radial-gradient(
      circle at top left,
      rgba(79, 70, 229, 0.2),
      transparent 55%
    ),
    radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.14), #020617);
  border-radius: var(--radius-lg);
  padding: 18px 18px 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.7);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top,
    rgba(79, 70, 229, 0.23),
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.card p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.card-tag {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.65);
  color: #bbf7d0;
  font-size: 11px;
  margin-bottom: 10px;
}

.card-tag.blue {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(96, 165, 250, 0.75);
  color: #bfdbfe;
}

.card-tag.purple {
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(192, 132, 252, 0.85);
  color: #e9d5ff;
}

.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.card-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.card-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  flex-shrink: 0;
}

.scenes-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.scene-item {
  padding: 14px 14px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 13px;
}

.scene-item h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.scene-item p {
  margin: 0;
  color: var(--text-muted);
}

.cta {
  padding: 26px 0 32px;
}

.cta-inner {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.9),
    rgba(236, 72, 153, 0.95)
  );
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 24px 60px rgba(79, 70, 229, 0.8);
}

.cta h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.cta p {
  margin: 0;
  font-size: 13px;
  color: rgba(249, 250, 251, 0.9);
}

.footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  margin-top: 14px;
  padding: 18px 0 10px;
  background: radial-gradient(
      circle at top,
      rgba(37, 99, 235, 0.4),
      transparent 55%
    ),
    #020617;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-start;
}

.footer-desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 360px;
}

.footer-links {
  display: flex;
  gap: 36px;
  font-size: 13px;
}

.footer-links h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-muted);
}

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

.footer-bottom {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at top,
    rgba(15, 23, 42, 0.6),
    rgba(2, 6, 23, 0.92)
  );
  backdrop-filter: blur(18px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

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

.modal {
  width: min(420px, 100% - 32px);
  background: radial-gradient(
      circle at top left,
      rgba(94, 234, 212, 0.16),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.98);
  border-radius: 20px;
  padding: 20px 20px 22px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.85);
  position: relative;
}

.modal-wide {
  width: min(620px, 100% - 32px);
}

.modal h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.modal-subtitle {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 2px;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.modal-close:hover {
  color: #e5e7eb;
  transform: scale(1.05);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.field span {
  color: var(--text-muted);
}

.field input {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 9px 10px;
  font-size: 14px;
  outline: none;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.9);
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.field input::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

.field input:focus {
  border-color: rgba(129, 140, 248, 0.95);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.7);
  background: rgba(15, 23, 42, 0.95);
}

.field-inline {
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
}

.field-inline-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-tip {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.form-tip a {
  color: #a5b4fc;
}

.form-tip a:hover {
  text-decoration: underline;
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
  transform: none;
}

/* 充值中心 */
.recharge-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  margin-bottom: 14px;
}

.recharge-tab {
  border-radius: 999px;
  border: none;
  padding: 6px 18px;
  font-size: 13px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color var(--transition-fast),
    color var(--transition-fast), transform var(--transition-fast);
}

.recharge-tab.active {
  background: linear-gradient(135deg, #4f46e5, #a855f7);
  color: #f9fafb;
  transform: translateY(-0.5px);
}

.recharge-content {
  margin-top: 4px;
}

.recharge-panel {
  display: none;
}

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

.recharge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.recharge-item {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: radial-gradient(
      circle at top left,
      rgba(79, 70, 229, 0.3),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.9);
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recharge-title {
  font-size: 14px;
}

.recharge-price {
  font-size: 13px;
  color: #facc15;
}

.wechat-pay-btn {
  margin-top: 4px;
  font-size: 12px;
  padding-inline: 12px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: transparent;
  color: #f9fafb;
  box-shadow: 0 10px 30px rgba(22, 163, 74, 0.7);
}

.wechat-pay-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 38px rgba(22, 163, 74, 0.85);
}

.recharge-tip {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

/* toast 提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  min-width: 220px;
  max-width: 320px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.98);
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.7);
  color: #bbf7d0;
  font-size: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal),
    transform var(--transition-normal);
  z-index: 60;
}

.toast.error {
  border-color: rgba(248, 113, 113, 0.9);
  color: #fecaca;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 响应式适配 */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    order: -1;
  }

  .header-inner {
    gap: 12px;
  }

  .nav {
    display: none;
  }

  .features-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .scenes-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 32px;
  }

  .hero-chat-window {
    padding: 14px;
  }

  .section {
    padding: 22px 0;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    justify-content: space-between;
    width: 100%;
  }
}

/* 聊天页面头像图片尺寸与裁剪 */
.chat-avatar img,
.chat-avatar-sm.user img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

/* 内部排查提示悬浮条 */
.internal-tip {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1000;
  padding: 6px 10px;
  font-size: 11px;
  color: #fee2e2;
  background: rgba(127, 29, 29, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.85);
  pointer-events: none;
}

