/* ============================================
   Apple 设计风格 CSS 系统
   基于 Apple DESIGN.md 规范
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* Primary Colors */
  --pure-black: #000000;
  --light-gray: #f5f5f7;
  --near-black: #1d1d1f;
  
  /* Interactive */
  --apple-blue: #0071e3;
  --link-blue: #0066cc;
  --bright-blue: #2997ff;
  
  /* Text */
  --text-primary: #1d1d1f;
  --text-secondary: rgba(0, 0, 0, 0.8);
  --text-tertiary: rgba(0, 0, 0, 0.48);
  --text-white: #ffffff;
  --text-white-secondary: rgba(255, 255, 255, 0.8);
  
  /* Surfaces */
  --surface-light: #ffffff;
  --surface-gray: #f5f5f7;
  --surface-dark-1: #272729;
  --surface-dark-2: #262628;
  --surface-dark-3: #28282a;
  
  /* Shadows */
  --card-shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0px;
  --card-shadow-light: rgba(0, 0, 0, 0.08) 0px 4px 20px 0px;
  --card-shadow-hover: rgba(0, 0, 0, 0.15) 0px 8px 40px 0px;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  --spacing-4xl: 96px;
  
  /* Radius */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 980px;
  --radius-full: 50%;
  
  /* Typography */
  --font-display: -apple-system, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-text: -apple-system, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  
  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-normal: 0.3s var(--ease-in-out);
  --transition-slow: 0.5s var(--ease-in-out);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--text-primary);
  background: var(--light-gray);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--near-black);
}

.display-hero {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.28px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.10;
}

.tile-heading {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: 0.196px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.19;
  letter-spacing: 0.231px;
}

.sub-heading {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.19;
  letter-spacing: 0.231px;
}

.body-text {
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
}

.caption {
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.29;
  letter-spacing: -0.224px;
  color: var(--text-tertiary);
}

.micro {
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.33;
  letter-spacing: -0.12px;
}

/* ---------- Navigation Bar (Glass Effect) ---------- */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease-out);
}

.nav-bar.scrolled {
  background: rgba(0, 0, 0, 0.92);
}

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

.nav-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-white);
  text-decoration: none;
  letter-spacing: -0.28px;
  opacity: 0.9;
  transition: opacity var(--transition-fast);
}

.nav-logo:hover {
  opacity: 1;
}

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

.nav-links a {
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  letter-spacing: -0.12px;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-white);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-white);
  transition: width var(--transition-normal);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toolbox-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--text-white);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-text);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-toolbox-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ---------- Hero Glow System (Hero-only, atmospheric) ---------- */
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

/* Mouse-following glow orbs — large, vibrant, multi-color */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.glow-orb--primary {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle at center,
    rgba(139, 92, 246, 0.85) 0%,
    rgba(99, 102, 241, 0.55) 25%,
    rgba(59, 130, 246, 0.25) 50%,
    transparent 70%
  );
  filter: blur(110px);
  opacity: 0.42;
  z-index: 10;
}

.glow-orb--accent {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle at center,
    rgba(236, 72, 153, 0.8) 0%,
    rgba(244, 114, 182, 0.45) 30%,
    rgba(251, 146, 60, 0.2) 55%,
    transparent 70%
  );
  filter: blur(100px);
  opacity: 0.35;
  z-index: 9;
}

.glow-orb--subtle {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle at center,
    rgba(6, 182, 212, 0.7) 0%,
    rgba(34, 197, 94, 0.35) 35%,
    rgba(59, 130, 246, 0.15) 60%,
    transparent 70%
  );
  filter: blur(90px);
  opacity: 0.28;
  z-index: 8;
}

.glow-orb--ambient {
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle at center,
    rgba(168, 85, 247, 0.55) 0%,
    rgba(99, 102, 241, 0.3) 35%,
    rgba(236, 72, 153, 0.12) 60%,
    transparent 70%
  );
  filter: blur(140px);
  opacity: 0.24;
  z-index: 7;
}

/* Auto-floating random colorful orbs — only in Hero */
.hero-float-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  filter: blur(80px);
}

/* Scattered light particles — tiny sparkles in hero */
.hero-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  filter: blur(1px);
}

/* Hero section — no longer needs the old pseudo glow */
.hero {
  min-height: 100vh;
  background: var(--pure-black);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(41, 151, 255, 0.04) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

/* Hero content above glows */
.hero-content {
  position: relative;
  z-index: 20;
}

.hero-content {
  max-width: 700px;
  padding: 0 var(--spacing-lg);
  animation: heroFadeIn 1s var(--ease-out) both;
}

/* Subtle grain overlay for depth on dark sections */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ---------- Grid Lines (subtle tech feel) ---------- */
.grid-lines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 70%);
}

