/* ============================
   Potter Poter Blog - Dark Tech Theme
   ============================ */

:root {
  --bg-primary: #0d0d0f;
  --bg-secondary: #13131a;
  --bg-card: #1a1a24;
  --bg-hover: #22223a;
  --accent: #7c3aed;
  --accent-light: #a855f7;
  --accent-glow: rgba(124, 58, 237, 0.3);
  --text-primary: #e8e8f0;
  --text-secondary: #9090b0;
  --text-muted: #5a5a7a;
  --border: #2a2a3d;
  --border-accent: #7c3aed;
  --tag-bg: #1e1e30;
  --code-bg: #12121c;
  --link: #a855f7;
  --link-hover: #c084fc;
  --nav-height: 64px;
  --radius: 12px;
  --radius-sm: 6px;
  --font-sans: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background grid ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(13,13,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  text-decoration: none;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

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

.nav-links a.active {
  color: var(--accent-light);
}

/* ── Layout ── */
.page {
  display: none;
  position: relative;
  z-index: 1;
}

.page.active {
  display: block;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 80px 24px 48px;
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, #e8e8f0 0%, #a855f7 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 auto 32px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat .num {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-light);
}

.hero-stat .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Section heading ── */
.section-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Post Cards ── */
.posts-grid {
  display: grid;
  gap: 20px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-light));
  opacity: 0;
  transition: var(--transition);
}

.post-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124,58,237,0.15);
}

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

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.post-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.post-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  transition: var(--transition);
}

.post-card:hover .post-card-title {
  color: var(--accent-light);
}

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

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

.post-card-readmore {
  font-size: 0.75rem;
  color: var(--accent-light);
  font-weight: 600;
  opacity: 0;
  transition: var(--transition);
}

.post-card:hover .post-card-readmore {
  opacity: 1;
}

/* ── Tags ── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tag:hover, .tag.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ── Tags Page ── */
.tags-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tag-cloud {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.tag-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.tag-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.tag-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 4px;
}

.tag-card-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Article Detail ── */
.article-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  margin-bottom: 24px;
  transition: var(--transition);
  text-decoration: none;
}

.article-back:hover {
  color: var(--accent-light);
}

.article-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #e8e8f0 30%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Markdown Content ── */
.markdown-body {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.8;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  font-weight: 700;
  line-height: 1.3;
  margin: 2em 0 0.75em;
  color: var(--text-primary);
}

.markdown-body h1 { font-size: 1.8rem; letter-spacing: -0.5px; }
.markdown-body h2 {
  font-size: 1.35rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  color: var(--accent-light);
}
.markdown-body h3 { font-size: 1.1rem; color: var(--text-primary); }
.markdown-body h4 { font-size: 0.95rem; color: var(--text-secondary); }

.markdown-body p { margin: 1em 0; }

.markdown-body a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: rgba(168,85,247,0.4);
  transition: var(--transition);
}

.markdown-body a:hover {
  color: var(--link-hover);
  text-decoration-color: var(--link-hover);
}

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: #c084fc;
}

.markdown-body pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 1.5em 0;
  position: relative;
}

.markdown-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: #c0c0e0;
}

.markdown-body blockquote {
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5em 0;
  color: var(--text-secondary);
}

.markdown-body ul, .markdown-body ol {
  padding-left: 1.5em;
  margin: 1em 0;
}

.markdown-body li { margin: 0.4em 0; }

.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.875rem;
}

.markdown-body th {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  color: var(--accent-light);
  font-weight: 600;
}

.markdown-body td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  color: var(--text-secondary);
}

.markdown-body tr:hover td {
  background: var(--bg-card);
}

.markdown-body img {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ── About Page ── */
.about-hero {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.about-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--bg-primary), 0 0 0 5px var(--border), 0 0 32px var(--accent-glow);
}

.about-info h1 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, #e8e8f0, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.about-info .tagline {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 16px;
}

.about-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.about-section {
  margin-bottom: 40px;
}

.about-section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-section p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.skill-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.skill-item:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ── Search ── */
.search-bar {
  position: relative;
  margin-bottom: 28px;
}

.search-bar input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px 12px 44px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: var(--transition);
}

.search-bar input::placeholder { color: var(--text-muted); }
.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.footer a {
  color: var(--accent-light);
  text-decoration: none;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.9rem; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero { padding: 48px 20px 32px; }
  .container, .container-narrow { padding: 32px 16px; }
  .nav-inner { padding: 0 16px; }
  .about-hero { gap: 24px; }
  .nav-links a { padding: 6px 8px; font-size: 0.8rem; }
}

/* ── Downloads Page ── */
.downloads-hero {
  text-align: center;
  padding: 60px 24px 48px;
  position: relative;
  z-index: 1;
}

.downloads-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #e8e8f0 0%, #a855f7 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 12px 0 12px;
}

.downloads-category {
  margin-bottom: 40px;
}

.downloads-category-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.downloads-category-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
}

.download-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(124,58,237,0.15);
}

.download-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.download-card:hover .download-card-icon {
  transform: scale(1.08);
}

.download-card-info {
  flex: 1;
  min-width: 0;
}

.download-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.download-card-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.download-card-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.download-card:hover .download-card-arrow {
  color: var(--accent-light);
  transform: translateX(3px);
}

/* ── Download jump button ── */
.download-card--jump {
  cursor: default;
}

.download-card--jump:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(124,58,237,0.15);
}

.download-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  text-decoration: none;
  flex-shrink: 0;
  transition: var(--transition);
  letter-spacing: 0.04em;
}

