:root {
  --primary-color: #3b82f6;
  --primary-hover: #60a5fa;
  --bg-color: #0f172a;
  --text-color: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --header-bg: rgba(15, 23, 42, 0.82);
  --card-bg: #1e293b;
}

* { box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.35s ease, color 0.35s ease;
}

a { color: var(--primary-color); text-decoration: none; }
.container { max-width: 1440px; margin: 0 auto; padding: 0 1.5rem; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 2rem; font-weight: 700; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border-color);
  background: var(--header-bg);
  backdrop-filter: blur(12px) saturate(1.8);
  -webkit-backdrop-filter: blur(12px) saturate(1.8);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; color: var(--text-color); }
.logo-img { height: 32px; }

/* Nav */
.main-nav { display: flex; gap: 1.5rem; align-items: center; }
.nav-item { color: var(--text-muted); font-weight: 500; cursor: pointer; padding: 0.5rem; }
.nav-item:hover { color: var(--primary-color); }

/* Mega Menu */
.has-dropdown { position: relative; }
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
  border-radius: 0.5rem;
  padding: 1.5rem;
  width: max-content;
  max-width: 800px;
  display: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.has-dropdown:hover .mega-menu { display: block; opacity: 1; }
.mega-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.mega-card {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  transition: background 0.2s;
}
.mega-card:hover { background: var(--card-bg); }
.mega-icon { display: flex; align-items: center; justify-content: center; color: var(--primary-color); }
.mega-title { font-weight: 600; color: var(--text-color); }
.mega-desc { font-size: 0.875rem; color: var(--text-muted); }
.disabled { opacity: 0.5; pointer-events: none; }
.badge { background: var(--primary-color); color: white; font-size: 0.7rem; padding: 0.1rem 0.4rem; border-radius: 1rem; margin-left: 0.5rem; }

.header-actions { display: flex; align-items: center; gap: 1rem; }

.lang-switch { font-weight: 600; font-size: 0.9rem; }
.mobile-only { display: none; }

