/* ============================================================
   VPPLORA Design System - Base Styles
   Shared across all pages for visual consistency
   ============================================================ */

@tailwind base;
@tailwind components;
@tailwind utilities;

/* === Font Imports === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Serif+SC:wght@500;700;900&display=swap');

/* === Design Tokens (CSS Custom Properties) === */
:root {
  /* Brand Colors */
  --vp-gold: #d4af37;
  --vp-gold-light: #f4d03f;
  --vp-gold-dark: #b8941e;
  --vp-gold-bg: rgba(212, 175, 55, 0.1);
  --vp-gold-border: rgba(212, 175, 55, 0.3);

  /* Navy Palette — 宝蓝色系，安定强大 */
  --vp-navy-darkest: #0a1628;
  --vp-navy-dark: #0f1d33;
  --vp-navy-mid: #1a2844;
  --vp-navy: #1c2d4d;
  --vp-navy-light: #253349;
  --vp-navy-lighter: #3d4f65;

  /* Blue Accent */
  --vp-blue: #1e40af;
  --vp-blue-light: #3b82f6;

  /* Text Colors - Dark Theme */
  --vp-text-white: #ffffff;
  --vp-text-light: #e2e8f0;
  --vp-text-muted: #94a3b8;
  --vp-text-dim: #a0a0a0;

  /* Text Colors - Light Theme */
  --vp-text-dark: #0f172a;
  --vp-text-secondary: #475569;
  --vp-bg-light: #f8fafc;

  /* Status Colors */
  --vp-green: #22c55e;
  --vp-green-soft: #4ade80;
  --vp-red: #ef4444;
  --vp-yellow: #fbbf24;

  /* Surfaces — 蓝调玻璃质感 */
  --vp-glass: rgba(22, 34, 64, 0.7);
  --vp-glass-border: rgba(255, 255, 255, 0.08);
  --vp-glass-light: rgba(255, 255, 255, 0.05);

  /* Spacing */
  --vp-radius-sm: 6px;
  --vp-radius-md: 10px;
  --vp-radius-lg: 16px;
  --vp-radius-xl: 20px;

  /* Transitions */
  --vp-transition: all 0.3s ease;
}

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

html, body {
  height: 100%;
}

/* === Typography === */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.serif-font,
.vp-serif {
  font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', 'Georgia', serif;
  letter-spacing: 0.02em;
}

/* === Hero Background - 全局动态背景 === */
.hero-bg {
  position: relative;
  background-color: var(--vp-navy-dark, #0f1d33);
}
.hero-bg::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: radial-gradient(ellipse at 50% 30%, rgba(37,99,235,0.12) 0%, rgba(212,175,55,0.03) 40%, rgba(15,29,51,0) 70%);
  animation: heroPulse 8s infinite ease-in-out;
  z-index: 0;
  pointer-events: none;
}
.hero-bg::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&q=80&w=1920') center/cover no-repeat;
  opacity: 0.08;
  mix-blend-mode: overlay;
  z-index: 0;
  pointer-events: none;
}
@keyframes heroPulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* === Shared Component Styles === */

