/* ===== 全局样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #eef1f6;
  color: #0f172a;
  line-height: 1.6;
}

/* ===== 搜索页 ===== */
.search-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
}

/* 背景装饰 */
.bg-decoration {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}
.orb-1 {
  width: 400px; height: 400px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  top: -100px; left: -100px;
}
.orb-2 {
  width: 350px; height: 350px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  bottom: -80px; right: -80px;
  animation-delay: -7s;
}
.orb-3 {
  width: 300px; height: 300px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

.search-container {
  width: 100%;
  max-width: 820px;
  padding: 48px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* 品牌区域 */
.brand-area { margin-bottom: 40px; }
.brand-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(245,158,11,0.1));
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(251,191,36,0.15);
}
.brand-logo svg { width: 40px; height: 40px; }
.search-title {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.search-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* 搜索框 */
.search-box-wrapper {
  position: relative;
  margin-bottom: 28px;
  z-index: 50;
}
.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 18px;
  padding: 6px 6px 6px 20px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.search-box:focus-within {
  border-color: rgba(251,191,36,0.5);
  box-shadow: 0 8px 40px rgba(251,191,36,0.15), 0 0 0 3px rgba(251,191,36,0.1);
  background: rgba(255,255,255,0.1);
}
.search-icon {
  color: rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  margin-right: 12px;
  flex-shrink: 0;
}
.search-icon svg { width: 20px; height: 20px; }
.search-box input {
  flex: 1;
  padding: 14px 0;
  border: none;
  font-size: 16px;
  outline: none;
  background: transparent;
  color: #fff;
  min-width: 0;
}
.search-box input::placeholder { color: rgba(255,255,255,0.35); }
.search-box button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.search-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}
.search-box button:active { transform: translateY(0); }
.search-box button svg { width: 18px; height: 18px; }

/* 搜索联想 */
.suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(30,41,59,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  display: none;
  z-index: 100;
  max-height: 320px;
  overflow-y: auto;
}
.suggestions.show { display: block; animation: slideDown 0.2s ease; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.suggestion-item {
  padding: 14px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: rgba(255,255,255,0.08); }
.suggestion-name { font-weight: 600; font-size: 15px; color: #fff; }
.suggestion-code { color: rgba(255,255,255,0.4); font-size: 13px; font-family: monospace; }

/* 快捷标签 */
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  align-items: center;
}
.tag-label { color: rgba(255,255,255,0.4); font-size: 13px; }
.quick-tag {
  padding: 6px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.quick-tag:hover {
  background: rgba(251,191,36,0.15);
  border-color: rgba(251,191,36,0.3);
  color: #fbbf24;
}

/* 数据统计栏 */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 36px 0;
  padding: 20px 32px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
}
.stat-item { flex: 1; text-align: center; }
.stat-value {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.stat-label { font-size: 12px; color: rgba(255,255,255,0.5); }
.stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  margin: 0 8px;
}

/* 特性卡片 */
.search-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}
.feature-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 28px 20px;
  color: #fff;
  text-align: left;
  transition: all 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 24px; height: 24px; }
.icon-1 { background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(16,185,129,0.1)); color: #4ade80; }
.icon-2 { background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(99,102,241,0.1)); color: #60a5fa; }
.icon-3 { background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(245,158,11,0.1)); color: #fbbf24; }
.feature-card h3 { font-size: 16px; margin-bottom: 10px; font-weight: 700; }
.feature-card p { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.7; }

/* 页脚 */
.search-footer {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.search-footer p {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 6px;
}
.search-footer .disclaimer {
  color: rgba(255,255,255,0.25);
  font-size: 11px;
}

/* 入场动画 */
.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 报告页 ===== */
.report-page {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
.report-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}
.report-page .report-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
  animation: float 25s ease-in-out infinite;
}
.report-page .orb-a {
  width: 500px; height: 500px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  top: -150px; right: -100px;
}
.report-page .orb-b {
  width: 400px; height: 400px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  bottom: -100px; left: -80px;
  animation-delay: -10s;
}