/* Hero */
.hero-section {
  padding: 5rem 1.5rem 10rem;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 80% 20%, #1e293b 0%, #0f172a 100%) !important;
  color: #e2e8f0;
}
.hero-section::before {
  content: '';
  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: 60px 60px;
  pointer-events: none;
}
.hero-section::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  bottom: -150px; left: -100px;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-container {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}
.hero-content { flex: 1; min-width: 0; }
.hero-content h1 {
  font-size: 3.5rem; font-weight: 800; color: #fff !important;
  margin-bottom: 1.25rem; line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.hero-badge-text { font-size: 0.85rem; color: #93c5fd; }
.hero-section .version-badge { background: #2563eb; color: white !important; font-size: 0.7rem; padding: 0.15rem 0.6rem; border-radius: 0.5rem; font-weight: 600; }
.hero-description { font-size: 1.05rem; color: #cbd5e1 !important; line-height: 1.8; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; }
.btn { display: inline-block; padding: 0.75rem 1.75rem; border-radius: 0.625rem; font-weight: 600; font-size: 1rem; transition: all 0.2s; text-decoration: none !important; }
.btn-primary {
  background: #2563eb; color: #fff !important;
  box-shadow: 0 4px 14px rgba(37,99,235,0.5);
}
.btn-primary:hover { background: #1d4ed8; box-shadow: 0 6px 20px rgba(37,99,235,0.6); transform: translateY(-1px); }
.btn-secondary {
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.35);
  color: #fff !important;
}
.btn-secondary:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.5); transform: translateY(-1px); }
.hero-code {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.6rem 1rem; border-radius: 0.5rem;
  font-family: monospace; font-size: 0.875rem;
}
.hero-code-dollar { color: #10b981; font-weight: bold; }
.hero-code code { color: #f472b6 !important; }
.hero-image-wrapper {
  flex-shrink: 0;
  width: 520px;
  animation: hero-float 6s ease-in-out infinite;
}
.hero-image-wrapper img {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Tools */
.tools-showcase { padding: 4rem 0 2rem; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.tool-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.15);
  padding: 1.5rem;
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.4s ease;
}
.tool-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}
.tool-card:hover:not(.disabled)::after { left: 120%; }
.tool-card:hover:not(.disabled) {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
  border-color: var(--primary-color);
}
.tool-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.tool-title { font-size: 1.25rem; margin-bottom: 0.5rem; margin-top: 0; }
.tool-desc { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* Features */
.features-section { padding: 2rem 0 4rem; background: rgba(15, 23, 42, 0.5); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.feature-item h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: #93c5fd; }
.feature-item p { color: var(--text-muted); margin: 0; }

/* FAQ */
.faq-section { padding: 4rem 0; }
.faq-list { max-width: 800px; margin: 0 auto; }
details { border-bottom: 1px solid var(--border-color); padding: 1rem 0; }
summary { font-weight: 600; cursor: pointer; list-style: none; font-size: 1.1rem; }
summary::-webkit-details-marker { display: none; }
details p { margin-top: 1rem; color: var(--text-muted); padding-left: 1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border-color); padding: 4rem 1.5rem 2rem; background: var(--card-bg); }
.footer-container { max-width: 1440px; margin: 0 auto; padding: 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.footer-logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.footer-logo img { height: 28px; filter: grayscale(1); opacity: 0.7; }
.footer-col h3 { font-size: 1rem; margin-bottom: 1.5rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--primary-color); }
.contact-list li { display: flex; align-items: center; gap: 0.5rem; color: var(--text-muted); }
.footer-qrcode { margin-top: 1.5rem; color: var(--text-muted); font-size: 0.875rem; }
.footer-bottom { border-top: 1px solid var(--border-color); padding-top: 2rem; text-align: center; color: var(--text-muted); font-size: 0.875rem; }
.beian a { color: var(--text-muted); }
.footer-qr-wrapper { display: flex; gap: 1rem; margin-top: 0.5rem; }
.footer-qr-item { text-align: center; }
.footer-qr-img { width: 110px; height: 110px; object-fit: cover; border-radius: 0.5rem; padding: 8px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.footer-qr-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.4rem; }

/* Hero enhancements */
.version-badge { display: inline-block; background: #2563eb; color: white; font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 0.5rem; }

/* Why Choose - Pain Point Comparison */
.why-choose-section { padding: 2rem 0 5rem; background: rgba(30, 41, 59, 0.3); }
.comparison-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.5rem; }
.comparison-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 1rem;
  padding: 0;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.4s ease;
  overflow: hidden;
}
.comparison-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
  border-color: var(--primary-color);
}
.card-title { margin: 0; padding: 1rem 1.5rem; font-size: 1.1rem; font-weight: 700; color: var(--primary-color); border-bottom: 1px solid rgba(59, 130, 246, 0.15); background: rgba(59, 130, 246, 0.08); }
.comparison-content { display: flex; flex-direction: column; }
.pain-point { display: flex; gap: 0.75rem; align-items: flex-start; padding: 1rem 1.5rem; }
.pain-point p { color: var(--text-muted); font-size: 0.9rem; margin: 0; line-height: 1.6; }
.solution-point { display: flex; gap: 0.75rem; align-items: flex-start; padding: 1rem 1.5rem; border-top: 1px solid rgba(59, 130, 246, 0.1); }
.solution-point p { color: var(--text-color); font-size: 0.9rem; margin: 0; line-height: 1.6; }
.point-icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; }
.icon-cross { background: #450a0a; color: #f87171; }
.icon-check { background: #052e16; color: #4ade80; }

/* Feature Showcase */
.feature-showcase-section { padding: 4rem 0; }
.showcase-item { display: flex; align-items: center; gap: 3rem; margin-bottom: 4rem; padding: 3rem; border-radius: 1.25rem; background: rgba(30, 41, 59, 0.4); border: 1px solid rgba(59, 130, 246, 0.15); }
.showcase-item:last-child { margin-bottom: 0; }
.showcase-reverse { flex-direction: row-reverse; }
.showcase-text { flex: 1; min-width: 0; }
.showcase-text h3 { font-size: 1.75rem; font-weight: 800; margin-bottom: 1.25rem; color: var(--text-color); }
.showcase-text p { color: var(--text-muted); line-height: 1.8; margin: 0; font-size: 1.05rem; }
.showcase-media { flex: 1; min-width: 0; position: relative; perspective: 1000px; }
.showcase-media video, .showcase-media img {
  width: 100%;
  border-radius: 0.75rem;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  z-index: 2;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.media-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 80%; height: 80%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(37,99,235,0.4) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.spring-hover:hover video, .spring-hover:hover img {
  transform: scale(1.03) rotateY(2deg);
}
.spring-hover:hover .media-glow {
  opacity: 1;
}

/* Glass panel utility */
.glass-panel {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Navbar search */
.navbar-search { display: flex; align-items: center; }

/* Page body — markdown content pages (about, changelog, etc.) */
.page-layout { display: flex; max-width: 1440px; margin: 0 auto; gap: 2rem; padding: 2rem 1.5rem; }
.page-body { flex: 1; min-width: 0; }
.page-body h1 { font-size: 2rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--text-color); }
.page-body h2 { font-size: 1.5rem; font-weight: 700; margin: 2.5rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color); }
.page-body h3 { font-size: 1.25rem; font-weight: 600; margin: 2rem 0 0.75rem; }
.page-body p { margin-bottom: 1rem; line-height: 1.8; }
.page-body ul, .page-body ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.page-body ul { list-style: disc; }
.page-body ol { list-style: decimal; }
.page-body li { margin-bottom: 0.5rem; }
.page-body strong { font-weight: 600; }
.page-body a { color: var(--primary-color); }
.page-body a:hover { text-decoration: underline; }
.page-body blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--primary-color); background: var(--card-bg); border-radius: 0 0.5rem 0.5rem 0; }
.page-body pre { position: relative; border: 1px solid var(--border-color); border-radius: 0.5rem; overflow-x: auto; margin: 1.5rem 0; font-size: 0.9rem; line-height: 1.6; padding: 1.25rem; }
.page-body pre.shiki,
.page-body pre.shiki span { color: var(--shiki-dark) !important; background-color: var(--shiki-dark-bg) !important; }
.page-body pre code { font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace; font-size: 0.9em; }
.page-body :not(pre) > code { background: var(--card-bg); padding: 0.15em 0.4em; border-radius: 4px; border: 1px solid var(--border-color); font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace; font-size: 0.9em; }
.page-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.page-body th, .page-body td { padding: 0.75rem 1rem; border: 1px solid var(--border-color); text-align: left; }
.page-body th { background: var(--card-bg); font-weight: 600; }
.page-body img {
  max-width: 100%; border-radius: 0.5rem; margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Copy button for code blocks */
.code-copy-btn {
  position: absolute; top: 8px; right: 8px;
  padding: 4px 10px; font-size: 12px; font-weight: 600;
  color: var(--text-muted); background: var(--bg-color);
  border: 1px solid var(--border-color); border-radius: 4px;
  cursor: pointer; opacity: 0; transition: opacity 0.2s;
  z-index: 2;
}
.page-body pre:hover .code-copy-btn { opacity: 1; }
.code-copy-btn:hover { color: var(--primary-color); border-color: var(--primary-color); }
.code-copy-btn.copied { color: #16a34a; border-color: #16a34a; }

/* Page TOC */
.page-toc { flex-shrink: 0; width: 200px; position: sticky; top: 80px; align-self: flex-start; max-height: calc(100vh - 100px); overflow-y: auto; }
.page-toc-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.75rem; }
.page-toc-list { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border-color); }
.page-toc-list li { margin: 0; }
.page-toc-list a { display: block; padding: 4px 0 4px 12px; font-size: 0.8rem; color: var(--text-muted); margin-left: -2px; border-left: 2px solid transparent; transition: all 0.2s; }
.page-toc-list a:hover { color: var(--text-color); }
.page-toc-list a.active { color: var(--primary-color); border-left-color: var(--primary-color); font-weight: 600; }
.page-toc-list .toc-h3 a { padding-left: 24px; font-size: 0.75rem; }

/* Blog List Page */
.blog-page { max-width: 1440px; margin: 0 auto; padding: 2rem 1.5rem; }
.blog-breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.blog-breadcrumb a { color: var(--text-muted); }
.blog-breadcrumb a:hover { color: var(--primary-color); }

/* Category tabs */
.category-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; border-bottom: 2px solid var(--border-color); padding-bottom: 0; }
.category-tab { padding: 0.5rem 1rem; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; text-decoration: none; }
.category-tab:hover { color: var(--primary-color); }
.category-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); font-weight: 600; }

