/* WEEX 华语渠道懒人包 - 检索网站样式 */

:root {
  --bg-primary: #0a0a0a;
  --bg-surface: #111111;
  --bg-elevated: #181818;
  --border: #2a2a2a;
  --border-hover: #3a3a3a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #6a6a6a;
  --accent: #f5c518;
  --accent-hover: #e6b800;
  --accent-text: #0a0a0a;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* Background grid pattern */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 197, 24, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 197, 24, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  top: 20%;
  right: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100dvh;
}

/* Sidebar */
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: sticky;
  top: 0;
  height: 100dvh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 10px;
  color: var(--accent-text);
  font-weight: 700;
  font-size: 14px;
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-text span {
  font-size: 12px;
  color: var(--text-secondary);
  display: block;
  margin-top: -2px;
}

.status-section h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: var(--transition);
}

.status-item:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.status-number {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  padding-top: 2px;
  min-width: 18px;
}

.status-content h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.status-content p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.status-count {
  margin-left: auto;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-note {
  margin-top: auto;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(245, 197, 24, 0.06);
  border: 1px solid rgba(245, 197, 24, 0.12);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Main content */
.main {
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.hero {
  max-width: 720px;
  margin-bottom: 48px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero h2 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero h2 .accent {
  color: var(--accent);
}

.hero p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

/* Search section */
.search-section {
  margin-bottom: 40px;
}

.search-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.search-label h3 {
  font-size: 14px;
  font-weight: 600;
}

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

/* 数据源同步状态 */
.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.sync-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.sync-badge.live {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.sync-badge.live::before {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.sync-badge.static {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.sync-badge.static::before {
  background: var(--text-muted);
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.refresh-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.refresh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.search-box {
  display: flex;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.1);
}

.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  color: var(--accent);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  padding: 0 8px;
}

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

.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  height: 48px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.search-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.search-btn:active {
  transform: scale(0.98);
}

/* Category filter */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.category-chip {
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.category-chip:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.category-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

/* Results */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.results-header h3 {
  font-size: 14px;
  font-weight: 600;
}

.results-count {
  font-size: 13px;
  color: var(--text-secondary);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.result-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.result-type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.result-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.result-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
}

.result-card h4 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.result-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.result-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.result-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(245, 197, 24, 0.4);
  background: rgba(245, 197, 24, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.result-download:hover {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.result-download:active {
  transform: scale(0.96);
}

.result-action {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-weight: 600;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.empty-state h4 {
  font-size: 18px;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Footer */
.footer {
  margin-top: auto;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer p {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

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

/* Feedback button */
.feedback-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
  transition: var(--transition);
}

.feedback-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Mobile sidebar toggle */
.mobile-header {
  display: none;
  padding: 16px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .mobile-header {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 99;
  }

  .sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    padding: 32px 24px;
  }

  .hero h2 {
    font-size: 36px;
  }

  .search-box {
    flex-direction: column;
  }

  .search-icon {
    display: none;
  }

  .search-btn {
    justify-content: center;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
