/* ============================================
   NingXiaoBan Tech v2 — Stylesheet
   Design: Minimal, dark-on-light, Vercel-inspired
   ============================================ */

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

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #fafafa;
  --color-bg-dark: #0a0a0a;
  --color-text: #171717;
  --color-text-secondary: #525252;
  --color-text-muted: #737373;
  --color-text-tertiary: #a3a3a3;
  --color-border: #e5e5e5;
  --color-border-light: #f0f0f0;
  --color-accent: #0a0a0a;
  --color-accent-hover: #333333;
  --color-success: #16a34a;
  --color-focus: #3b82f6;
  --color-electric: #00D4FF;
  --color-purple-glow: rgba(100, 60, 220, 0.6);

  --gradient-text: linear-gradient(135deg, #0a0a0a 0%, #4d4d4d 50%, #0a0a0a 100%);

  --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

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

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  --container-max: 1200px;
  --nav-height: 72px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-bg);
  background-image: radial-gradient(circle, #e5e5e5 1px, transparent 1px);
  background-size: 24px 24px;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-dark {
  background: #6B3FE2;
  color: #fff;
  border-color: #6B3FE2;
}

.btn-dark:hover {
  background: #5a2fc0;
  border-color: #5a2fc0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107, 63, 226, 0.3);
}

.btn-outline {
  background: transparent;
  color: #6B3FE2;
  border-color: #6B3FE2;
}

.btn-outline:hover {
  border-color: #6B3FE2;
  background: #6B3FE2;
  color: #fff;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: all var(--transition-base);
}

.nav.scrolled {
  background: rgba(0,0,0,0.85);
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: all var(--transition-base);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(var(--nav-height) + 40px) var(--space-lg) var(--space-3xl);
  overflow: hidden;
  background: linear-gradient(135deg, #050216 0%, #0a0a2e 20%, #120840 40%, #1a0e55 60%, #251570 80%, #301a88 100%);
  color: #ffffff;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero-orb-1 {
  width: 400px;
  height: 400px;
  background: #6B3FE2;
  top: -100px;
  right: -100px;
  opacity: 0.3;
  animation: orb-float 8s ease-in-out infinite;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: #00D4FF;
  bottom: -50px;
  left: -50px;
  animation-delay: -3s;
  opacity: 0.2;
}

.hero-orb-3 {
  width: 200px;
  height: 200px;
  background: #A855F7;
  top: 40%;
  left: 20%;
  animation-delay: -5s;
  opacity: 0.15;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(100, 60, 220, 0.2);
  border: 1px solid rgba(100, 60, 220, 0.4);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: #c4b5fd;
  margin-bottom: var(--space-xl);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #a78bfa;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--space-lg);
  color: #ffffff;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-3xl);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: var(--space-3xl);
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 36px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #ffffff;
}

.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

.glow-line {
  width: 60%;
  max-width: 600px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 60, 220, 0.5), transparent);
  margin-top: var(--space-3xl);
  position: relative;
  z-index: 1;
}

/* Grid overlay on hero */
.hero::before {
  content: '';
  position: absolute;
  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: 60px 60px;
  pointer-events: none;
  z-index: 1;
}

