/* ============================================
   安芯颐设计系统 - Design System CSS
   从 TRAE SOLO CN 设计文件提取
   ============================================ */

:root {
  --anxi-background: #ffffff;
  --anxi-foreground: #0f172a;
  --anxi-card: #ffffff;
  --anxi-card-foreground: #0f172a;
  --anxi-popover: #ffffff;
  --anxi-popover-foreground: #0f172a;
  --anxi-primary: #2563eb;
  --anxi-primary-foreground: #ffffff;
  --anxi-muted: #f1f5f9;
  --anxi-muted-foreground: #64748b;
  --anxi-border: rgba(15, 23, 42, 0.08);
  --anxi-input: rgba(15, 23, 42, 0.06);
  --anxi-ring: rgba(37, 99, 235, 0.25);
  --anxi-radius-small: 8px;
  --anxi-radius-medium: 12px;
  --anxi-radius-large: 16px;
  --anxi-radius-full: 9999px;

  /* Neutral scale */
  --anxi-white: #ffffff;
  --anxi-gray-50: #f8fafc;
  --anxi-gray-100: #f1f5f9;
  --anxi-gray-200: #e2e8f0;
  --anxi-gray-300: #94a3b8;
  --anxi-gray-400: #64748b;
  --anxi-gray-500: #475569;
  --anxi-gray-900: #0f172a;

  /* Primary blue scale */
  --anxi-blue-50: #eff6ff;
  --anxi-blue-100: #dbeafe;
  --anxi-blue-400: #60a5fa;
  --anxi-blue-500: #2563eb;
  --anxi-blue-600: #1d4ed8;
  --anxi-blue-900: #1e3a8a;

  /* Product line colors */
  --anxi-plc: #f59e0b;
  --anxi-uwb: #10b981;
  --anxi-safety: #f43f5e;
  --anxi-ai: #8b5cf6;

  /* Semantic state colors */
  --state-success: #10b981;
  --state-success-bg: rgba(16, 185, 129, 0.08);
  --state-warning: #f59e0b;
  --state-warning-bg: rgba(245, 158, 11, 0.08);
  --state-error: #f43f5e;
  --state-error-bg: rgba(244, 63, 94, 0.08);
  --state-info: #2563eb;
  --state-info-bg: rgba(37, 99, 235, 0.08);

  /* Extended translucent & surface tokens */
  --anxi-dark-surface: #0f172a;
  --anxi-frost-bg: rgba(255, 255, 255, 0.78);
  --anxi-white-5: rgba(255, 255, 255, 0.05);
  --anxi-white-8: rgba(255, 255, 255, 0.08);
  --anxi-white-12: rgba(255, 255, 255, 0.12);
  --anxi-white-20: rgba(255, 255, 255, 0.20);
  --anxi-white-25: rgba(255, 255, 255, 0.25);
  --anxi-white-40: rgba(255, 255, 255, 0.40);
  --anxi-white-70: rgba(255, 255, 255, 0.70);
  --anxi-white-80: rgba(255, 255, 255, 0.80);
  --anxi-white-85: rgba(255, 255, 255, 0.85);
  --anxi-black-6: rgba(0, 0, 0, 0.06);
  --anxi-black-8: rgba(0, 0, 0, 0.08);
  --anxi-black-10: rgba(0, 0, 0, 0.10);
  --anxi-primary-10: rgba(37, 99, 235, 0.10);
  --anxi-primary-30: rgba(37, 99, 235, 0.30);
  --anxi-uwb-10: rgba(16, 185, 129, 0.10);
  --anxi-uwb-50: #ecfdf5;
  --anxi-uwb-100: #d1fae5;
  --anxi-uwb-400: #34d399;
  --anxi-plc-10: rgba(245, 158, 11, 0.10);
  --anxi-plc-12: rgba(245, 158, 11, 0.12);
  --anxi-plc-15: rgba(245, 158, 11, 0.15);
  --anxi-plc-16: rgba(245, 158, 11, 0.16);
  --anxi-plc-20: rgba(245, 158, 11, 0.20);
  --anxi-plc-50: #fffbeb;
  --anxi-plc-bg: #fef6e9;
  --anxi-plc-100: #fef3c7;
  --anxi-safety-10: rgba(244, 63, 94, 0.10);
  --anxi-ai-10: rgba(139, 92, 246, 0.10);
  --anxi-cool-gray: #f8fafc;
  --anxi-gray-350: #94a3b8;

  /* Typography */
  --anxi-font-sans: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --anxi-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
}

/* Tailwind theme mapping */
@theme inline {
  --color-background: var(--anxi-background);
  --color-foreground: var(--anxi-foreground);
  --color-card: var(--anxi-card);
  --color-card-foreground: var(--anxi-card-foreground);
  --color-popover: var(--anxi-popover);
  --color-popover-foreground: var(--anxi-popover-foreground);
  --color-primary: var(--anxi-primary);
  --color-primary-foreground: var(--anxi-primary-foreground);
  --color-muted: var(--anxi-muted);
  --color-muted-foreground: var(--anxi-muted-foreground);
  --color-border: var(--anxi-border);
  --color-input: var(--anxi-input);
  --color-ring: var(--anxi-ring);
  --radius-sm: var(--anxi-radius-small);
  --radius-md: var(--anxi-radius-medium);
  --radius-lg: var(--anxi-radius-large);
  --radius-full: var(--anxi-radius-full);
}