/* Blog two-column layout */
.blog-layout { display: flex; gap: 2.5rem; }
.blog-main { flex: 1; min-width: 0; }
.blog-sidebar { width: 280px; flex-shrink: 0; }

/* Article list */
.article-list { list-style: none; padding: 0; margin: 0; }
.article-item { display: flex; gap: 1rem; padding: 1.25rem; border: 1px solid var(--border-color); border-radius: 0.5rem; margin-bottom: 1rem; transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s; background: var(--bg-color); }
.article-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); transform: translateY(-2px); border-color: var(--primary-color); }

/* Article thumbnail */
.article-thumb { width: 180px; height: 120px; border-radius: 0.375rem; overflow: hidden; flex-shrink: 0; background: var(--card-bg); display: flex; align-items: center; justify-content: center; }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-thumb-text { font-size: 2rem; font-weight: 800; color: white; }
/* Color variants for tag letters */
.thumb-color-0 { background: linear-gradient(135deg, #667eea, #764ba2); }
.thumb-color-1 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.thumb-color-2 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.thumb-color-3 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.thumb-color-4 { background: linear-gradient(135deg, #fa709a, #fee140); }
.thumb-color-5 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }

/* Article info */
.article-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.article-title { font-size: 1.1rem; font-weight: 600; color: var(--text-color); margin: 0 0 0.5rem; line-height: 1.4; text-decoration: none; display: block; }
.article-title:hover { color: var(--primary-color); }
.article-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; margin: 0 0 0.75rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.article-meta { display: flex; align-items: center; gap: 0.75rem; font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; }
.tag-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 1rem; font-size: 0.7rem; background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-muted); text-decoration: none; }
.tag-badge:hover { color: var(--primary-color); border-color: var(--primary-color); }

/* Sidebar */
.sidebar-widget { margin-bottom: 2rem; }
.sidebar-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--primary-color); display: inline-block; }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-item { display: inline-block; padding: 0.3rem 0.75rem; border-radius: 1rem; font-size: 0.8rem; background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-muted); text-decoration: none; transition: all 0.2s; }
.tag-item:hover { color: var(--primary-color); border-color: var(--primary-color); background: var(--bg-color); }

