/* ============================================
   星诚供需平台 — 设计系统 CSS
   Design: Modern Professional · B2B Industry Platform
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== Design Tokens ===== */
:root {
  /* Primary — 深海蓝, B2B信任感 */
  --primary:       #0f172a;
  --primary-light: #1e293b;
  --primary-mid:   #334155;

  /* Accent — 暖琥珀+活力橙 */
  --accent:        #f97316;
  --accent-light:  #fff7ed;
  --accent-hover:  #ea580c;
  --accent-glow:   rgba(249, 115, 22, 0.15);

  /* Semantic */
  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #3b82f6;

  /* Backgrounds */
  --bg:          #f8fafc;
  --bg-alt:      #f1f5f9;
  --bg-card:     #ffffff;
  --bg-hero:     linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);

  /* Text */
  --text:         #0f172a;
  --text-secondary: #475569;
  --text-muted:   #94a3b8;
  --text-inverse: #ffffff;

  /* Borders */
  --border:       #e2e8f0;
  --border-light: #f1f5f9;

  /* Shadows */
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg:    0 8px 30px rgba(0,0,0,0.08);
  --shadow-xl:    0 16px 48px rgba(0,0,0,0.10);
  --shadow-glow-accent: 0 4px 20px var(--accent-glow);

  /* Radius */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Layout */
  --max-w: 1200px;
  --header-h: 68px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.25s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }
svg { display: block; }

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
h1 { font-size: 2rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

/* ===== Container ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ===== Section ===== */
.section {
  padding: var(--space-2xl) 0;
}
.section + .section {
  border-top: 1px solid var(--border);
}

/* ===== Glass Effect ===== */
.glass {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--duration) var(--ease);
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
  transform: translateY(-2px);
}
.card-hover-accent:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow-accent);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  border: none;
  line-height: 1.4;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow-accent);
  transform: translateY(-1px);
  color: #fff;
}
.btn-secondary {
  background: var(--bg-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border);
  color: var(--text);
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--text);
}
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 15px; }

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}
.badge-accent {
  background: var(--accent);
  color: #fff;
}
.badge-gray {
  background: #e2e8f0;
  color: var(--text-secondary);
}
.badge-green {
  background: #d1fae5;
  color: #065f46;
}
.badge-blue {
  background: #dbeafe;
  color: #1e40af;
}
.badge-orange {
  background: #fed7aa;
  color: #9a3412;
}

/* ===== Tags ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f5f9;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
  cursor: pointer;
}
.tag:hover {
  background: var(--accent);
  color: #fff;
}

/* ===== Inputs ===== */
.input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  background: var(--bg-card);
  color: var(--text);
  transition: all var(--duration) var(--ease);
  outline: none;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input::placeholder {
  color: var(--text-muted);
}
textarea.input {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}

/* ===== Section Header ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.section-header .title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.section-header .title .sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}
.section-header .more {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.section-header .more:hover {
  gap: 8px;
}

/* ===== Loading Skeleton ===== */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.fade-in {
  animation: fadeIn 0.4s var(--ease);
}
.slide-up {
  animation: slideUp 0.5s var(--ease-bounce);
}
.scale-in {
  animation: scaleIn 0.3s var(--ease);
}

/* ===== Grid Helpers ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: fadeIn 0.2s var(--ease);
}
.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--space-xl);
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s var(--ease-bounce);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}
.modal-head h2 {
  font-size: 1.125rem;
  color: var(--primary);
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
}
.modal-close:hover {
  background: var(--bg-alt);
  color: var(--text);
}

/* ===== CTA Bar ===== */
.cta-bar {
  background: var(--bg-hero);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
}
.cta-bar::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(249,115,22,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.cta-bar h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-inverse);
}
.cta-bar p {
  font-size: 14px;
  opacity: 0.75;
  margin-bottom: var(--space-lg);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .container { padding: 0 var(--space-md); }
  .section { padding: var(--space-xl) 0; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .cta-bar { padding: var(--space-xl) var(--space-md); }
}
@media (max-width: 480px) {
  h1 { font-size: 1.25rem; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== Selection ===== */
::selection {
  background: var(--accent);
  color: #fff;
}
