/* ========================================
   AI生意经 - Global Stylesheet (Premium Light Theme)
   Design: Elegant White + Tech Accents
======================================== */

:root {
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border: rgba(15, 23, 42, 0.06);
  --border-hover: rgba(15, 23, 42, 0.12);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-gold: #e2a400; /* 调深以适应浅色底 */
  --accent-gold-light: #fef08a;
  --accent-emerald: #059669;
  --accent-blue: #2563eb;
  --accent-purple: #7c3aed;
  --accent-pink: #db2777;
  --gradient-hero: linear-gradient(135deg, #eff6ff 0%, #f8fafc 40%, #f0fdf4 100%);
  --gradient-gold: linear-gradient(135deg, #e2a400, #ea580c);
  --gradient-card: linear-gradient(145deg, #ffffff, #fdfdfd);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 1px 5px rgba(0, 0, 0, 0.03);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

.featured-section, .all-projects-section, .categories-section, .radar-section, .wechat-section {
  scroll-margin-top: 90px;
}

body {
  font-family: 'Noto Sans SC', 'Inter', -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 10000;
  padding: 9px 14px;
  color: #fff;
  background: #0f172a;
  border-radius: 8px;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .65); outline-offset: 3px; }

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

/* =========== HEADER =========== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon { font-size: 24px; }

.logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-accent {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.04);
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.language-toggle {
  min-width: 48px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-primary);
  font: 700 12px/1 Inter, sans-serif;
  cursor: pointer;
  margin-left: 8px;
}

.language-toggle:hover { border-color: var(--primary); color: var(--primary); }

.btn-subscribe {
  background: var(--gradient-gold);
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(226, 164, 0, 0.2);
}

.btn-subscribe:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(226, 164, 0, 0.3); }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  margin-left: auto;
}

/* =========== HERO =========== */
.hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  padding: 108px 0 58px;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.025) 1px, transparent 1px);
  background-size: 50px 50px;
}

.hero-glow {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(230, 126, 34, 0.06) 0%, rgba(96,165,250,0.05) 50%, transparent 75%);
  pointer-events: none;
  border-radius: 50%;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: -5%;
  left: -8%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

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

/* Two-column layout: text | global opportunity map */
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
  align-items: center;
  gap: 36px;
}

.hero-content {
  max-width: 520px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(226, 164, 0, 0.08);
  border: 1px solid rgba(226, 164, 0, 0.18);
  color: var(--accent-gold);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 18px;
  animation: fadeInDown 0.6s ease;
}

.badge-dot {
  width: 7px; height: 7px;
  background: var(--accent-gold);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  color: #0f172a;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.gradient-text {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 28px;
  line-height: 1.7;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-subtitle strong { color: var(--text-primary); }

.hero-search {
  width: min(100%, 500px);
  min-height: 52px;
  margin: 0 0 10px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.hero-search > span { color: var(--accent-gold); font-size: 24px; }
.hero-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text-primary); font: inherit; }
.hero-search:focus-within { border-color: var(--accent-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .1); }
.hero-search-hint { min-height: 24px; margin-bottom: 10px; font-size: 13px; }

/* CTA button row */
.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #e67e22, #ea580c);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(230, 126, 34, 0.3);
  transition: var(--transition);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(230, 126, 34, 0.38);
}

.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(15,23,42,0.1);
  color: var(--text-primary);
  padding: 11px 22px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.modal-loading { min-height: 320px; display: grid; place-items: center; color: var(--text-secondary); font-weight: 700; }