/* Gold Buttons */
.vp-btn-gold {
  display: inline-block;
  padding: 12px 28px;
  background: #d4af37;
  background: var(--vp-gold);
  color: #1a3a52;
  color: var(--vp-navy);
  border: none;
  border-radius: 10px;
  border-radius: var(--vp-radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  transition: var(--vp-transition);
  text-decoration: none;
  text-align: center;
}

.vp-btn-gold:hover {
  background: #f4d03f;
  background: var(--vp-gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* Outlined Gold Button */
.vp-btn-gold-outline {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  color: #d4af37;
  color: var(--vp-gold);
  border: 2px solid #d4af37;
  border-color: var(--vp-gold);
  border-radius: 10px;
  border-radius: var(--vp-radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  transition: var(--vp-transition);
  text-decoration: none;
  text-align: center;
}

.vp-btn-gold-outline:hover {
  background: #d4af37;
  background: var(--vp-gold);
  color: #1a3a52;
  color: var(--vp-navy);
}

/* Glass Panel */
.vp-glass {
  background: rgba(15, 23, 42, 0.6);
  background: var(--vp-glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-color: var(--vp-glass-border);
  border-radius: 16px;
  border-radius: var(--vp-radius-lg);
}

/* Gold-bordered Card */
.vp-card {
  background: rgba(255, 255, 255, 0.05);
  background: var(--vp-glass-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-color: var(--vp-gold-border);
  border-radius: 16px;
  border-radius: var(--vp-radius-lg);
  padding: 30px;
}

/* Case ID Badge */
.vp-case-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.1);
  background: var(--vp-gold-bg);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-color: var(--vp-gold-border);
  color: #d4af37;
  color: var(--vp-gold);
  padding: 6px 18px;
  border-radius: 20px;
  border-radius: var(--vp-radius-xl);
  font-family: "Courier New", monospace;
  font-size: 15px;
  font-weight: 600;
}

/* Status Badges */
.vp-badge-green {
  display: inline-block;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  color: var(--vp-green);
  padding: 4px 12px;
  border-radius: 6px;
  border-radius: var(--vp-radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.vp-badge-yellow {
  display: inline-block;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  color: var(--vp-yellow);
  padding: 4px 12px;
  border-radius: 6px;
  border-radius: var(--vp-radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.vp-badge-red {
  display: inline-block;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  color: var(--vp-red);
  padding: 4px 12px;
  border-radius: 6px;
  border-radius: var(--vp-radius-sm);
  font-size: 13px;
  font-weight: 600;
}

/* Section Header */
.vp-section-title {
  color: #d4af37;
  color: var(--vp-gold);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* Loading Spinner */
.vp-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(212, 175, 55, 0.15);
  border-top: 4px solid #d4af37;
  border-top-color: var(--vp-gold);
  border-radius: 50%;
  animation: vp-spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes vp-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Gold Divider */
.vp-divider {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
  background: linear-gradient(90deg, transparent, var(--vp-gold-border), transparent);
  margin: 30px 0;
}

/* Scrollbar Styling (Dark Theme) */
.vp-dark-scroll::-webkit-scrollbar {
  width: 6px;
}
.vp-dark-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
.vp-dark-scroll::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}
.vp-dark-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}

/* === Print Base Styles === */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
}

/* ==================== CRO Conversion Components ==================== */

/* Trust Badges Row */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 0;
  font-size: 12px;
  color: #94a3b8;
}
.trust-badges .badge-item {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.trust-badges .badge-icon {
  font-size: 14px;
}

/* Sticky Bottom CTA Bar */
.sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.sticky-cta-bar.visible {
  transform: translateY(0);
}
.sticky-cta-bar .cta-btn {
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  color: #0f1d33;
  font-weight: 800;
  padding: 12px 32px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  animation: pulseGold 2s ease-in-out infinite;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
@keyframes pulseGold {
  0%, 100% { box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3); }
  50% { box-shadow: 0 4px 25px rgba(212, 175, 55, 0.6); }
}

/* Social Proof Toast */
.social-proof-toast {
  position: fixed;
  bottom: 80px;
  left: 20px;
  z-index: 998;
  background: rgba(22, 34, 64, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  padding: 10px 16px;
  max-width: 320px;
  font-size: 13px;
  color: #cbd5e1;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.4s ease;
}
.social-proof-toast.show {
  opacity: 1;
  transform: translateX(0);
}
.social-proof-toast .proof-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  margin-right: 8px;
  animation: blink 1.5s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Step Progress Bar */
.step-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 16px 0;
  max-width: 480px;
  margin: 0 auto 20px;
}
.step-progress .step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}
.step-progress .step.done {
  color: #4ade80;
}
.step-progress .step.current {
  color: #d4af37;
  font-weight: 700;
}
.step-progress .step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid #334155;
  flex-shrink: 0;
}
.step-progress .step.done .step-num {
  background: #4ade80;
  border-color: #4ade80;
  color: #0f172a;
}
.step-progress .step.current .step-num {
  background: #d4af37;
  border-color: #d4af37;
  color: #0f172a;
}
.step-progress .step-line {
  width: 40px;
  height: 2px;
  background: #334155;
  margin: 0 8px;
  flex-shrink: 0;
}
.step-progress .step.done + .step-line,
.step-progress .step-line.done {
  background: #4ade80;
}

/* Vertical Timeline */
.timeline-vertical {
  position: relative;
  padding-left: 32px;
}
.timeline-vertical::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #2d3e54;
}
.timeline-vertical .tl-item {
  position: relative;
  padding-bottom: 20px;
}
.timeline-vertical .tl-dot {
  position: absolute;
  left: -32px;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: #1e293b;
  border: 2px solid #334155;
  z-index: 1;
}
.timeline-vertical .tl-item.done .tl-dot {
  background: #4ade80;
  border-color: #4ade80;
  color: #0f172a;
}
.timeline-vertical .tl-item.active .tl-dot {
  background: #d4af37;
  border-color: #d4af37;
  color: #0f172a;
  animation: pulseGold 2s ease-in-out infinite;
}
.timeline-vertical .tl-title {
  font-weight: 700;
  color: #cbd5e1;
  font-size: 14px;
  margin-bottom: 4px;
}
.timeline-vertical .tl-item.done .tl-title {
  color: #4ade80;
}
.timeline-vertical .tl-item.active .tl-title {
  color: #d4af37;
}
.timeline-vertical .tl-desc {
  font-size: 12px;
  color: #64748b;
}

/* Cost Comparison Box */
.cost-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.cost-compare .cost-bad {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.cost-compare .cost-good {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.cost-compare .cost-label {
  font-size: 11px;
  color: #8b92a3;
  margin-bottom: 6px;
  text-transform: uppercase;
  font-weight: 600;
}
.cost-compare .cost-bad .cost-amount {
  font-size: 28px;
  font-weight: 900;
  color: #ef4444;
}
.cost-compare .cost-good .cost-amount {
  font-size: 28px;
  font-weight: 900;
  color: #4ade80;
}
.cost-compare .cost-detail {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* Feature Comparison Table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13px;
}
.compare-table th {
  background: rgba(212, 175, 55, 0.1);
  color: #d4af37;
  padding: 10px 12px;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}
.compare-table th:first-child {
  text-align: left;
  color: #cbd5e1;
}
.compare-table td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}
.compare-table td:first-child {
  text-align: left;
  color: #cbd5e1;
  font-weight: 500;
}
.compare-table .check { color: #d4af37; font-weight: 700; }
.compare-table .cross { color: #475569; }
.compare-table tr:hover {
  background: rgba(212, 175, 55, 0.03);
}

@media (max-width: 768px) {
  .sticky-cta-bar { padding: 10px 16px; }
  .sticky-cta-bar .cta-btn { padding: 10px 24px; font-size: 14px; }
  .social-proof-toast { bottom: 70px; left: 12px; right: 12px; max-width: none; font-size: 12px; }
  .step-progress { gap: 0; padding: 12px 8px; }
  .step-progress .step-line { width: 24px; }
  .step-progress .step { font-size: 11px; }
  .cost-compare { grid-template-columns: 1fr; }
  .compare-table { font-size: 12px; }
  .compare-table th, .compare-table td { padding: 8px 6px; }
}
