/* ==========================================
   龙虾找车 - 全局样式 (common.css)
   AI-First 设计系统
   ========================================== */

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1D2129;
  background: #F7F8FA;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
}

ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, textarea, select { font-family: inherit; outline: none; }

/* --- CSS Variables --- */
:root {
  --primary: #E8452A;
  --primary-hover: #C73820;
  --primary-light: rgba(232, 69, 42, 0.1);
  --primary-gradient: linear-gradient(135deg, #E8452A, #FF6B35);
  --accent: #FF6B35;
  --bg: #F7F8FA;
  --white: #FFFFFF;
  --text-primary: #1D2129;
  --text-secondary: #4E5969;
  --text-weak: #86909C;
  --dark: #1D2129;
  --dark-secondary: #2a2d35;
  --border: #E5E6EB;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-primary: 0 8px 24px rgba(232, 69, 42, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: all 0.3s ease;
  --nav-height: 72px;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: var(--transition);
}

.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  display: none; /* Logo image replaces text */
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-cta {
  background: var(--primary-gradient);
  color: var(--white);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow-primary);
  margin-left: 12px;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(232, 69, 42, 0.35);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1002;
}

.nav-hamburger span {
  width: 24px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile drawer */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}

.mobile-overlay.active {
  opacity: 1;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100%;
  background: var(--white);
  z-index: 1001;
  transition: right 0.3s ease;
  padding: 80px 24px 24px;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.mobile-drawer.active {
  right: 0;
}

.mobile-drawer .nav-link {
  display: block;
  padding: 14px 16px;
  font-size: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.mobile-drawer .nav-link:hover,
.mobile-drawer .nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}

.mobile-drawer .nav-cta {
  display: block;
  text-align: center;
  margin: 16px 0 0;
}

/* --- Section Common --- */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.3;
}

.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Gradient text for AI emphasis */
.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition);
  white-space: nowrap;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(232, 69, 42, 0.35);
}

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

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

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

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.25);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 17px;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(232, 69, 42, 0.15);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
}

.card-icon.ai { background: linear-gradient(135deg, rgba(232,69,42,0.12), rgba(255,107,53,0.12)); }
.card-icon.car { background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(99,102,241,0.12)); }
.card-icon.tool { background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(52,211,153,0.12)); }
.card-icon.finance { background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(251,191,36,0.12)); }

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Grid --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* --- AI Floating Widget --- */
.ai-float {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 998;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ai-float-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-primary);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  margin-top: 12px;
}

.ai-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(232, 69, 42, 0.4);
}

.ai-float-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  animation: ai-pulse 2s infinite;
}

@keyframes ai-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

.ai-float-tooltip {
  position: absolute;
  right: 72px;
  top: 86px;
  transform: translateY(-50%);
  background: var(--white);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.ai-float-btn:hover + .ai-float-tooltip {
  opacity: 1;
}

.ai-float-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: var(--white);
  border-right: none;
}

/* --- Back to Top --- */
.back-to-top {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--border);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 0;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-brand img {
  height: 36px;
}

.footer-brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

.footer-brand-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.footer-col-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-link {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-info {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 10px;
  white-space: nowrap;
}

.footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
}

/* --- Page Hero (for sub-pages) --- */
.page-hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, var(--dark) 0%, #2a1a15 50%, var(--dark) 100%);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse at 70% 50%, rgba(232,69,42,0.15), transparent 70%);
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40%;
  height: 60%;
  background: radial-gradient(ellipse at 20% 80%, rgba(255,107,53,0.1), transparent 70%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
}

.page-hero-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
}

.page-hero-desc {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 560px;
  line-height: 1.7;
}

/* AI decorative dots pattern */
.ai-pattern {
  position: absolute;
  width: 300px;
  height: 300px;
  opacity: 0.05;
  background-image: radial-gradient(circle, var(--white) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* --- Utilities --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

/* --- Tag / Badge --- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.tag-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.tag-success {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
}

.tag-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
}

.tag-coming {
  background: rgba(134, 144, 156, 0.1);
  color: var(--text-weak);
}

/* --- CTA Section (shared across all pages) --- */
.cta-section {
  background: var(--primary-gradient);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
  border-radius: 50%;
}

.cta-title {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.cta-desc {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* --- Download Modal (placeholder for APP download) --- */
.download-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

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

.download-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  position: relative;
  animation: modal-in 0.3s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.download-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-weak);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.download-modal-close:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.download-modal-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.download-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.download-modal-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.download-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 32px;
  background: var(--primary-gradient);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-primary);
  transition: var(--transition);
  text-decoration: none;
}

.download-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(232, 69, 42, 0.35);
  color: var(--white);
}

.download-modal-hint {
  font-size: 12px;
  color: var(--text-weak);
  margin-top: 16px;
}

/* --- Responsive --- */
@media (max-width: 1199px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section-title { font-size: 30px; }
}

@media (max-width: 767px) {
  :root { --nav-height: 60px; }

  .nav-links { display: none; }
  .nav-cta.desktop-only { display: none; }
  .nav-hamburger { display: flex; }
  .mobile-overlay { display: block; }

  .container { padding: 0 16px; }

  .section { padding: 60px 0; }
  .section-header { margin-bottom: 40px; }
  .section-title { font-size: 26px; }
  .section-desc { font-size: 15px; }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .page-hero { padding: 100px 0 50px; }
  .page-hero-title { font-size: 28px; }
  .page-hero-desc { font-size: 15px; }

  .btn-lg { padding: 14px 28px; font-size: 15px; }

  .ai-float { bottom: 20px; right: 20px; }
  .ai-float-btn { width: 52px; height: 52px; font-size: 20px; }
  .back-to-top { width: 40px; height: 40px; margin-top: 10px; }
  .back-to-top svg { width: 18px; height: 18px; }
  .ai-float-tooltip { display: none; }

  .cta-title { font-size: 26px; }
  .cta-buttons { flex-direction: column; align-items: center; }

  .download-modal { padding: 36px 24px; }
  .download-modal-title { font-size: 20px; }
}
