/* ===== 变量与基础 ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-bg: rgba(37, 99, 235, 0.08);
  --accent: #1e40af;
  --text: #1f2937;
  --text-muted: #6b7280;
  --bg: #fafafa;
  --white: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: relative;
}

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

.logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-img-footer {
  width: 28px;
  height: 28px;
}

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

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-customer-service {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.nav-customer-service:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

.nav-customer-service svg {
  width: 20px;
  height: 20px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background: var(--primary-bg);
}

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

/* ===== 主视觉区 ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 100px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 100% 80% at 20% 20%, rgba(37, 99, 235, 0.15), transparent 50%),
    radial-gradient(ellipse 80% 60% at 80% 10%, rgba(59, 130, 246, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 80%, rgba(30, 64, 175, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 50% at 0% 100%, rgba(37, 99, 235, 0.06), transparent 50%);
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-bg-shapes .shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
}

.hero-bg-shapes .shape-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  right: -100px;
  animation: float 8s ease-in-out infinite;
}

.hero-bg-shapes .shape-2 {
  width: 300px;
  height: 300px;
  background: var(--primary-light);
  bottom: 10%;
  left: -80px;
  animation: float 10s ease-in-out infinite reverse;
}

.hero-bg-shapes .shape-3 {
  width: 200px;
  height: 200px;
  background: var(--accent);
  top: 60%;
  right: 20%;
  opacity: 0.25;
  animation: float 12s ease-in-out infinite;
}

.hero-bg-shapes .shape-4 {
  width: 150px;
  height: 150px;
  background: var(--primary);
  top: 20%;
  left: 30%;
  opacity: 0.2;
  animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 20px;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 480px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

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

.trust-item::before {
  content: '';
  margin-right: 4px;
}

.hero-mockup-wrap {
  position: relative;
}

.hero-mockup {
  background: var(--white);
  border-radius: 20px;
  padding: 12px 12px 16px;
  box-shadow: 
    0 25px 50px -12px rgba(37, 99, 235, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
}

.hero-mockup-main {
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
}

.hero-float-card {
  position: absolute;
  background: var(--white);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.1);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  animation: floatCard 4s ease-in-out infinite;
}

.hero-float-1 {
  top: 10%;
  right: -20px;
  animation-delay: 0s;
}

.hero-float-2 {
  bottom: 15%;
  left: -30px;
  animation-delay: 2s;
}

.float-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color var(--transition);
}

.hero-scroll:hover {
  color: var(--primary);
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--primary) 0%, transparent 100%);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1); }
}

.mockup-screen {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  overflow: hidden;
}

.mockup-chat {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
}

.chat-bubble.left {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
}

.chat-bubble.right {
  align-self: flex-end;
  background: var(--primary);
  color: white;
}

.chat-time {
  display: block;
  font-size: 0.7rem;
  opacity: 0.7;
  margin-bottom: 4px;
}

.mockup-notch {
  width: 120px;
  height: 24px;
  background: #1e293b;
  border-radius: 0 0 12px 12px;
  margin: 0 auto 12px;
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  height: auto;
  border-radius: 8px 8px 0 0;
  background: var(--primary);
}

.mockup-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  border-radius: 50%;
  opacity: 0.8;
}

.mockup-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
}

/* ===== 区块通用 ===== */
.section {
  padding: 80px 0;
}

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

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

/* ===== 产品特点 ===== */
.features {
  background: var(--white);
}

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

.feature-card {
  padding: 32px 24px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: var(--primary);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

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

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== 关于我们 ===== */
.about {
  background: var(--bg);
}

.about-content {
  max-width: 720px;
  margin: 0 auto;
}

.about-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

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

.about-desc {
  text-align: center;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1rem;
}

/* ===== 下载区 ===== */
.download {
  background: var(--white);
}

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

.download-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 480px;
  margin: 0 auto;
}

.download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: 2px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
}

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

.download-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--primary);
}