.btn-hero-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Global opportunity distribution map */
.hero-world-visual {
  min-width: 0;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.hero-map-canvas {
  position: relative;
  height: 350px;
  isolation: isolate;
}

.hero-map-canvas::before {
  content: '';
  position: absolute;
  inset: 8% 4% 0;
  background:
    radial-gradient(circle at 76% 45%, rgba(245, 158, 11, .13), transparent 24%),
    radial-gradient(circle at 56% 48%, rgba(37, 99, 235, .08), transparent 44%);
  filter: blur(18px);
  pointer-events: none;
  z-index: -1;
}

.hero-world-map {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.map-land path {
  fill: rgba(37, 99, 235, .055);
  stroke: rgba(37, 99, 235, .16);
  stroke-width: 1;
  stroke-linejoin: round;
}

.map-routes path {
  fill: none;
  stroke: rgba(234, 88, 12, .56);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 5 8;
  animation: mapSignalFlow 7s linear infinite;
}

.map-routes path:nth-child(even) {
  stroke: rgba(37, 99, 235, .36);
  animation-duration: 9s;
  animation-direction: reverse;
}

.map-nodes circle {
  fill: #ffffff;
  stroke: #f97316;
  stroke-width: 3;
  filter: drop-shadow(0 0 5px rgba(249, 115, 22, .35));
}

.map-focus circle {
  fill: none;
  stroke: #f97316;
  stroke-width: 2;
}

.map-focus circle:nth-child(2) { stroke-width: 3; }
.map-focus circle:nth-child(3) { fill: #f97316; stroke: #ffffff; stroke-width: 3; }

.map-case-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 205px;
  padding: 9px 12px 9px 9px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(52, 72, 103, .1);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  animation: mapCardFloat 5s ease-in-out infinite;
}

.map-case-card strong,
.map-case-card small {
  display: block;
}

.map-case-card strong {
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}

.map-case-card small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 9px;
}

.map-case-thumb {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, #fff7ed, #eff6ff);
  font-size: 17px;
}

.map-case-america { top: 9%; left: 6%; }
.map-case-europe { left: 28%; bottom: 7%; animation-delay: -1.5s; }
.map-case-asia { top: 46%; right: 0; animation-delay: -3s; }

.hero-map-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(15, 23, 42, .065);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(36, 52, 77, .06);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.hero-map-metric {
  position: relative;
  padding: 15px 9px 14px;
  text-align: center;
}

.hero-map-metric + .hero-map-metric::before {
  content: '';
  position: absolute;
  top: 22%;
  bottom: 22%;
  left: 0;
  width: 1px;
  background: rgba(15, 23, 42, .08);
}

.hero-map-metric .stat-number {
  font-size: 21px;
}

.hero-map-metric .stat-label {
  display: block;
}

@keyframes mapSignalFlow {
  to { stroke-dashoffset: -65; }
}

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

.stat-number {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

/* Keep old .hero-stats for mobile fallback */
.hero-stats {
  display: none;
}


/* =========== SECTIONS =========== */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

/* =========== FEATURED SECTION =========== */
.featured-section {
  padding: 80px 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* =========== PROJECT CARD =========== */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--card-color, var(--accent-gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

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

.project-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--card-color) 45%, white);
  outline-offset: 4px;
}

.project-card:hover::before { transform: scaleX(1); }

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.card-emoji {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  background: var(--emoji-bg, rgba(226, 164, 0, 0.08));
}

.card-title-group { flex: 1; min-width: 0; }

.card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.card-tag {
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.05);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 500;
}

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

.card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

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

.metric-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-emerald);
  display: block;
  line-height: 1;
  margin-bottom: 3px;
}

.metric-value.gold { color: var(--accent-gold); }
.metric-value.blue { color: var(--accent-blue); }

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

.score-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.score-stars { color: var(--accent-gold); letter-spacing: -2px; }

.card-arrow {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}

.project-card:hover .card-arrow {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
}