/* --- Sections --- */
.section {
  padding: var(--space-4xl) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6B3FE2;
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.section-desc {
  font-size: 16px;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-blog {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* --- Service Cards --- */
.service-card {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  background: #fff;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  border-color: rgba(100, 60, 220, 0.2);
}

.service-card-img {
  height: 180px;
  overflow: hidden;
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.service-card:hover .service-card-img img {
  transform: scale(1.05);
}

.service-card-body {
  padding: var(--space-lg);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.card-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.card-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-list li {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
}

/* --- Cases --- */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.case-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.case-thumb {
  height: 200px;
  overflow: hidden;
}

.case-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.case-card:hover .case-thumb img {
  transform: scale(1.05);
}

.case-info {
  padding: var(--space-lg);
}

.case-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(100, 60, 220, 0.06);
  border: 1px solid rgba(100, 60, 220, 0.15);
  color: #6B3FE2;
  font-family: var(--font-mono);
  margin-bottom: 10px;
}

.case-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.case-info p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* --- Blog Cards --- */
.blog-card {
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: rgba(100, 60, 220, 0.3);
  box-shadow: 0 8px 32px rgba(100, 60, 220, 0.1);
  transform: translateY(-4px);
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.blog-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(100, 60, 220, 0.06);
  border: 1px solid rgba(100, 60, 220, 0.15);
  color: #6B3FE2;
  font-family: var(--font-mono);
}

.blog-meta time {
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-family: var(--font-mono);
}

.blog-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

.blog-excerpt {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: var(--space-md);
}

.blog-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.blog-link:hover {
  color: #3b82f6;
}

.center-btn {
  text-align: center;
  margin-top: var(--space-2xl);
}

/* --- Blog List Page Layout --- */
.blog-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.blog-page-header {
  text-align: center;
  margin-bottom: 48px;
}

.blog-page-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 12px 0 16px;
}

.blog-page-desc {
  color: var(--color-text-secondary);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.blog-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.blog-main {
  flex: 1;
  min-width: 0;
}

.blog-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
}

/* Blog Post Card (list item) */
.blog-post-card {
  display: flex;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  transition: all var(--transition-base);
}

.blog-post-card:hover {
  border-color: rgba(100, 60, 220, 0.3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.blog-post-thumb {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.blog-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-post-body {
  flex: 1;
  min-width: 0;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.blog-post-meta time {
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-family: var(--font-mono);
}

.blog-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(100, 60, 220, 0.06);
  border: 1px solid rgba(100, 60, 220, 0.15);
  color: #6B3FE2;
  font-family: var(--font-mono);
}

.blog-post-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 8px;
}

.blog-post-title a {
  color: var(--color-text);
  text-decoration: none;
}

.blog-post-title a:hover {
  color: #6B3FE2;
}

.blog-post-excerpt {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Sidebar blocks */
.sidebar-block {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--color-text);
}

.sidebar-list, .sidebar-hot, .sidebar-ai-models {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li, .sidebar-hot li {
  margin-bottom: 10px;
}

.sidebar-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.sidebar-link:hover, .sidebar-link.active-cat {
  color: #6B3FE2;
}

.cat-count {
  background: #f0f0f0;
  color: #525252;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
}

.related-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.related-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-title {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.5;
  text-decoration: none;
  display: block;
}

.related-title:hover {
  color: #6B3FE2;
}

.related-date {
  font-size: 11px;
  color: var(--color-text-tertiary);
  margin-top: 2px;
}

/* AI Model links */
.ai-model-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.ai-model-link:hover {
  color: var(--color-text);
}

.ai-model-icon {
  font-size: 16px;
}

.ai-model-name {
  flex: 1;
}

.ai-model-arrow {
  font-size: 11px;
  opacity: 0.5;
}

/* CTA block */
.sidebar-cta {
  background: linear-gradient(135deg, #f8f7ff 0%, #fff 100%);
  border: 1px solid rgba(100, 60, 220, 0.12);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.cta-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 16px;
}

.cta-contact {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.2s;
  flex: 1;
  justify-content: center;
}

.cta-btn:hover {
  border-color: #6B3FE2;
  color: #6B3FE2;
}

.cta-qrcode {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

/* Pagination */
.blog-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.page-current {
  background: #6B3FE2;
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.page-link {
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.page-link:hover {
  border-color: #6B3FE2;
  color: #6B3FE2;
}

.page-next {
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .blog-layout {
    flex-direction: column;
  }
  .blog-sidebar {
    width: 100%;
    position: static;
  }
  .blog-post-card {
    flex-direction: column;
  }
  .blog-post-thumb {
    width: 100%;
    height: 160px;
  }
}

/* --- Article Detail Page Layout --- */
.article-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 40px) 20px var(--space-3xl);
}

.article-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.article-content {
  flex: 1;
  min-width: 0;
}

.article-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #737373;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.article-back:hover {
  color: #0a0a0a;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-tag {
  background: #f0f0f0;
  color: #525252;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.article-date {
  color: #a3a3a3;
  font-size: 13px;
}

.article-content h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 24px;
  color: #171717;
}

.article-content .article-body {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

.article-content .article-body h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
  color: #171717;
}

.article-content .article-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
  color: #171717;
}

.article-content .article-body p {
  margin-bottom: 16px;
}

.article-content .article-body ul,
.article-content .article-body ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-content .article-body li {
  margin-bottom: 8px;
}

.article-content .article-body blockquote {
  border-left: 3px solid #e5e5e5;
  padding-left: 16px;
  margin: 20px 0;
  color: #525252;
  font-style: italic;
}

.article-content .article-body code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}

.article-content .article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.article-content .article-body th,
.article-content .article-body td {
  border: 1px solid #e5e5e5;
  padding: 10px 14px;
  text-align: left;
}

.article-content .article-body th {
  background: #fafafa;
  font-weight: 600;
}

/* Prev/Next navigation */
.article-nav-links {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.article-nav-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.article-nav-links a:hover {
  color: #6B3FE2;
}

/* Responsive */
@media (max-width: 768px) {
  .article-layout {
    flex-direction: column;
  }
  .article-sidebar {
    width: 100%;
    position: static;
  }
}

/* --- Tools --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.tool-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  border-color: rgba(100, 60, 220, 0.2);
}

.tool-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
}

.tool-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.tool-card p {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

/* --- Contact --- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

/* --- Tools Page Layout --- */
.tools-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 40px) 20px var(--space-3xl);
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.tools-main {
  flex: 1;
  min-width: 0;
}

.page-header {
  margin-bottom: var(--space-3xl);
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.page-desc {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.tools-category {
  margin-bottom: var(--space-3xl);
}

.category-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--color-accent);
}

.category-icon {
  font-size: 24px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.tool-link {
  font-size: 14px;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

.tools-sidebar {
  width: 320px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
}

.sidebar-block {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border-light);
}

.sidebar-subtitle {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

/* GitHub Trending Items */
.github-trending-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.github-trending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  font-size: 13px;
}

.github-trending-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #667eea, #764ba2);
  border-radius: 0 2px 2px 0;
}

.github-trending-item:hover {
  border-color: rgba(100, 60, 220, 0.3);
  background: rgba(100, 60, 220, 0.05);
  transform: translateX(2px);
}

.github-trending-rank {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-accent);
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.github-trending-rank.top3 {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.github-trending-info {
  flex: 1;
  min-width: 0;
}

.github-trending-repo {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.github-trending-lang {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(100, 60, 220, 0.1);
  color: var(--color-accent);
  font-weight: 500;
  margin-left: 6px;
}

.github-trending-desc {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.github-trending-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 11px;
}

.github-trending-stat {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--color-text-secondary);
}

.github-trending-stat svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  opacity: 0.7;
}

.github-trending-stat.stars svg {
  color: #f0c040;
}

.github-trending-arrow {
  font-size: 14px;
  color: var(--color-accent);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.github-trending-item:hover .github-trending-arrow {
  opacity: 0.6;
  transform: translateX(2px);
}

.github-loading {
  text-align: center;
  padding: var(--space-xl);
  color: var(--color-text-muted);
  font-size: 13px;
}

/* AI Models Sidebar */
.sidebar-ai-models {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ai-model-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  font-size: 13px;
  transition: all var(--transition-fast);
}

.ai-model-link:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

.ai-model-icon {
  font-size: 14px;
}

.ai-model-name {
  flex: 1;
}

.ai-model-arrow {
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}

.ai-model-link:hover .ai-model-arrow {
  opacity: 0.6;
}

/* Sidebar Contact */
.sidebar-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-contact-link {
  display: block;
  padding: 8px 12px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  font-size: 13px;
  transition: all var(--transition-fast);
  text-align: center;
}

.sidebar-contact-link:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* --- Contact --- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.contact-info .section-tag {
  display: inline-block;
  margin-bottom: 12px;
}

.contact-info .section-title {
  text-align: left;
  font-size: 32px;
  margin-bottom: var(--space-md);
}

.contact-text {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-method {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.contact-method-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.contact-method strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.contact-method a {
  font-size: 14px;
  color: var(--color-focus);
}

.contact-method a:hover {
  text-decoration: underline;
}

.contact-form {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-primary);
  transition: border-color var(--transition-fast);
  outline: none;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
}

.form-feedback {
  margin-top: var(--space-md);
  font-size: 13px;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-md);
}

.form-feedback.success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.form-feedback.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.about-content .section-tag {
  display: inline-block;
  margin-bottom: 12px;
}

.about-content .section-title {
  text-align: left;
  font-size: 32px;
  margin-bottom: var(--space-md);
}

.about-text {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.about-feature {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  font-weight: 500;
}

.about-feature-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  border-radius: 50%;
  font-size: 12px;
  flex-shrink: 0;
}

.code-block {
  background: var(--color-bg-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #1a1a1a;
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}

.code-dot:nth-child(2) {
  background: #febc2e;
}

.code-dot:nth-child(3) {
  background: #28c840;
}

.code-title {
  font-size: 12px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  margin-left: 8px;
}

.code-body {
  padding: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: #d4d4d4;
  overflow-x: auto;
}

.code-keyword { color: #569cd6; }
.code-class { color: #4ec9b0; }
.code-func { color: #dcdcaa; }
.code-str { color: #ce9178; }

/* --- FAQ --- */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-primary);
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
}

.faq-question:hover {
  color: #6B3FE2;
}

.faq-icon {
  font-size: 20px;
  font-weight: 300;
  transition: transform var(--transition-base);
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.faq-answer.open {
  max-height: 300px;
}

.faq-answer p {
  padding-bottom: var(--space-lg);
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* --- Footer --- */
.footer {
  background: var(--color-bg-dark);
  color: #d4d4d4;
  padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-logo img {
  height: 32px;
  margin-bottom: var(--space-md);
}

.footer-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.footer-links h4 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: var(--space-md);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 13px;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #262626;
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .grid-3,
  .cases-grid {
    grid-template-columns: 1fr;
  }

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

  .contact-wrapper,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: var(--space-xl);
  }

  .about-features {
    grid-template-columns: 1fr;
  }

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

  .hero-title {
    font-size: 32px;
  }
}