/* ---------- Card 3D Tilt Effect ---------- */
.blog-card.tilt-enabled {
  transform-style: preserve-3d;
  perspective: 1200px;
  transition: box-shadow 0.4s ease, transform 0.15s ease-out;
}

.blog-card.tilt-enabled:hover {
  box-shadow: 0 20px 50px rgba(99, 149, 255, 0.15), 0 5px 20px rgba(0, 0, 0, 0.12);
}

.blog-card .card-shine {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 70%
  );
}

.blog-card.tilt-enabled:hover .card-shine {
  opacity: 1;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.28px;
  color: var(--text-white);
  margin-bottom: var(--spacing-md);
  animation: heroTitleIn 1.2s 0.2s var(--ease-out) both;
}

@keyframes heroTitleIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.19;
  letter-spacing: 0.231px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--spacing-xl);
  animation: heroTitleIn 1.2s 0.4s var(--ease-out) both;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  animation: heroTitleIn 1.2s 0.6s var(--ease-out) both;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounceDown 2s ease-in-out infinite;
  opacity: 0.5;
}

.hero-scroll-indicator span {
  display: block;
  width: 24px;
  height: 24px;
  border-right: 2px solid rgba(255, 255, 255, 0.6);
  border-bottom: 2px solid rgba(255, 255, 255, 0.6);
  transform: rotate(45deg);
}

@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--apple-blue);
  color: var(--text-white);
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}

.btn-primary:hover {
  background: #0077ed;
  transform: scale(1.02);
}

.btn-primary:active {
  transform: scale(0.98);
  background: #0065d1;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  color: var(--bright-blue);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  border: 1px solid var(--bright-blue);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}

.btn-pill:hover {
  background: var(--bright-blue);
  color: var(--text-white);
}

.btn-pill-light {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--text-white);
}

.btn-pill-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--text-white);
  color: var(--text-white);
}

.btn-pill-dark {
  border-color: var(--link-blue);
  color: var(--link-blue);
}

.btn-pill-dark:hover {
  background: var(--link-blue);
  color: var(--text-white);
}

/* ---------- Content Sections ---------- */
.section {
  padding: var(--spacing-4xl) 0;
  position: relative;
  z-index: 10;
  background: var(--light-gray);
}

.section-dark {
  background: var(--pure-black);
  color: var(--text-white);
}

.section-dark .section-heading,
.section-dark .card-title {
  color: var(--text-white);
}

.section-dark .body-text {
  color: var(--text-white-secondary);
}

.section-container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* ---------- Blog Cards ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-lg);
}

.blog-card {
  background: var(--surface-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--card-shadow-light);
  border: none;
  position: relative;
  overflow: hidden;
}

.blog-card > *:not(.card-shine, .blog-card::before) {
  position: relative;
  z-index: 3;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--apple-blue), var(--bright-blue));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.blog-card:hover::before {
  opacity: 1;
}

.blog-card .card-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.12px;
  color: var(--text-tertiary);
}

.blog-card .card-title {
  margin-bottom: var(--spacing-sm);
  transition: color var(--transition-fast);
}

.blog-card:hover .card-title {
  color: var(--apple-blue);
}

.blog-card .card-summary {
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -0.224px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag {
  display: inline-block;
  background: rgba(0, 113, 227, 0.08);
  color: var(--apple-blue);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.12px;
}

.blog-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* ---------- Blog Detail ---------- */
.blog-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px var(--spacing-lg) var(--spacing-4xl);
  animation: fadeSlideUp 0.5s var(--ease-out);
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.blog-detail .detail-cover {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, #1d1d1f 0%, #333 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-2xl);
  position: relative;
  overflow: hidden;
}

.blog-detail .detail-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(0, 113, 227, 0.15) 0%, transparent 60%);
}

.blog-detail .detail-cover-text {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 600;
  color: var(--text-white);
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--spacing-lg);
}

.blog-detail .detail-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  color: var(--text-tertiary);
  font-size: 14px;
}

.blog-detail .detail-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.10;
  margin-bottom: var(--spacing-lg);
}

.blog-detail .detail-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.blog-detail .detail-content h1,
.blog-detail .detail-content h2,
.blog-detail .detail-content h3 {
  font-family: var(--font-display);
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-md);
  color: var(--near-black);
}

.blog-detail .detail-content h2 {
  font-size: 28px;
  font-weight: 600;
}

.blog-detail .detail-content h3 {
  font-size: 21px;
  font-weight: 600;
}

.blog-detail .detail-content p {
  margin-bottom: var(--spacing-md);
}

.blog-detail .detail-content ul,
.blog-detail .detail-content ol {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-lg);
}

.blog-detail .detail-content li {
  margin-bottom: var(--spacing-sm);
}