.card-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--card-color);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.modal-source-link {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #c2410c;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

/* Featured badge */
.featured-badge {
  position: absolute;
  top: 16px; right: 58px;
  background: var(--gradient-gold);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
  z-index: 4;
}

/* =========== ALL PROJECTS =========== */
.all-projects-section {
  padding: 0 0 80px;
}

/* =========== DB CATEGORY BAR =========== */
.db-category-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  margin-bottom: 28px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.db-category-pill {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.db-category-pill:hover {
  background: rgba(230, 126, 34, 0.06);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.db-category-pill.active {
  background: linear-gradient(135deg, #e67e22, #ea580c);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

/* =========== PAGINATION =========== */
.pagination-wrapper {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeInUp 0.4s ease;
}

.pagination-info {
  font-size: 14px;
  color: var(--text-muted);
}

.pagination-info strong {
  color: var(--primary);
  font-weight: 700;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-nav-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.page-nav-btn:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.page-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.page-num {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.page-num:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(230, 126, 34, 0.05);
}

.page-num.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.25);
}

.page-ellipsis {
  color: var(--text-muted);
  font-size: 14px;
  padding: 0 4px;
}

.sort-controls { display: flex; gap: 12px; }

.sort-select {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.sort-select:hover { border-color: var(--border-hover); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.empty-state {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
  font-size: 16px;
}

/* =========== CATEGORIES =========== */
.categories-section {
  padding: 80px 0;
  background: linear-gradient(180deg, transparent, rgba(96,165,250,0.02), transparent);
}

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

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.category-card:hover {
  border-color: var(--accent-blue);
  background: rgba(37,99,235,0.03);
  transform: translateY(-2px);
}

.category-icon { font-size: 32px; margin-bottom: 10px; }
.category-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.category-count { font-size: 12px; color: var(--text-muted); }

/* =========== RADAR SECTION =========== */
.radar-section {
  padding: 100px 0;
  overflow: hidden;
}

.radar-content {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(500px, 1.08fr);
  gap: 64px;
  align-items: center;
}

.radar-badge {
  display: inline-block;
  background: rgba(5,150,105,0.08);
  border: 1px solid rgba(5,150,105,0.15);
  color: var(--accent-emerald);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.radar-title {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -1px;
  margin-bottom: 20px;
  color: #0f172a;
}

.radar-desc {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 28px;
}

.radar-features { margin-bottom: 36px; }

.radar-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--text-secondary);
}

.feature-icon { font-size: 18px; }

.btn-radar {
  background: var(--gradient-gold);
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  box-shadow: 0 4px 15px rgba(226, 164, 0, 0.25);
}

.btn-radar:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(226, 164, 0, 0.35); }

/* Radar Visual */
.radar-visual {
  position: relative;
  width: min(100%, 560px);
  height: 470px;
  margin: 0 auto;
  isolation: isolate;
}

.radar-visual::before {
  content: '';
  position: absolute;
  width: 250px;
  height: 250px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, .12), rgba(37, 99, 235, .05) 48%, transparent 72%);
  filter: blur(10px);
  z-index: -1;
}

.radar-network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.radar-orbit {
  fill: none;
  stroke: rgba(37, 99, 235, .13);
  stroke-width: 1.2;
}

.orbit-middle { stroke: rgba(5, 150, 105, .12); }
.orbit-inner { stroke: rgba(245, 158, 11, .2); }

.radar-link {
  fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 5 7;
  animation: radarSignalFlow 6s linear infinite;
}

.link-blue { stroke: rgba(37, 99, 235, .48); }
.link-orange { stroke: rgba(249, 115, 22, .52); }
.link-green { stroke: rgba(5, 150, 105, .44); }

.radar-track-dots circle {
  fill: #ffffff;
  stroke: #f97316;
  stroke-width: 3;
  filter: drop-shadow(0 0 5px rgba(249, 115, 22, .25));
}

.radar-track-dots circle:nth-child(3n + 1) { stroke: #2563eb; }
.radar-track-dots circle:nth-child(3n + 2) { stroke: #059669; }

.radar-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 112px;
  height: 112px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 34px;
  color: #ffffff;
  background: linear-gradient(145deg, #f59e0b, #ea580c);
  border: 6px solid rgba(255, 255, 255, .9);
  box-shadow:
    0 18px 38px rgba(234, 88, 12, .22),
    0 0 0 10px rgba(249, 115, 22, .07),
    0 0 0 22px rgba(37, 99, 235, .035);
  z-index: 3;
  animation: radarCorePulse 3.8s ease-in-out infinite;
}

.radar-core-icon {
  font-size: 35px;
  line-height: 1;
}

.radar-core strong {
  margin-top: -5px;
  font-size: 17px;
  letter-spacing: .08em;
}

.radar-node {
  position: absolute;
  width: 112px;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(44, 65, 95, .1);
  backdrop-filter: blur(14px);
  transform: translate(-50%, -50%);
  animation: radarNodeFloat 5s ease-in-out infinite;
  z-index: 4;
}

.radar-node-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(145deg, #eff6ff, #ffffff);
  font-size: 24px;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .06);
}

.radar-node strong {
  font-size: 13px;
  white-space: nowrap;
}

.radar-node-ai { top: 10%; left: 50%; }
.radar-node-saas { top: 27%; left: 87%; animation-delay: -.8s; }
.radar-node-ecommerce { top: 51%; left: 13%; animation-delay: -1.6s; }
.radar-node-content { top: 73%; left: 86%; animation-delay: -2.4s; }
.radar-node-local { top: 88%; left: 50%; animation-delay: -3.2s; }

@keyframes radarSignalFlow {
  to { stroke-dashoffset: -60; }
}

@keyframes radarCorePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.035); }
}