/* Sidebar lists (hot/latest articles) */
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { font-size: 0.85rem; color: var(--text-color); text-decoration: none; line-height: 1.4; display: block; }
.sidebar-list a:hover { color: var(--primary-color); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem; }
.pagination-link { padding: 0.4rem 0.8rem; border: 1px solid var(--border-color); border-radius: 0.375rem; font-size: 0.85rem; color: var(--text-muted); text-decoration: none; transition: all 0.2s; }
.pagination-link:hover { border-color: var(--primary-color); color: var(--primary-color); }
.pagination-link.active { background: var(--primary-color); color: white; border-color: var(--primary-color); }

/* Scroll entrance animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), #60a5fa);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
}

@media (max-width: 768px) {
  .desktop-only { display: none; }
  .mobile-only { display: block; background: none; border: none; color: var(--text-color); cursor: pointer; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 2.5rem; }
  .hero-container { flex-direction: column; text-align: center; }
  .hero-image-wrapper { width: 100%; max-width: 500px; }
  .hero-actions { justify-content: center; }
  .hero-badge { justify-content: center; }
  .comparison-grid { grid-template-columns: 1fr; }
  .showcase-item, .showcase-reverse { flex-direction: column; gap: 2rem; padding: 2rem 1.5rem; }
  .hero-description { font-size: 0.9rem; }
  .page-layout { flex-direction: column; }
  .page-toc { display: none; }
  .blog-layout { flex-direction: column; }
  .blog-sidebar { width: 100%; }
  .article-item { flex-direction: column; }
  .article-thumb { width: 100%; height: 180px; }
  .navbar-search { display: none; }

  /* Mobile drawer menu */
  .mobile-drawer {
    position: fixed;
    top: 0; right: -280px;
    width: 280px; height: 100vh;
    background: var(--bg-color);
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    z-index: 200;
    padding: 80px 24px 24px;
    transition: right 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
  }
  .mobile-drawer.open { right: 0; }
  .mobile-drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .mobile-drawer-overlay.open { opacity: 1; pointer-events: auto; }
  .mobile-drawer .mobile-nav-item {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
  }
  .mobile-drawer .mobile-nav-item:hover { color: var(--primary-color); }
  .mobile-drawer .mobile-expandable {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
  }
  .mobile-drawer .mobile-expandable .expand-arrow {
    transition: transform 0.25s ease;
    flex-shrink: 0;
    color: var(--text-muted);
  }
  .mobile-drawer .mobile-expandable.expanded .expand-arrow {
    transform: rotate(180deg);
  }
  .mobile-drawer .mobile-sub-group {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid var(--border-color);
  }
  .mobile-drawer .mobile-sub-group.open {
    max-height: 500px;
  }
  .mobile-drawer .mobile-sub-item {
    display: block;
    padding: 10px 0 10px 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
  }
  .mobile-drawer .mobile-sub-item:hover { color: var(--primary-color); }
}

.mobile-drawer, .mobile-drawer-overlay { display: none; }
@media (max-width: 768px) {
  .mobile-drawer { display: block; }
  .mobile-drawer-overlay { display: block; }
}