.download-icon svg {
  width: 100%;
  height: 100%;
}

.download-card span {
  font-weight: 600;
  font-size: 1.1rem;
}

.download-card small {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== CTA 区块 ===== */
.cta-box {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  padding: 60px;
  border-radius: var(--radius-lg);
  text-align: center;
  color: white;
}

.cta-box h2 {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.cta-box p {
  opacity: 0.9;
  margin-bottom: 24px;
}

.cta-box .btn-primary {
  background: white;
  color: var(--primary);
}

.cta-box .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
}

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

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer-links a:hover {
  color: white;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

.footer-copy {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 8px;
}

.footer-icp {
  font-size: 0.8rem;
  opacity: 0.6;
}

.footer-icp a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.footer-icp a:hover {
  color: white;
}

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-header {
  padding: 32px 32px 0;
}

.modal-header h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.modal-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== 表单 ===== */
.apply-form {
  padding: 24px 32px 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.required {
  color: #dc2626;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group input.error,
.form-group select.error {
  border-color: #dc2626;
}

.form-optional {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* 文件上传 */
.file-upload-wrap {
  position: relative;
}

.file-upload-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  transition: all var(--transition);
}

.file-upload-label:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.file-upload-label svg {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
}

.file-upload-label:hover svg {
  color: var(--primary);
}

.file-upload-text {
  font-size: 0.95rem;
  color: var(--text);
}

.file-upload-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-name {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--primary);
  word-break: break-all;
}

.form-group:has(.file-upload-input.error) .file-upload-label {
  border-color: #dc2626;
  background: #fef2f2;
}

.form-error {
  display: block;
  font-size: 0.8rem;
  color: #dc2626;
  margin-top: 4px;
  min-height: 18px;
}

.form-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--text);
  color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.toast-icon {
  width: 24px;
  height: 24px;
  background: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
}

/* ===== 动画 ===== */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-visual[data-animate] {
  transition-delay: 0.3s;
}

.hero-text h1,
.hero-subtitle,
.hero-actions {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}

.hero-subtitle { animation-delay: 0.1s; }
.hero-actions { animation-delay: 0.2s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 导航栏滚动效果 */
.header.scrolled {
  box-shadow: var(--shadow);
}

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

  .hero-text .hero-actions {
    justify-content: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-trust {
    justify-content: center;
  }

  .hero-visual {
    display: none;
  }

  .hero-scroll {
    display: none;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 5px 12px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-trust {
    flex-direction: column;
    gap: 12px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .download-grid-2 {
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cta-box {
    padding: 40px 24px;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
  }

  .footer-contact {
    flex-direction: column;
    gap: 12px;
  }

  .about-stats {
    flex-direction: column;
    gap: 24px;
  }

  .stat-number {
    font-size: 1.5rem;
  }
}

/* ===== 客服聊天浮窗 ===== */
.chat-widget {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 360px;
  max-width: calc(100vw - 48px);
  height: 460px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  flex-direction: column;
  overflow: hidden;
}

.chat-widget.open {
  display: flex;
}

.chat-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.chat-widget-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.9;
}

.chat-widget-close:hover {
  opacity: 1;
}

.chat-widget-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-widget-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.chat-widget-msg {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 85%;
  font-size: 0.9rem;
}

/* 我发的消息：右侧，蓝色 */
.chat-widget-msg.customer {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
}

/* 客服回复：左侧，灰色 */
.chat-widget-msg.admin {
  background: #fff;
  border: 1px solid var(--border);
  align-self: flex-start;
}

.chat-widget-msg .chat-msg-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat-widget-msg.customer .chat-msg-time {
  color: rgba(255, 255, 255, 0.8);
}

.chat-widget-input-wrap {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.chat-widget-input-wrap input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
}

.chat-widget-input-wrap input:focus {
  outline: none;
  border-color: var(--primary);
}

.chat-widget-input-wrap button {
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
}

.chat-widget-input-wrap button:hover {
  background: var(--primary-dark);
}