.loading-screen, .error-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}
.loading-screen::before, .error-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(59,130,246,0.15), transparent 50%),
              radial-gradient(circle at 70% 70%, rgba(245,158,11,0.12), transparent 50%);
}
.loading-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
}
.loading-content, .error-content {
  text-align: center;
  color: #fff;
  padding: 48px 40px;
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  max-width: 440px;
  animation: fadeInUp 0.6s ease;
}
.loading-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid rgba(251,191,36,0.15);
  border-top-color: #fbbf24;
  border-right-color: #f59e0b;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 28px;
  box-shadow: 0 0 30px rgba(251,191,36,0.2);
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-content h2, .error-content h2 {
  font-size: 22px;
  margin-bottom: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.loading-content p, .error-content p {
  color: rgba(255,255,255,0.55);
  margin-bottom: 24px;
  font-size: 13.5px;
  line-height: 1.7;
}
.loading-steps {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}
.loading-step {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: all 0.3s;
}
.loading-step.active {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 10px rgba(251,191,36,0.5);
  transform: scale(1.3);
}
.progress-bar {
  width: 100%;
  max-width: 320px;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  margin: 0 auto 12px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.progress-text { font-size: 12px; color: rgba(255,255,255,0.4); font-weight: 600; }
.error-icon {
  font-size: 56px;
  margin-bottom: 16px;
  animation: shake 0.5s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
.error-content button {
  padding: 12px 28px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin: 0 6px;
  transition: all 0.2s;
}
.error-content button:first-of-type {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 4px 16px rgba(245,158,11,0.3);
}
.error-content button:first-of-type:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}
.error-content .retry-btn {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.12);
}
.error-content .retry-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}
.report-container {
  width: 100%;
  position: relative;
  z-index: 1;
  padding: 16px 0;
}
.report-iframe {
  width: 100%;
  min-height: 600px;
  border: none;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  background: #fff;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .search-page { align-items: flex-start; padding: 20px 0; }
  .search-container { padding: 24px 16px; max-width: 100%; }
  .brand-area { margin-bottom: 28px; }
  .brand-logo { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 16px; }
  .brand-logo svg { width: 32px; height: 32px; }
  .search-title { font-size: 32px; letter-spacing: 2px; margin-bottom: 10px; }
  .search-subtitle { font-size: 13px; line-height: 1.6; }
  .search-box { padding: 5px 5px 5px 14px; border-radius: 14px; }
  .search-icon { margin-right: 8px; }
  .search-icon svg { width: 18px; height: 18px; }
  .search-box input { padding: 12px 0; font-size: 14px; }
  .search-box button { padding: 10px 16px; font-size: 14px; border-radius: 10px; gap: 6px; }
  .search-box button svg { width: 16px; height: 16px; }
  .search-box button span { display: none; }
  .quick-tags { margin-top: 12px; gap: 6px; }
  .quick-tag { padding: 5px 12px; font-size: 12px; }
  .tag-label { font-size: 12px; }
  .stats-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 20px;
    margin: 28px 0;
  }
  .stat-divider { display: none; }
  .stat-value { font-size: 24px; }
  .stat-label { font-size: 11px; }
  .search-features { grid-template-columns: 1fr; gap: 12px; margin-bottom: 28px; }
  .feature-card { padding: 20px 16px; border-radius: 14px; }
  .feature-icon { width: 42px; height: 42px; border-radius: 10px; margin-bottom: 12px; }
  .feature-icon svg { width: 20px; height: 20px; }
  .feature-card h3 { font-size: 15px; margin-bottom: 8px; }
  .feature-card p { font-size: 12px; line-height: 1.6; }
  .search-footer { padding-top: 20px; }
  .search-footer p { font-size: 11px; }
  .search-footer .disclaimer { font-size: 10px; }
  .suggestion-item { padding: 12px 16px; }
  .suggestion-name { font-size: 14px; }
  .suggestion-code { font-size: 12px; }
  .progress-bar { width: 240px; }
}

@media (max-width: 380px) {
  .search-title { font-size: 28px; }
  .stats-bar { gap: 12px; padding: 16px; }
  .stat-value { font-size: 22px; }
}