@keyframes radarNodeFloat {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 5px)); }
}

/* =========== WECHAT SECTION =========== */
.wechat-section {
  padding: 80px 0;
}

.wechat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 60px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
  box-shadow: var(--shadow-card);
}

.wechat-title {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  color: #0f172a;
}

.wechat-desc {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 24px;
  line-height: 1.7;
}

.wechat-list {
  list-style: none;
  margin-bottom: 32px;
}

.wechat-list li {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-left: 4px;
}

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

.social-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid var(--border);
  color: var(--text-primary);
  background: #f1f5f9;
}

.social-btn:hover { background: #e2e8f0; }
.wechat-btn:hover { border-color: #07C160; color: #07C160; }
.xiaohongshu-btn:hover { border-color: #FF2442; color: #FF2442; }
.douyin-btn:hover { border-color: #000000; color: #000000; }

/* QR Placeholder */
.qr-placeholder { text-align: center; }

.qr-mock {
  width: 160px; height: 160px;
  background: white;
  border-radius: 16px;
  padding: 16px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.qr-grid {
  width: 100%; height: 100%;
  background:
    repeating-linear-gradient(
      0deg,
      #0f172a 0px, #0f172a 6px,
      transparent 6px, transparent 12px
    ),
    repeating-linear-gradient(
      90deg,
      #0f172a 0px, #0f172a 6px,
      transparent 6px, transparent 12px
    );
  opacity: 0.1;
  border-radius: 4px;
}

.qr-corner {
  position: absolute;
  width: 28px; height: 28px;
  border: 4px solid #0f172a;
}

.qr-corner.tl { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.qr-corner.tr { top: 12px; right: 12px; border-left: none; border-bottom: none; }
.qr-corner.bl { bottom: 12px; left: 12px; border-right: none; border-top: none; }

.qr-label { font-size: 14px; color: var(--text-secondary); margin-bottom: 4px; }
.qr-sublabel { font-size: 16px; font-weight: 700; color: var(--text-primary); }

/* =========== FOOTER =========== */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-inline: 60px;
  margin-bottom: 48px;
}

.footer-logo {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 16px;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.footer-desc { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

.footer-links h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 10px;
  transition: var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-inline: 60px;
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* =========== MODAL =========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  max-width: 820px; /* 大幅增加宽度，用于展示产品架构与上手路径 */
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.15);
}

.modal-overlay.open .modal-container {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}

.modal-close:hover { background: #e2e8f0; color: var(--text-primary); }

/* Modal Content */
.modal-hero {
  padding: 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.modal-emoji-wrap {
  width: 72px; height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 20px;
}

.modal-name {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.modal-summary {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.modal-metric {
  background: #ffffff;
  padding: 20px 16px;
  text-align: center;
}

.modal-metric-value {
  font-size: 20px;
  font-weight: 800;
  display: block;
  margin-bottom: 4px;
}

.modal-metric-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Modal tab navigation */
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  padding: 0 40px;
}

.modal-tab-btn {
  padding: 16px 20px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.modal-tab-btn:hover {
  color: var(--text-primary);
}

.modal-tab-btn.active {
  color: var(--accent-blue);
}

.modal-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-blue);
}

.modal-body { padding: 32px 40px; }

.modal-tab-content {
  display: none;
}

.modal-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-section { margin-bottom: 24px; }

.modal-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 3px solid var(--accent-blue);
  padding-left: 10px;
}

.modal-section-content {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}

/* Custom styles for structures */
.arch-flow, .loop-flow {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-top: 10px;
  position: relative;
}

.arch-flow strong, .loop-flow strong {
  color: var(--text-primary);
}

.step-card {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  align-items: flex-start;
}

.step-number {
  background: var(--accent-blue);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-china-box {
  background: rgba(5,150,105,0.04);
  border: 1px solid rgba(5,150,105,0.1);
  border-radius: 14px;
  padding: 20px 24px;
}

.modal-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-tag {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 8px;
}

/* Replicability Bar */
.rep-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.rep-track {
  flex: 1;
  height: 8px;
  background: rgba(15, 23, 42, 0.05);
  border-radius: 100px;
  overflow: hidden;
}

.rep-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--gradient-gold);
}

.rep-score { font-size: 16px; font-weight: 800; color: var(--accent-gold); }

/* =========== SUBSCRIBE MODAL =========== */
.subscribe-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.subscribe-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.subscribe-modal {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.15);
}

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

.subscribe-icon { font-size: 48px; margin-bottom: 20px; }

.subscribe-modal h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #0f172a;
}

.subscribe-modal p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.subscribe-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; text-align: left; }

.sub-email-label { color: var(--text-primary); font-size: 14px; font-weight: 700; }

.sub-input {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.sub-input:focus {
  border-color: var(--accent-blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

.sub-input::placeholder { color: var(--text-muted); }

.btn-sub-submit {
  background: var(--gradient-gold);
  border: none;
  border-radius: 12px;
  padding: 14px;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(226, 164, 0, 0.2);
}

.btn-sub-submit:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-sub-submit:disabled { cursor: wait; opacity: 0.65; transform: none; }

.subscribe-modal .sub-status {
  min-height: 22px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.subscribe-modal .sub-status.success { color: #047857; }
.subscribe-modal .sub-status.error { color: #b91c1c; }

.subscribe-modal .sub-note { margin: 0; font-size: 13px; color: var(--text-muted); }

/* =========== ANIMATIONS =========== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* =========== RESPONSIVE =========== */
@media (max-width: 900px) {
  .language-toggle { margin-left: auto; }
  .main-nav, .header-actions { display: none; }
  .main-nav.mobile-open {
    display: flex;
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255,255,255,.98);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15,23,42,.14);
  }
  .main-nav.mobile-open .nav-link { padding: 12px 14px; }
  .mobile-menu-btn { display: block; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .hero {
    min-height: auto;
    padding-top: 104px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero-content {
    max-width: 680px;
  }
  .hero-world-visual {
    width: min(100%, 720px);
    margin: 0 auto;
  }
  .radar-content { grid-template-columns: 1fr; }
  .radar-text { max-width: 680px; }
  .radar-visual {
    width: min(100%, 560px);
    margin-top: 12px;
  }
  .wechat-card { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .modal-metrics { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 20px; }
  .modal-tabs { padding: 0 24px; }
}

@media (max-width: 600px) {
  .subscribe-modal { padding: 42px 22px 28px; }
  .subscribe-icon { font-size: 40px; margin-bottom: 14px; }
  .featured-grid, .projects-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; padding-inline: 24px; }
  .footer-bottom { margin-inline: 24px; }
  .hero-title { font-size: 28px; letter-spacing: -0.5px; }
  .hero {
    padding: 96px 0 46px;
  }
  .hero-inner { gap: 24px; }
  .hero-map-canvas { height: 292px; }
  .map-case-card {
    max-width: 145px;
    padding: 7px 9px 7px 7px;
    border-radius: 10px;
  }
  .map-case-card strong { max-width: 95px; overflow: hidden; text-overflow: ellipsis; }
  .map-case-card small { display: none; }
  .map-case-thumb { width: 28px; height: 28px; flex-basis: 28px; font-size: 15px; }
  .map-case-america { top: 10%; left: 0; }
  .map-case-europe { left: 18%; bottom: 3%; }
  .map-case-asia { top: 48%; right: 0; }
  .hero-map-metrics { grid-template-columns: repeat(2, 1fr); }
  .hero-map-metric:nth-child(3)::after,
  .hero-map-metric:nth-child(4)::after {
    content: '';
    position: absolute;
    left: 12%;
    right: 12%;
    top: 0;
    height: 1px;
    background: rgba(15, 23, 42, .07);
  }
  .hero-map-metric:nth-child(3)::before { display: none; }
  .radar-section { padding: 72px 0; }
  .radar-title { font-size: 30px; }
  .radar-content { gap: 42px; }
  .radar-visual { height: 390px; }
  .radar-node {
    width: 84px;
    min-height: 70px;
    padding: 8px;
    border-radius: 14px;
  }
  .radar-node-icon { width: 34px; height: 34px; border-radius: 10px; font-size: 19px; }
  .radar-node strong { font-size: 11px; }
  .radar-core { width: 88px; height: 88px; border-radius: 28px; }
  .radar-core-icon { font-size: 28px; }
  .radar-core strong { font-size: 13px; }
  .radar-node-ai { top: 11%; }
  .radar-node-saas { top: 28%; left: 86%; }
  .radar-node-ecommerce { top: 51%; left: 14%; }
  .radar-node-content { top: 72%; left: 85%; }
  .radar-node-local { top: 87%; }
  .modal-hero, .modal-body { padding: 24px; }
  .wechat-card { padding: 32px 24px; }
  .modal-tabs { padding: 0 12px; }
  .modal-tab-btn { padding: 12px 10px; font-size: 13px; }
}

@media (max-width: 420px) {
  .map-case-europe { display: none; }
  .radar-node-ecommerce { left: 13%; }
  .radar-node-saas,
  .radar-node-content { left: 87%; }
}

@media (prefers-reduced-motion: reduce) {
  .map-routes path,
  .map-case-card,
  .radar-link,
  .radar-core,
  .radar-node {
    animation: none !important;
  }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 100px; }

/* Selection */
::selection { background: rgba(37,99,235,0.1); color: var(--text-primary); }

/* =========== AI BUSINESS ADVISOR CHATBOT =========== */
.ai-advisor-bubble {
  position: fixed;
  bottom: 110px;
  right: 28px;
  background: linear-gradient(135deg, #0284c7, #7c3aed);
  color: #ffffff;
  padding: 13px 26px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.45), 0 0 0 4px rgba(124, 58, 237, 0.15);
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: advisorFloat 3s ease-in-out infinite;
}

.ai-advisor-bubble:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 35px rgba(124, 58, 237, 0.55), 0 0 0 6px rgba(124, 58, 237, 0.2);
}

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

.ai-advisor-panel {
  position: fixed;
  bottom: 165px;
  right: 28px;
  width: 380px;
  height: calc(100vh - 190px);
  max-height: 760px;
  min-height: 480px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-advisor-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.panel-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.05), rgba(124, 58, 237, 0.05));
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.panel-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.2);
}

.panel-title-group {
  display: flex;
  flex-direction: column;
}

.panel-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.panel-status {
  font-size: 11px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 4px;
}

.panel-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.panel-close {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.panel-close:hover { color: #0f172a; }

.panel-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.6;
}

.msg strong {
  font-weight: 700;
  color: #0f172a;
}

.bot-msg {
  align-self: flex-start;
  background: rgba(241, 245, 249, 0.9);
  color: #1e293b;
  border-top-left-radius: 4px;
  border: 1px solid rgba(0,0,0,0.03);
}

.user-msg {
  align-self: flex-end;
  background: linear-gradient(135deg, #0284c7, #7c3aed);
  color: #ffffff;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.panel-suggestions {
  padding: 0 20px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-suggestions button {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 100px;
  padding: 6px 12px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

.panel-suggestions button:hover {
  background: #ffffff;
  border-color: #0284c7;
  color: #0284c7;
  transform: translateY(-1px);
}

.panel-input-area {
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  gap: 10px;
}

#aiMessageInput {
  flex: 1;
  background: #f8fafc;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

#aiMessageInput:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.08);
}

#sendAiMessageBtn {
  background: linear-gradient(135deg, #0284c7, #7c3aed);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s;
}

#sendAiMessageBtn:hover { opacity: 0.95; }

#sendAiMessageBtn:disabled,
#aiMessageInput:disabled {
  cursor: wait;
  opacity: 0.65;
}

/* Clickable inside-chat recommendations */
.chat-project-link {
  display: block;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 8px;
  text-decoration: none;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.chat-project-link:hover {
  border-color: #0284c7;
  background: rgba(2, 132, 199, 0.02);
  transform: translateX(2px);
}

@media (max-width: 600px) {
  .ai-advisor-panel {
    width: calc(100% - 32px);
    right: 16px;
    bottom: 80px;
    height: 480px;
  }
  .ai-advisor-bubble {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
    justify-content: center;
    padding: 0;
    font-size: 18px;
  }
  .ai-advisor-label {
    display: none;
  }
}

/* =========== LOGIN-FREE LOCAL LIBRARY BUTTON =========== */
.btn-library {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-library:hover {
  background: rgba(230, 126, 34, 0.08);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* =========== FAVORITE BUTTON ON CARDS =========== */
.card-fav-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-fav-btn:hover {
  transform: scale(1.12);
  background: #fffdf5;
  border-color: #f59e0b;
  color: #d97706;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.card-fav-btn.active {
  background: linear-gradient(135deg, #fffbe0, #fef3c7);
  border-color: #f59e0b;
  color: #d97706;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.25);
}

/* =========== LOGIN-FREE LOCAL PROJECT LIBRARY =========== */
.library-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.library-modal {
  background: #ffffff;
  width: 100%;
  max-width: 980px;
  height: 660px;
  max-height: 88vh;
  border-radius: 24px;
  display: flex;
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.library-sidebar {
  width: 240px;
  background: #f8fafc;
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
}

.library-heading {
  text-align: center;
  margin-bottom: 24px;
}

.library-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #e67e22, #ea580c);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px;
  box-shadow: 0 6px 16px rgba(230, 126, 34, 0.3);
}

.library-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.library-note {
  font-size: 11px;
  color: var(--text-muted);
}

.library-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.library-nav-btn {
  text-align: left;
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.library-nav-btn:hover { background: rgba(0,0,0,0.04); }
.library-nav-btn.active { background: #ffffff; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }

.library-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.panel-heading { font-size: 18px; font-weight: 800; color: #0f172a; margin-bottom: 20px; }

.fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.history-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.history-item:hover {
  border-color: var(--primary);
  transform: translateX(3px);
}

@media (max-width: 700px) {
  .btn-library {
    padding: 8px 12px;
  }

  .library-modal {
    height: 82vh;
    flex-direction: column;
  }

  .library-sidebar {
    width: 100%;
    padding: 20px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .library-heading {
    margin-bottom: 14px;
  }

  .library-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
    margin-bottom: 8px;
  }

  .library-nav {
    flex-direction: row;
  }

  .library-nav-btn {
    flex: 1;
    text-align: center;
  }

  .library-content {
    padding: 22px 18px;
  }
}