/* Code Demo Section */
.code-demo-section { 
  margin-top: -6rem; 
  padding: 0 1.5rem 4rem; 
  position: relative; 
  z-index: 10; 
}
.code-demo-wrapper {
  max-width: 800px; margin: 0 auto;
  background: #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.code-demo-header {
  display: flex; align-items: center; justify-content: center;
  padding: 0.75rem 1rem;
  background: #1e293b;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  position: relative;
}
.window-controls { position: absolute; left: 1rem; display: flex; gap: 8px; }
.window-controls .dot { width: 12px; height: 12px; border-radius: 50%; }
.window-controls .red { background: #ff5f56; }
.window-controls .yellow { background: #ffbd2e; }
.window-controls .green { background: #27c93f; }
.code-title { font-family: monospace; font-size: 0.85rem; color: #94a3b8; font-weight: 600; }
.code-demo-body { padding: 1.5rem; overflow-x: auto; font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace; font-size: 0.95rem; line-height: 1.6; color: #e2e8f0; }
.code-demo-body pre { margin: 0; background: transparent; padding: 0; border: none; }
.code-demo-body .kd { color: #c678dd; }
.code-demo-body .nx { color: #61afef; }
.code-demo-body .s1 { color: #98c379; }
.code-demo-body .c1 { color: #7f848e; font-style: italic; }
.code-demo-body .k { color: #c678dd; }
.code-demo-body .kc { color: #d19a66; }
.code-demo-body .nt { color: #e06c75; }
.code-demo-body .na { color: #d19a66; }
.code-demo-body .s { color: #98c379; }
.code-demo-body .o, .code-demo-body .p { color: #abb2bf; }

/* SVG Tool Icons */
.tool-svg { stroke: var(--primary-color); stroke-width: 1.5; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease; }
.tool-card:hover .tool-svg { transform: scale(1.15); filter: drop-shadow(0 0 8px rgba(37,99,235,0.4)); }

/* Animation Classes */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
  will-change: opacity, transform;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.typing-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background-color: #61afef;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  margin-left: 4px;
}
@keyframes blink { 50% { opacity: 0; } }

/* Hero Section Animations & Badges */
.hero-image-wrapper {
  position: relative;
  z-index: 1;
}
.hero-main-img {
  position: relative;
  z-index: 2;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: floatMain 6s ease-in-out infinite;
}
.floating-badge {
  position: absolute;
  z-index: 3;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  white-space: nowrap;
}
.badge-1 { top: 10%; left: -5%; animation: floatBadge 4s ease-in-out infinite; }
.badge-2 { bottom: 20%; right: -10%; animation: floatBadge 5s ease-in-out infinite reverse; }
.badge-3 { top: 60%; left: -15%; animation: floatBadge 6s ease-in-out infinite 1s; }

.hero-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
  opacity: 0.6;
  animation: pulseOrb 8s infinite alternate;
}
.orb-1 { width: 300px; height: 300px; background: rgba(37, 99, 235, 0.4); top: -10%; right: -10%; }
.orb-2 { width: 250px; height: 250px; background: rgba(139, 92, 246, 0.3); bottom: -10%; left: -10%; animation-delay: 3s; }

@keyframes floatMain {
  0% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0); }
}
@keyframes floatBadge {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes pulseOrb {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.2); opacity: 0.7; }
}

/* Bento Box Section */
.bento-section { padding: 4rem 0 6rem; position: relative; z-index: 10; }
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 1.5rem;
}
.bento-card {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1.2rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  position: relative;
}
.bento-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}
.bento-card h4 {
  font-size: 1.15rem;
  color: #f8fafc;
  margin-bottom: 0.5rem;
  margin-top: auto;
}
.bento-card p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}
.bento-lg { grid-column: span 2; grid-row: span 2; }
.bento-md { grid-column: span 2; grid-row: span 1; }
.bento-sm { grid-column: span 1; grid-row: span 1; }

@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-lg, .bento-md { grid-column: span 2; }
  .bento-sm { grid-column: span 1; }
}
@media (max-width: 640px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-lg, .bento-md, .bento-sm { grid-column: span 1; grid-row: auto; }
}

/* Bento Abstract UI Animations */
.bento-anim-box {
  flex: 1; min-height: 80px; margin-bottom: 1.5rem; border-radius: 0.5rem;
  background: rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; flex-direction: column; gap: 8px;
}
.bento-lg .bento-anim-box { min-height: 160px; }

/* Subtitle Anim */
.fake-ui-subtitle { background: rgba(255,255,255,0.1); padding: 4px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
.fake-ui-subtitle.sec { color: var(--primary-color); background: rgba(59, 130, 246, 0.1); transform: scale(0.9); opacity: 0.8; }
.bento-card:hover .fake-ui-subtitle { animation: pulse 1s infinite alternate; }

/* A-B Loop Anim */
.fake-progress { width: 60%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; position: relative; }
.fake-loop-range { position: absolute; left: 20%; right: 40%; height: 100%; background: var(--primary-color); border-radius: 3px; opacity: 0.5; }
.fake-loop-range::after { content:''; position: absolute; left: 0; top: -3px; height: 12px; width: 4px; background: #fff; border-radius: 2px; animation: loopAnim 2s infinite linear; }
@keyframes loopAnim { 0% { left: 0; } 100% { left: 100%; } }

/* Lock Anim */
.fake-icon-lock { font-size: 2rem; opacity: 0.5; transition: 0.3s; }
.bento-card:hover .fake-icon-lock { opacity: 1; transform: scale(1.2); color: #ef4444; }

/* Danmaku Anim */
.fake-danmaku { position: absolute; white-space: nowrap; font-size: 0.85rem; font-weight: bold; opacity: 0.8; }
.d1 { top: 20%; right: -50%; animation: danmakuMove 6s linear infinite; }
.d2 { top: 45%; right: -50%; animation: danmakuMove 5s linear infinite 1s; color: #fbbf24; }
.d3 { top: 70%; right: -50%; animation: danmakuMove 7s linear infinite 2s; color: #ef4444; }
@keyframes danmakuMove { 0% { transform: translateX(0); } 100% { transform: translateX(-300px); } }

/* Rotate Anim */
.fake-ui-rotate { font-size: 1.5rem; font-weight: bold; transition: 0.5s; }
.bento-card:hover .fake-ui-rotate { transform: rotate(90deg); color: var(--primary-color); }

/* Vol Boost Anim */
.fake-vol-bar { display: flex; gap: 4px; align-items: flex-end; height: 24px; }
.fake-vol-bar span { width: 6px; background: #fff; border-radius: 2px; opacity: 0.3; }
.fake-vol-bar span:nth-child(1) { height: 30%; }
.fake-vol-bar span:nth-child(2) { height: 50%; }
.fake-vol-bar span:nth-child(3) { height: 70%; }
.fake-vol-bar span.boost { height: 100%; background: #ef4444; opacity: 0; transition: 0.3s; }
.bento-card:hover .fake-vol-bar span { opacity: 0.8; }
.bento-card:hover .fake-vol-bar span.boost { opacity: 1; box-shadow: 0 0 8px #ef4444; }

/* Thumb Anim */
.fake-thumb { width: 40px; height: 24px; border: 2px solid #fff; border-radius: 4px; opacity: 0.5; transition: 0.3s; background: linear-gradient(45deg, #1e293b, #334155); }
.bento-card:hover .fake-thumb { opacity: 1; transform: scale(1.5) translateY(-5px); border-color: var(--primary-color); }

/* --- Abstract UI Showcase Animations --- */
/* The container replaces video/img inside .showcase-media. 
   Must use explicit height since there's no intrinsic content to size from. */
.abs-ui-container {
  width: 100%;
  height: 320px;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

/* Scene 1: Interactive Quiz — fake player with pop-up quiz card */
.abs-player {
  position: absolute;
  inset: 20px;
  background: #0a0f1a;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}
.abs-progress-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 4px; background: rgba(255,255,255,0.15);
}
.abs-progress-fill {
  height: 100%; background: var(--primary-color);
  border-radius: 2px;
}
.play-anim { animation: playProgress 6s infinite linear; }
.abs-progress-dot {
  position: absolute; top: -3px; width: 10px; height: 10px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px var(--primary-color);
  animation: moveDot 6s infinite linear;
}
.abs-interactive-quiz {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  background: rgba(255,255,255,0.97);
  padding: 16px 22px; border-radius: 10px;
  color: #1e293b; width: 65%;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  opacity: 0;
  animation: popQuiz 6s infinite;
  z-index: 5;
}
.quiz-q { font-weight: 700; margin-bottom: 12px; font-size: 0.95rem; }
.quiz-opts { display: flex; gap: 10px; }
.opt {
  padding: 5px 12px; background: #e2e8f0; border-radius: 6px;
  font-size: 0.8rem; font-weight: 600; color: #334155;
  transition: background 0.2s;
}
.quiz-cursor {
  position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(59, 130, 246, 0.6); border: 2px solid var(--primary-color);
  opacity: 0; z-index: 6;
  animation: clickOpt 6s infinite;
}

@keyframes playProgress { 0% { width: 0; } 40% { width: 50%; } 80% { width: 50%; } 100% { width: 100%; } }
@keyframes moveDot { 0% { left: 0; } 40% { left: 50%; } 80% { left: 50%; } 100% { left: calc(100% - 10px); } }
@keyframes popQuiz {
  0%, 38% { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  42%, 76% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  80%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
}
@keyframes clickOpt {
  0%, 48% { opacity: 0; top: 85%; left: 85%; }
  52% { opacity: 1; top: 85%; left: 85%; }
  62% { top: 62%; left: 28%; }
  68% { transform: scale(0.7); background: rgba(59, 130, 246, 0.9); }
  73%, 100% { opacity: 0; }
}

/* Scene 2: Search & Drag — split view with file drop + search results */
.abs-split-view {
  position: absolute; inset: 20px;
  display: flex; gap: 16px;
}
.abs-drag-zone {
  flex: 1; border: 2px dashed rgba(255,255,255,0.2); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; transition: 0.3s;
  animation: dragGlow 5s infinite;
}
.file-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff; padding: 8px 14px; border-radius: 6px;
  font-weight: 800; font-size: 0.85rem;
  position: absolute;
  box-shadow: 0 4px 12px rgba(239,68,68,0.4);
  animation: dropFile 5s infinite;
}
.drop-text { color: rgba(255,255,255,0.4); font-size: 0.8rem; margin-top: 8px; }
.abs-search-panel {
  flex: 1; display: flex; flex-direction: column; gap: 10px;
}
.abs-search-bar {
  background: rgba(0,0,0,0.4); padding: 10px 12px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem; font-family: 'JetBrains Mono', monospace; color: #e2e8f0;
}
.search-term { color: var(--primary-color); }
.abs-search-results {
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; animation: showResults 5s infinite;
}
.res-line {
  background: rgba(255,255,255,0.06); padding: 8px 10px; border-radius: 6px;
  font-size: 0.75rem; color: #cbd5e1; line-height: 1.4;
  border-left: 3px solid transparent;
}
.res-line:nth-child(1) { animation: resultHighlight 5s infinite 2.6s; }
.res-line:nth-child(2) { animation: resultHighlight 5s infinite 2.8s; }
.res-line:nth-child(3) { animation: resultHighlight 5s infinite 3.0s; }
.res-line .hl {
  background: rgba(234, 179, 8, 0.3); color: #fde047;
  padding: 1px 3px; border-radius: 2px; font-weight: 600;
}

@keyframes dropFile {
  0%, 8% { top: -30px; opacity: 0; }
  18% { top: 35%; opacity: 1; }
  30%, 42% { top: 42%; opacity: 1; }
  50%, 100% { top: 42%; opacity: 0; }
}
@keyframes dragGlow {
  0%, 16% { border-color: rgba(255,255,255,0.15); background: transparent; }
  22%, 48% { border-color: #22c55e; background: rgba(34, 197, 94, 0.08); }
  54%, 100% { border-color: rgba(255,255,255,0.15); background: transparent; }
}
@keyframes showResults {
  0%, 44% { opacity: 0; transform: translateY(8px); }
  50%, 88% { opacity: 1; transform: translateY(0); }
  94%, 100% { opacity: 0; }
}
@keyframes resultHighlight {
  0%, 90% { border-left-color: transparent; }
  10%, 80% { border-left-color: var(--primary-color); }
}

/* Scene 3: Privacy & Control — local badge + long-press 2x speed */
.privacy-theme { background: linear-gradient(145deg, #0c1222, #162033); }
.abs-privacy-badge {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  font-size: 0.78rem; color: #4ade80; font-weight: 600;
  background: rgba(34, 197, 94, 0.12); padding: 5px 10px;
  border-radius: 6px; border: 1px solid rgba(34, 197, 94, 0.35);
}
.abs-speed-indicator {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); z-index: 3;
}
.speed-badge {
  background: rgba(0,0,0,0.85); color: #fff;
  padding: 10px 22px; border-radius: 24px;
  font-weight: 800; font-size: 1.2rem; letter-spacing: 1px;
  opacity: 0;
  animation: speedPop 5s infinite;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
.abs-finger-press {
  position: absolute; bottom: 30%; right: 22%; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  opacity: 0;
  animation: fingerPress 5s infinite;
}
.abs-finger-press::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 12px; height: 12px; background: rgba(255,255,255,0.9);
  border-radius: 50%;
}
.fast-play-anim { animation: fastProgress 5s infinite linear; }

@keyframes fingerPress {
  0%, 18% { opacity: 0; transform: scale(1.5); }
  22%, 72% { opacity: 1; transform: scale(0.85); box-shadow: 0 0 20px rgba(255,255,255,0.4); }
  78%, 100% { opacity: 0; transform: scale(1.2); }
}
@keyframes speedPop {
  0%, 20% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  25%, 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}
@keyframes fastProgress {
  0% { width: 10%; } 22% { width: 15%; } 72% { width: 88%; } 100% { width: 100%; }
}

/* Scene 4: Watermark — tiled UID watermarks + red marquee */
.watermark-theme { background: #0a0f1a; }
.abs-tile-watermarks {
  position: absolute; inset: -60%; width: 320%; height: 320%;
  transform: rotate(-28deg);
  display: flex; flex-wrap: wrap; align-content: flex-start;
  opacity: 0.12; pointer-events: none; z-index: 1;
}
.abs-tile-watermarks span {
  font-size: 0.95rem; font-family: 'JetBrains Mono', monospace;
  font-weight: 700; color: #fff;
  margin: 18px 30px; white-space: nowrap;
}
.abs-marquee-watermark {
  position: absolute; top: 35%; z-index: 2;
  white-space: nowrap; font-weight: 800;
  font-family: 'JetBrains Mono', monospace; font-size: 1rem;
  color: #ef4444; opacity: 0.75;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  animation: marqueeRun 16s linear infinite;
}
.w-30 { width: 30%; }

@keyframes marqueeRun {
  0% { left: 110%; top: 25%; }
  25% { top: 55%; }
  50% { left: -100%; top: 35%; }
  75% { top: 65%; }
  100% { left: 110%; top: 25%; }
}

/* Scene 2 Redesign: Subtitle Search Panel */
.sub-search-panel {
  position: absolute; inset: 16px;
  background: rgba(20, 28, 45, 0.95);
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}
.sub-search-header {
  padding: 10px 16px; font-size: 0.85rem; font-weight: 700;
  color: #e2e8f0; border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: center; letter-spacing: 1px;
}
.sub-search-input {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 12px; padding: 8px 12px;
  background: rgba(0,0,0,0.35); border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
}
.sub-search-icon { font-size: 0.85rem; opacity: 0.6; }
.sub-search-text {
  font-family: 'JetBrains Mono', monospace; font-size: 0.9rem;
  color: #fff; font-weight: 600;
}
.sub-typing::after {
  content: '|'; animation: blink 1s step-end infinite;
  color: var(--primary-color); font-weight: 400;
}
.sub-search-result-list {
  flex: 1; overflow: hidden; padding: 4px 0;
}
.sub-result-item {
  padding: 10px 14px;
  border-left: 3px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  opacity: 0;
  animation: subItemSlide 5s infinite;
}
.sub-result-item:nth-child(1) { animation-delay: 0s; }
.sub-result-item:nth-child(2) { animation-delay: 0.15s; }
.sub-result-item:nth-child(3) { animation-delay: 0.3s; }
.sub-result-item:nth-child(4) { animation-delay: 0.45s; }
.sub-result-item.active {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--primary-color);
}
.sub-time {
  font-size: 0.7rem; font-family: 'JetBrains Mono', monospace;
  color: #60a5fa; margin-bottom: 3px; font-weight: 600;
}
.sub-content {
  font-size: 0.8rem; color: #cbd5e1; line-height: 1.4;
}
.sub-hl {
  background: rgba(234, 179, 8, 0.35); color: #fde047;
  padding: 1px 3px; border-radius: 2px; font-weight: 700;
}
.sub-status-bar {
  padding: 6px 14px; font-size: 0.7rem; color: #64748b;
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: right;
}
@keyframes subItemSlide {
  0%, 8% { opacity: 0; transform: translateY(8px); }
  14%, 86% { opacity: 1; transform: translateY(0); }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--primary-color);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.back-to-top svg {
  transition: transform 0.3s ease;
}

.back-to-top:hover svg {
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
  }
}

/* Scene 5: Playlist Panel */
.pl-panel {
  position: absolute; inset: 14px;
  background: rgba(15, 20, 35, 0.96);
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  font-size: 0.8rem;
}
.pl-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: #e2e8f0; font-weight: 700; font-size: 0.85rem;
}
.pl-header-icons { color: #64748b; font-size: 0.8rem; letter-spacing: 6px; }
.pl-body {
  flex: 1; display: flex; overflow: hidden;
}
.pl-categories {
  width: 42%; border-right: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}
.pl-cat-item {
  padding: 8px 12px; color: #94a3b8;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; cursor: default;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.pl-cat-item.active {
  color: var(--primary-color); font-weight: 700;
  background: rgba(59, 130, 246, 0.08);
  border-left-color: var(--primary-color);
}
.pl-count {
  background: rgba(255,255,255,0.08); color: #64748b;
  padding: 1px 6px; border-radius: 8px; font-size: 0.7rem;
  font-weight: 600;
}
.pl-cat-item.active .pl-count {
  background: rgba(59, 130, 246, 0.15); color: var(--primary-color);
}
.pl-items {
  flex: 1; overflow: hidden;
}
.pl-item {
  padding: 7px 12px; color: #cbd5e1;
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; cursor: default;
  transition: background 0.15s;
  position: relative;
}
.pl-item:hover { background: rgba(255,255,255,0.03); }
.pl-item.playing {
  color: var(--primary-color); font-weight: 700;
}
.pl-playing-icon {
  color: var(--primary-color); font-size: 0.7rem;
  animation: plPulse 1.5s infinite alternate;
}
.pl-fav {
  margin-left: auto; color: #475569; font-size: 0.9rem;
  flex-shrink: 0;
}
.pl-fav.faved { color: #fbbf24; }
.pl-upnext {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 8px 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  opacity: 0;
  animation: plUpnextPop 6s infinite;
}
.pl-upnext-title {
  font-size: 0.72rem; color: #94a3b8; font-weight: 700;
  margin-bottom: 5px;
}
.pl-upnext-item {
  font-size: 0.72rem; color: #cbd5e1; padding: 2px 0;
}

@keyframes plPulse {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}
@keyframes plUpnextPop {
  0%, 30% { opacity: 0; transform: translateY(6px); }
  36%, 86% { opacity: 1; transform: translateY(0); }
  92%, 100% { opacity: 0; transform: translateY(6px); }
}