.download-jump-btn:hover {
  background: linear-gradient(135deg, #a855f7, #c084fc);
  box-shadow: 0 0 16px rgba(124,58,237,0.4);
  transform: scale(1.05);
  color: #fff;
}

/* ── Download version buttons ── */
.download-card--versions {
  cursor: default;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 24px;
}

.download-card--versions:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(124,58,237,0.15);
}

.download-version-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.download-version-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.download-version-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124,58,237,0.2);
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.page.active {
  animation: fadeInUp 0.3s ease;
}

.post-card {
  animation: fadeInUp 0.3s ease both;
}

.post-card:nth-child(2) { animation-delay: 0.05s; }
.post-card:nth-child(3) { animation-delay: 0.1s; }
.post-card:nth-child(4) { animation-delay: 0.15s; }
.post-card:nth-child(5) { animation-delay: 0.2s; }

/* ═══════════════════════════════════════════
     MUSIC PAGE
════════════════════════════════════════════ */
.music-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.music-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.music-row:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateX(3px);
}

.music-row.playing {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.music-row-index {
  width: 28px;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.music-row.playing .music-row-index { display: none; }

.music-eq {
  display: none;
  gap: 2px;
  align-items: flex-end;
  height: 16px;
  width: 28px;
  justify-content: center;
  flex-shrink: 0;
}

.music-row.playing .music-eq { display: flex; }

.music-eq span {
  width: 3px;
  background: var(--accent-light);
  border-radius: 2px;
  animation: eqBounce 0.9s ease infinite;
}

.music-eq span:nth-child(1) { animation-delay: 0s; }
.music-eq span:nth-child(2) { animation-delay: 0.2s; }
.music-eq span:nth-child(3) { animation-delay: 0.4s; }
.music-eq span:nth-child(4) { animation-delay: 0.6s; }

@keyframes eqBounce {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

.music-row-info {
  flex: 1;
  min-width: 0;
}

.music-row-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-row.playing .music-row-title { color: var(--accent-light); }

.music-row-artist {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-row-ext {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  background: var(--tag-bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.music-row-play {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.music-row:hover .music-row-play { color: var(--accent-light); }

/* ── Lyrics ── */
.music-lyrics-panel { margin-bottom: 32px; }

.music-lyrics {
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 2.1;
  text-align: center;
  scroll-behavior: smooth;
}

.music-lyric-line { transition: all 0.25s ease; padding: 2px 0; }

.music-lyric-line.active {
  color: var(--accent-light);
  font-weight: 700;
  transform: scale(1.03);
}

/* ═══════════════════════════════════════════
     BOTTOM PLAYER BAR
════════════════════════════════════════════ */
.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: rgba(19, 19, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}

body.light-mode .player-bar { background: rgba(255, 255, 255, 0.92); }

.player-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

body.has-player { padding-bottom: 80px; }

.player-disc {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 0 16px var(--accent-glow);
}

.player-disc.spinning { animation: discSpin 4s linear infinite; }

@keyframes discSpin { to { transform: rotate(360deg); } }

.player-info {
  width: 150px;
  min-width: 0;
  flex-shrink: 0;
}

.player-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.player-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: var(--transition);
  line-height: 1;
}

.player-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.player-btn--main {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  padding: 0;
}

.player-btn--main:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
}

.player-progress {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.player-time {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.player-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  transition: height 0.15s ease;
}

.player-progress-bar:hover { height: 6px; }

.player-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  border-radius: 999px;
  position: relative;
}

.player-progress-fill::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-light);
  opacity: 0;
  transition: opacity 0.2s;
}

.player-progress-bar:hover .player-progress-fill::after { opacity: 1; }

.player-extras {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.player-volume {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.player-volume input[type="range"] {
  width: 70px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ═══════════════════════════════════════════
     THEME TOGGLE FAB（浅色/深色切换悬浮球）
════════════════════════════════════════════ */
.theme-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.theme-fab:hover {
  border-color: var(--accent);
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 4px 20px var(--accent-glow);
}

body.has-player .theme-fab { bottom: 96px; }

/* ═══════════════════════════════════════════
     LIGHT THEME（浅色主题覆盖）
════════════════════════════════════════════ */
body.light-mode {
  --bg-primary: #f6f6fa;
  --bg-secondary: #ededf3;
  --bg-card: #ffffff;
  --bg-hover: #efeaf9;
  --accent-glow: rgba(124, 58, 237, 0.14);
  --text-primary: #1a1a24;
  --text-secondary: #55556e;
  --text-muted: #8a8aa5;
  --border: #e3e3ee;
  --tag-bg: #ece8f8;
  --code-bg: #f3f3f8;
  --link: #7c3aed;
  --link-hover: #6d28d9;
}

body.light-mode::before {
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.05) 1px, transparent 1px);
}

body.light-mode .nav { background: rgba(246, 246, 250, 0.85); }

body.light-mode .hero h1,
body.light-mode .downloads-hero h1 {
  background: linear-gradient(135deg, #2a2a3d 0%, #7c3aed 50%, #4f46e5 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

body.light-mode .article-title {
  background: linear-gradient(135deg, #2a2a3d 30%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

body.light-mode .about-info h1 {
  background: linear-gradient(135deg, #2a2a3d, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
}

body.light-mode .markdown-body code { color: #6d28d9; }
body.light-mode .markdown-body pre code { color: #38385a; }
body.light-mode .theme-fab { box-shadow: 0 4px 16px rgba(100, 100, 140, 0.2); }

/* ── Player bar responsive ── */
@media (max-width: 768px) {
  .player-bar-inner { padding: 8px 12px; gap: 10px; }
  .player-info { width: 100px; }
  .player-volume { display: none; }
  .player-artist { display: none; }
  .player-extras .player-btn { font-size: 0.9rem; }
}