/* Reset */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--anxi-font-sans);
  color: var(--anxi-foreground);
  background: var(--anxi-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* Utility classes */
.anxi-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.anxi-section {
  padding-top: 96px;
  padding-bottom: 96px;
}

.anxi-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 18px;
  border-radius: var(--anxi-radius-full);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.anxi-pill-primary {
  background: var(--anxi-primary);
  color: var(--anxi-primary-foreground);
}
.anxi-pill-primary:hover { background: var(--anxi-blue-600); }

.anxi-pill-outline {
  background: transparent;
  color: var(--anxi-foreground);
  border: 0.5px solid var(--anxi-border);
}
.anxi-pill-outline:hover { background: var(--anxi-gray-50); }

.anxi-card {
  background: var(--anxi-card);
  border-radius: var(--anxi-radius-large);
  border: 0.5px solid var(--anxi-border);
}

.anxi-frost {
  background: var(--anxi-frost-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.anxi-text-gradient {
  background: linear-gradient(135deg, var(--anxi-blue-500), var(--anxi-blue-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Semantic token fallbacks */
.bg-background { background-color: var(--anxi-background); }
.text-background { color: var(--anxi-background); }
.bg-foreground { background-color: var(--anxi-foreground); }
.text-foreground { color: var(--anxi-foreground); }
.bg-card { background-color: var(--anxi-card); }
.text-card-foreground { color: var(--anxi-card-foreground); }
.bg-popover { background-color: var(--anxi-popover); }
.bg-primary { background-color: var(--anxi-primary); }
.text-primary { color: var(--anxi-primary); }
.border-primary { border-color: var(--anxi-primary); }
.bg-primary-foreground { background-color: var(--anxi-primary-foreground); }
.text-primary-foreground { color: var(--anxi-primary-foreground); }
.bg-muted { background-color: var(--anxi-muted); }
.text-muted-foreground { color: var(--anxi-muted-foreground); }
.border-border { border-color: var(--anxi-border); }
.bg-input { background-color: var(--anxi-input); }

/* Misc */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--anxi-radius-full);
  font-size: 12px;
  font-weight: 500;
}
.status-badge.success {
  background: var(--state-success-bg);
  color: var(--state-success);
}
.status-badge.warning {
  background: var(--state-warning-bg);
  color: var(--state-warning);
}
.tag-new {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--anxi-plc);
  color: var(--anxi-white);
}

/* Floating contact button */
.floating-contact {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 56px;
  height: 56px;
  border-radius: var(--anxi-radius-full);
  background: var(--anxi-primary);
  color: var(--anxi-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}
.floating-contact:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(37, 99, 235, 0.4);
}

/* Form elements */
.anxi-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--anxi-radius-medium);
  border: 0.5px solid var(--anxi-border);
  background: var(--anxi-gray-50);
  color: var(--anxi-foreground);
  font-size: 15px;
  font-family: var(--anxi-font-sans);
  transition: all 0.2s ease;
  outline: none;
}
.anxi-input:focus {
  border-color: var(--anxi-primary);
  background: var(--anxi-white);
  box-shadow: 0 0 0 3px var(--anxi-ring);
}
.anxi-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 16px;
  border-radius: var(--anxi-radius-medium);
  border: 0.5px solid var(--anxi-border);
  background: var(--anxi-gray-50);
  color: var(--anxi-foreground);
  font-size: 15px;
  font-family: var(--anxi-font-sans);
  transition: all 0.2s ease;
  outline: none;
  resize: vertical;
}
.anxi-textarea:focus {
  border-color: var(--anxi-primary);
  background: var(--anxi-white);
  box-shadow: 0 0 0 3px var(--anxi-ring);
}
.anxi-select {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--anxi-radius-medium);
  border: 0.5px solid var(--anxi-border);
  background: var(--anxi-gray-50);
  color: var(--anxi-foreground);
  font-size: 15px;
  font-family: var(--anxi-font-sans);
  transition: all 0.2s ease;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.anxi-select:focus {
  border-color: var(--anxi-primary);
  background: var(--anxi-white);
  box-shadow: 0 0 0 3px var(--anxi-ring);
}

/* Toast */
.anxi-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 12px 24px;
  border-radius: var(--anxi-radius-medium);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.anxi-toast.show {
  opacity: 1;
  pointer-events: auto;
}
.anxi-toast.success {
  background: var(--state-success);
  color: var(--anxi-white);
}
.anxi-toast.error {
  background: var(--state-error);
  color: var(--anxi-white);
}

/* Responsive */
@media (max-width: 768px) {
  .anxi-container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .anxi-section {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}