.blog-detail .detail-content code {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
}

.blog-detail .detail-content pre {
  background: var(--near-black);
  color: #f5f5f7;
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--spacing-lg);
}

.blog-detail .detail-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.blog-detail .detail-content blockquote {
  border-left: 3px solid var(--apple-blue);
  padding-left: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  color: var(--text-tertiary);
  font-style: italic;
}

.blog-detail .detail-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-lg);
}

.blog-detail .detail-content th,
.blog-detail .detail-content td {
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  text-align: left;
  font-size: 14px;
}

.blog-detail .detail-content th {
  font-weight: 600;
  color: var(--near-black);
}

.blog-detail .back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--apple-blue);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: var(--spacing-xl);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.blog-detail .back-btn:hover {
  opacity: 0.7;
}

/* ---------- Toolbox Sidebar ---------- */
.toolbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.toolbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.toolbox-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  z-index: 1200;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.toolbox-sidebar.active {
  right: 0;
}

.toolbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--spacing-lg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.toolbox-header h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.374px;
}

.toolbox-close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(0, 0, 0, 0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.toolbox-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.toolbox-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-lg);
}

.toolbox-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

.tool-card {
  background: var(--surface-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-light);
  border-color: rgba(0, 113, 227, 0.2);
}

.tool-card .tool-icon {
  font-size: 28px;
  margin-bottom: var(--spacing-sm);
}

.tool-card .tool-name {
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.12px;
}

.tool-card .tool-desc {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: var(--spacing-4xl) var(--spacing-lg);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-md);
  opacity: 0.4;
}

.empty-state .empty-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
}

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

/* ---------- View Controls ---------- */
.view-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.view-switcher-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

/* Category filter tabs */
.category-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.cat-tab {
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
  letter-spacing: -0.12px;
}

.cat-tab:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.cat-tab.active {
  color: var(--text-white);
  background: var(--apple-blue);
}

/* Category badge on blog cards */
.cat-badge {
  display: inline-block;
  background: rgba(0, 113, 227, 0.06);
  color: var(--apple-blue);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.12px;
  margin-left: 6px;
}

/* Category select (dropdown) */
.cat-select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s var(--ease-out);
  background: rgba(0, 0, 0, 0.015);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2300000077' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.cat-select:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.08);
  background-color: white;
}

/* Category management panel */
.cat-mgmt-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.cat-mgmt-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.cat-mgmt-item .cat-input {
  flex: 1;
  padding: 6px 10px;
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s var(--ease-out);
  background: rgba(0, 0, 0, 0.015);
}

.cat-mgmt-item .cat-input:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.08);
  background: white;
}

.cat-mgmt-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.view-btn {
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--transition-fast);
  position: relative;
}

.view-btn:hover {
  color: var(--text-primary);
}

.view-btn.active {
  color: var(--apple-blue);
}

.view-btn.active::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--apple-blue);
  border-radius: 1px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--near-black);
  color: rgba(255, 255, 255, 0.6);
  padding: var(--spacing-2xl) 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: -0.12px;
  position: relative;
  z-index: 10;
}

.footer a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: var(--bright-blue);
}

/* 备案号链接 */
.beian-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.beian-links a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  letter-spacing: -0.12px;
  transition: color 0.2s ease;
}

.beian-links a:hover {
  color: var(--bright-blue);
}

.beian-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
}

.beian-placeholder {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: -0.12px;
}

/* ---------- About Page ---------- */
.about-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.about-card {
  max-width: 600px;
  background: var(--surface-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-2xl);
  box-shadow: var(--card-shadow-light);
  text-align: center;
}

.about-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--apple-blue), var(--bright-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto var(--spacing-md);
  color: var(--text-white);
}

.about-links {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  margin-top: var(--spacing-lg);
}

/* ---------- Animations ---------- */
.fade-in {
  animation: fadeIn 0.5s var(--ease-out) both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in-up {
  animation: fadeInUp 0.6s var(--ease-out) both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.stagger-fade-in > * {
  opacity: 0;
  animation: fadeInUp 0.5s var(--ease-out) forwards;
}

.stagger-fade-in > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-fade-in > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-fade-in > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-fade-in > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-fade-in > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-fade-in > *:nth-child(6) { animation-delay: 0.3s; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 834px) {
  .display-hero {
    font-size: 40px;
  }
  
  .section-heading {
    font-size: 32px;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .toolbox-sidebar {
    width: 100%;
    right: -100%;
  }
  
  .hero-title {
    font-size: 40px;
  }
  
  .nav-links {
    gap: var(--spacing-md);
  }
  
  .blog-detail .detail-title {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .display-hero {
    font-size: 32px;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .hero-subtitle {
    font-size: 17px;
  }
  
  .section-heading {
    font-size: 28px;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
}
