:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-hover: #f0f2f5;
  --border: #e5e7eb;
  --text: #1a1a1a;
  --text-muted: #666666;
  --text-dim: #999999;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-dim: #dbeafe;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
}

/* === 暗色模式 === */
[data-theme="dark"] {
  --bg: #1a1b2e;
  --surface: #252740;
  --surface-hover: #2f3150;
  --border: #3a3d5c;
  --text: #e4e4f0;
  --text-muted: #a0a0b8;
  --text-dim: #6a6a80;
  --accent: #6c8aff;
  --accent-hover: #8aa4ff;
  --accent-dim: #2a3055;
  --danger: #ff6b6b;
  --success: #4ecdc4;
  --warning: #ffd93d;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* === Hero Section — 紧凑横向布局 === */
.hero-section {
  background: linear-gradient(180deg, #eff6ff 0%, #f5f7fa 100%);
  padding: 60px 20px 22px;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.hero-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(37,99,235,0.12);
  transition: opacity .2s;
  cursor: pointer;
}
.hero-avatar:hover { opacity: 0.85; }

.hero-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.hero-right {
  flex: 1;
  min-width: 0;
}

.hero-bio {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
  max-width: 460px;
}

.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-btn {
  padding: 7px 18px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .2s;
  font-family: inherit;
}

.hero-btn-primary {
  background: var(--accent);
  color: #fff;
}
.hero-btn-primary:hover { background: var(--accent-hover); }

.hero-btn-outline {
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.hero-btn-outline:hover { background: var(--accent-dim); }

/* Hero 日期 + 时间小插件（单行） */
.hero-widget {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  margin-top: 4px;
}

.hero-widget-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}
.hero-widget-time {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

/* Mobile hero */
@media (max-width: 640px) {
  .hero-section { padding: 18px 14px; }
  .hero-inner { flex-wrap: wrap; justify-content: center; text-align: center; gap: 12px; }
  .hero-right { order: 2; }
  .hero-left { order: 1; }
  .hero-widget { justify-content: center; }
  .hero-bio { margin-bottom: 8px; font-size: 12px; }
  .hero-actions { justify-content: center; }
  .hero-avatar { width: 56px; height: 56px; }
}

/* === Navigator Header === */
.nav-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.nav-search {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  max-width: 340px;
}

.search-engine-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  background: var(--bg);
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}
.search-engine-btn:hover { background: var(--surface-hover); }
.search-engine-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.search-engine-dropdown {
  display: none;
  position: absolute;
  top: 38px;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 100;
  min-width: 160px;
  overflow: hidden;
}
.search-engine-dropdown.active { display: block; }

.search-engine-item {
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  transition: background .15s;
  white-space: nowrap;
}
.search-engine-item:hover { background: var(--bg); }
.search-engine-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.search-engine-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}

.nav-search input {
  width: 100%;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  transition: border-color .2s;
}
.nav-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.nav-actions { display: flex; gap: 8px; }

.nav-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  transition: all .2s;
  white-space: nowrap;
  font-family: inherit;
}
.nav-btn:hover { background: var(--bg); border-color: var(--accent); color: var(--accent); }
.nav-btn.fav-active { background: #fef3c7; border-color: #f59e0b; color: #92400e; }

/* === Navigator Body === */
.nav-body {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  min-height: 60vh;
  padding: 0 20px;
}

.nav-sidebar {
  width: 150px;
  flex-shrink: 0;
  padding: 20px 12px 20px 0;
}

.nav-sidebar-title {
  font-size: 12px;
  color: var(--text-dim);
  padding: 0 10px 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-cat-item {
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-cat-item:hover { background: var(--bg); color: var(--text); }
.nav-cat-item.active { background: var(--accent); color: #fff; }
.nav-cat-count { font-size: 11px; opacity: 0.7; }

.nav-main {
  flex: 1;
  padding: 20px 0;
}

/* Site grid */
.site-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.site-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
}
.site-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.site-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}
.site-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  background: #fff;
}

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

.site-card-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.site-card-desc {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-card-fav {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  opacity: 0.3;
  transition: opacity .2s;
  flex-shrink: 0;
  color: var(--text-muted);
}
.site-card-fav:hover, .site-card-fav.active { opacity: 1; color: #f59e0b; }

/* Empty state */
.nav-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-dim);
  font-size: 14px;
}

/* === Footer === */
.site-footer {
  text-align: center;
  padding: 30px 20px 40px;
  color: var(--text-dim);
  font-size: 13px;
}
.site-footer .dot {
  display: inline-block;
  cursor: pointer;
  transition: color 0.15s;
}
.site-footer .dot:hover { color: var(--text-muted); }

/* === Auth pages (setup & login) === */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.auth-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-dim);
}

.form-group .hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  text-align: center;
}

.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-block {
  width: 100%;
}

.btn-secondary {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.form-error {
  background: rgba(255, 92, 92, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
}

.form-success {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
}

/* === Dashboard === */
.dash-page {
  min-height: 100vh;
}

.dash-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.dash-header h1 {
  font-size: 18px;
  font-weight: 500;
}

.dash-header .actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.role-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
}

.role-badge.admin {
  background: rgba(255, 167, 38, 0.15);
  color: var(--warning);
}

.dash-body {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px;
}

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

.dash-section-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent-dim);
  background: var(--surface);
}

.upload-zone p {
  color: var(--text-muted);
  font-size: 14px;
}

.upload-zone .upload-icon {
  font-size: 32px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

/* File list */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.file-item:hover {
  border-color: var(--accent-dim);
}

.file-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

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

.file-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.file-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.empty-state p {
  font-size: 14px;
}

/* Preview modal content */
.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 500;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

.modal-body {
  padding: 20px;
  overflow: auto;
  flex: 1;
}

.preview-text {
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  background: var(--bg);
  padding: 16px;
  border-radius: var(--radius-sm);
}

.preview-image {
  max-width: 100%;
  max-height: 60vh;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

/* Settings section */
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.settings-card .form-group:last-child {
  margin-bottom: 0;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ── 留言条目 ── */
.message-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--card);
}
.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.message-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.message-time {
  font-size: 12px;
  color: var(--text-dim);
}
.message-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.message-body {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 6px;
  white-space: pre-wrap;
  word-break: break-all;
}
.message-reply {
  background: var(--surface);
  border-left: 3px solid var(--primary);
  padding: 8px 10px;
  margin-top: 6px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
}
.reply-label {
  font-weight: 600;
  color: var(--primary);
  font-size: 12px;
  margin-bottom: 2px;
}
.reply-time {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}
.message-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

/* ── 首页留言框 ── */
.home-message-box {
  margin: 24px 0 12px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
}
.home-message-box h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}
.home-message-box input,
.home-message-box textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
  transition: border-color .15s;
}
.home-message-box input:focus,
.home-message-box textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 2px rgba(108,138,255,0.12);
}
.home-message-box textarea {
  resize: vertical;
}
/* 留言可见性选择 */
.msg-visibility-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.msg-visibility-row label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}
.msg-visibility-row input[type="radio"] {
  accent-color: var(--accent);
}

/* ── 公开留言列表 ── */
.public-messages-section {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  width: 100%;
  max-width: 520px;
}
.public-messages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.public-messages-header h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.public-messages-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 13px;
  color: var(--accent);
  user-select: none;
  background: none;
  border: none;
  padding: 3px 8px;
  border-radius: 4px;
  transition: background .15s;
}
.public-messages-toggle:hover {
  background: var(--surface-hover);
}
.public-messages-list {
  display: none;
}
.public-messages-list.show {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.public-msg-item {
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.public-msg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.public-msg-name {
  font-weight: 600;
  color: var(--accent);
  font-size: 14px;
}
.public-msg-time {
  font-size: 11px;
  color: var(--text-dim);
}
.public-msg-body {
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 6px;
}
.public-msg-reply {
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  font-size: 12px;
}
.public-msg-reply-label {
  font-weight: 600;
  color: var(--accent);
  font-size: 11px;
  margin-bottom: 2px;
}

/* Responsive */
@media (max-width: 640px) {
  .auth-card { padding: 28px 20px; }
  .dash-header { padding: 12px 16px; }
  .dash-header h1 { font-size: 16px; }
  .dash-body { padding: 20px 16px; }
  .file-item { flex-wrap: wrap; }
  .file-actions { width: 100%; justify-content: flex-end; }
  .home-bio { font-size: 14px; }
  .upload-zone { padding: 20px; }
}

/* === File stats bar === */
.file-stats-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--accent-dim, rgba(37,99,235,0.06));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  font-size: 13px;
  color: var(--text);
}
.file-stats-bar .stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.file-stats-bar .stat-label { color: var(--text-dim); }
.file-stats-bar .stat-value { font-weight: 600; color: var(--accent); }

/* File toolbar (search + sort) */
.file-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 180px;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--accent-dim);
}

.sort-select {
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.sort-select:focus {
  border-color: var(--accent-dim);
}

/* 文件元信息扩展 */
.file-meta span {
  margin-right: 12px;
}

.file-dl-count {
  color: var(--accent);
}

@media (max-width: 640px) {
  .file-stats-bar { flex-direction: column; gap: 4px; font-size: 12px; }
  .file-toolbar {
    flex-direction: column;
  }
  .search-input {
    min-width: 0;
  }
}

/* 文件夹面包屑 */
.folder-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb-item {
  cursor: pointer;
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
}

.breadcrumb-item:hover {
  background: var(--accent-dim);
}

.breadcrumb-item.active {
  color: var(--text);
  cursor: default;
  background: none;
}

.breadcrumb-item.clickable:hover {
  text-decoration: underline;
}

/* 上传区域文件夹信息 */
.upload-folder-info {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-dim);
}

.breadcrumb-sep {
  color: var(--text-dim);
}

/* 上传区域文件夹信息 */
.upload-folder-info {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

/* 文件夹选择弹窗 */
.folder-picker-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.folder-picker-modal.show {
  display: flex;
}

.folder-picker-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 320px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.folder-picker-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.folder-picker-list {
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.folder-picker-item {
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.folder-picker-item:hover {
  background: var(--bg);
}

.folder-picker-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.folder-picker-new {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.folder-picker-new input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

.folder-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* 弹窗内面包屑导航 */
.picker-crumb {
  font-size: 13px;
  cursor: default;
}
.picker-crumb.active {
  color: var(--text);
  font-weight: 600;
}
.picker-crumb.clickable {
  color: var(--accent);
  cursor: pointer;
  transition: color 0.15s;
}
.picker-crumb.clickable:hover {
  color: var(--accent-light, #7dd3fc);
  text-decoration: underline;
}
.picker-crumb-sep {
  margin: 0 4px;
  color: var(--text-dim);
}

/* 当前路径标签 */
.picker-path-label {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--accent);
  background: rgba(99,102,241,0.08);
  border-bottom: 1px solid var(--border);
}

/* 标题操作按钮组 */
.title-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 文件夹项样式 */
.folder-item {
  border-left: 3px solid var(--accent) !important;
  background: var(--bg) !important;
}

.folder-item:hover {
  background: var(--surface) !important;
}

/* === Favorites Sidebar === */
.fav-sidebar {
  position: fixed;
  top: 0; right: -320px;
  width: 320px; height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 200;
  transition: right .2s;
  display: flex; flex-direction: column;
}
.fav-sidebar.active { right: 0; }

.fav-sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.fav-sidebar-header h3 { font-size: 15px; }

.fav-sidebar-close {
  width: 28px; height: 28px;
  border: none; background: var(--bg);
  border-radius: 6px; font-size: 18px; cursor: pointer;
  color: var(--text-muted);
}

.fav-sidebar-body {
  flex: 1; overflow-y: auto; padding: 12px;
}

.fav-sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px; cursor: pointer;
  transition: background .15s;
}
.fav-sidebar-item:hover { background: var(--bg); }
.fav-sidebar-item .fav-remove {
  background: none; border: none; font-size: 16px;
  cursor: pointer; opacity: 0.4; padding: 0;
}
.fav-sidebar-item .fav-remove:hover { opacity: 1; color: #ef4444; }

/* === 图标 Fallback === */
.site-icon-wrap {
  position: relative; display: inline-block;
  width: 32px; height: 32px; border-radius: 6px;
  overflow: hidden; flex-shrink: 0;
  background: var(--accent-dim);
}
.site-icon-img { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 1; }
.site-icon-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: var(--accent); z-index: 0;
}
.site-icon-img[src] { z-index: 2; background: #fff; }

/* === Modal (通用弹窗) === */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200; display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal-box {
  background: var(--surface);
  border-radius: 12px;
  max-width: 480px; width: 100%;
  max-height: 80vh; overflow-y: auto;
  position: relative; padding: 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.modal-close-btn {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px;
  border: none; background: var(--bg);
  border-radius: 6px; font-size: 18px; cursor: pointer;
  color: var(--text-muted);
}

/* === Admin Panel === */
.admin-panel-overlay {
  position: fixed; inset: 0; z-index: 400; display: none;
}
.admin-panel-overlay.active { display: block; }

.admin-panel-bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4);
}

.admin-panel-box {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 90%; max-width: 1000px; max-height: 85vh;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.admin-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.admin-panel-header h2 { font-size: 16px; }

.admin-panel-body { display: flex; flex: 1; overflow: hidden; }

.admin-sidebar {
  width: 180px;
  border-right: 1px solid var(--border);
  padding: 12px; overflow-y: auto;
}
.admin-sidebar h3 { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }

.admin-cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border-radius: 6px;
  cursor: pointer; font-size: 13px; margin-bottom: 2px;
  color: var(--text-muted);
}
.admin-cat-item:hover { background: var(--bg); }
.admin-cat-item.active { background: var(--accent); color: #fff; }
.admin-cat-item .cat-count { font-size: 11px; opacity: 0.7; }
.admin-cat-item .cat-actions { display: none; gap: 4px; margin-left: 6px; }
.admin-cat-item:hover .cat-actions { display: flex; }
.cat-actions button {
  background: none; border: none; cursor: pointer;
  font-size: 12px; padding: 2px 4px; border-radius: 4px; opacity: 0.6;
}
.cat-actions button:hover { opacity: 1; background: rgba(0,0,0,0.08); }

.admin-main { flex: 1; padding: 16px; overflow-y: auto; }

.admin-toolbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

.admin-result-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 14px;
}

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td {
  padding: 9px 8px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table th { background: var(--bg); color: var(--text-muted); font-weight: 500; }
.admin-table tr:hover td { background: var(--bg); }

.admin-table-actions { display: flex; gap: 6px; }
.admin-table-actions button {
  padding: 4px 10px; border: 1px solid var(--border);
  border-radius: 4px; background: none; font-size: 12px; cursor: pointer;
  color: var(--text-muted);
}
.admin-table-actions button:hover { border-color: var(--accent); color: var(--accent); }
.admin-table-actions .del:hover { border-color: #ef4444; color: #ef4444; }

/* Admin table checkbox column */
.admin-table th.cb-col, .admin-table td.cb-col { width: 40px; min-width: 40px; text-align: center; padding: 9px 4px; }
.admin-table input[type="checkbox"].cb-row { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
.admin-table tr.selected-row { background: var(--accent-dim, rgba(37,99,235,0.05)); }
.admin-table tr.selected-row:hover td { background: var(--accent-dim, rgba(37,99,235,0.08)); }

/* Admin bulk action bar */
#adminBulkBar .bulk-bar-left { display: flex; align-items: center; gap: 12px; }

/* Admin inline form */
.admin-inline-form {
  display: none; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; margin-bottom: 14px;
}
.admin-inline-form.active { display: block; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 13px; color: var(--text-muted); }
.form-group input, .form-group select {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; font-family: inherit;
  background: var(--surface); color: var(--text);
}
.form-group input:focus, .form-group select:focus {
  outline: none; border-color: var(--accent);
}

.form-row { display: flex; gap: 12px; margin-bottom: 14px; }
.form-row .form-group { flex: 1; margin-bottom: 0; }

.form-actions { display: flex; gap: 8px; margin-top: 12px; }

/* === Password modal === */
.pwd-input {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit;
  text-align: center; letter-spacing: 2px;
}
.pwd-input:focus { outline: none; border-color: var(--accent); }

/* === Music Player === */
/* ══════════════════════════════════════════
   音乐播放器 — 顶部紧凑胶囊小窗
   ══════════════════════════════════════════ */

.music-player {
  display: inline-flex;
  flex-shrink: 0;
}
.music-mini-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 18px;
  transition: all 0.2s;
  cursor: default;
}
.music-mini-bar:hover {
  border-color: var(--accent-hover);
}

/* ── 按钮（通用） ── */
.music-mini-bar .music-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
  user-select: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.music-mini-bar .music-btn:hover {
  color: var(--accent);
  background: var(--surface-hover);
}

.music-mini-bar .music-btn.active {
  color: var(--accent);
}

.music-mini-bar .music-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/* 播放按钮略大 */
.music-mini-bar .music-btn-play {
  width: 34px;
  height: 34px;
  font-size: 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

.music-mini-bar .music-btn-play:hover {
  background: color-mix(in srgb, var(--accent) 25%, transparent);
}

.music-mini-bar .music-btn-play.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ── 曲目信息区域（中间） ── */
.music-track-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 4px;
}

.music-station {
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* ── 进度条 ── */
.music-progress {
  width: 100%;
  height: 3px;
  background: color-mix(in srgb, var(--border) 50%, transparent);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  transition: height 0.15s;
}

.music-progress:hover {
  height: 5px;
}

.music-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s linear;
}

/* ── 时间 ── */
.music-time {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 34px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ── 音量 ── */
.music-volume {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.music-vol-icon {
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.music-volume input[type="range"] {
  width: 56px;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: color-mix(in srgb, var(--border) 50%, transparent);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.music-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.music-volume input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* ── 播放清单弹窗（从顶部下方弹出） ── */
.playlist-panel {
  position: fixed;
  top: 60px;
  right: 12px;
  width: 280px;
  max-height: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  z-index: 110;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.playlist-panel.show {
  display: flex;
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.playlist-close {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.playlist-close:hover { color: var(--accent); }

.playlist-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.playlist-item {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.playlist-item.active {
  color: var(--accent);
  background: var(--accent-dim);
  font-weight: 500;
}

/* ── 移除旧的底部留白 ── */
.home-page {
  padding-bottom: 40px !important;
}

/* ── 小屏适配 ── */
@media (max-width: 640px) {
  .music-player {
    top: 6px;
    width: calc(100% - 12px);
    max-width: none;
  }

  .music-mini-bar {
    padding: 5px 8px;
    gap: 3px;
    border-radius: 22px;
  }

  .music-mini-bar .music-btn {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .music-mini-bar .music-btn-play {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .music-station {
    font-size: 10px;
  }

  .music-time {
    font-size: 9px;
    min-width: 28px;
  }

  .music-volume input[type="range"] {
    width: 40px;
  }

  .music-vol-icon {
    font-size: 10px;
  }

  .playlist-panel {
    top: 52px;
    right: 6px;
    left: 6px;
    width: auto;
    max-height: 280px;
  }
}

/* 音乐上传区域（dashboard） */
.music-upload-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.music-upload-area {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.music-upload-area input[type="file"] {
  flex: 1;
  font-size: 14px;
}

.music-list {
  margin-top: 16px;
}

.music-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.music-list-item .music-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 12px;
}

.music-list-item .btn-delete {
  background: none;
  border: 1px solid var(--danger, #ef4444);
  color: var(--danger, #ef4444);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
}

.music-list-item .btn-delete:hover {
  background: var(--danger, #ef4444);
  color: #fff;
}

/* ── Tab 切换 ── */
.dash-tabs {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.dash-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.dash-tab:hover {
  color: var(--text);
}

.dash-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── 音乐卡片网格 ── */
.music-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  padding: 8px 0;
}

.music-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.music-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.music-card-icon {
  font-size: 36px;
  line-height: 1;
}

.music-card-info {
  text-align: center;
  width: 100%;
  min-width: 0;
}

.music-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-card-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.music-card-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.music-card-delete:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* ── 音乐上传区域 ── */
.music-upload-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.music-upload-area input[type="file"] {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}

/* ── 文件夹卡片布局（图标 + 信息 + 操作按钮 横向排列）── */
.file-item.folder-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.file-item.folder-item .file-icon {
  flex-shrink: 0;
  width: 40px;
  text-align: center;
  cursor: pointer;
}
.file-item.folder-item .file-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.file-item.folder-item .file-actions {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
}

/* ── Textarea ── */
textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  box-sizing: border-box;
  background: var(--card);
  color: var(--text);
  transition: border-color .15s;
}
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}

/* ── 留言条目 ── */
.message-item {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--card);
}
.message-meta {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.message-content {
  font-size: 13px;
  white-space: pre-wrap;

/* ── 分页组件 ── */
.pagination {
  margin-top: 64px;
  padding: 32px 0 20px;
  text-align: center;
}

.pagination-inner {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  margin: 0 4px;
  color: var(--text-muted);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  user-select: none;
  border-radius: 6px;
}
.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
  color: var(--text-dim);
  font-size: 15px;
  user-select: none;
}
.page-btn:hover:not(.disabled):not(.active) {
  color: #fff;
  background: var(--accent);
}
.page-btn.active {
  color: var(--accent);
  font-weight: 700;
  cursor: default;
}
.page-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-info {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ══════════════════════════════════════════
   暗色模式 — 硬编码颜色覆盖
   ══════════════════════════════════════════ */
[data-theme="dark"] .hero-section {
  background: linear-gradient(180deg, #1e2040 0%, #111220 100%) !important;
  border-bottom-color: var(--border);
}
[data-theme="dark"] .hero-avatar {
  border-color: #2a2c4a;
  box-shadow: 0 2px 10px rgba(108,138,255,0.15);
}
[data-theme="dark"] .hero-name {
  color: #e4e4f0;
}
[data-theme="dark"] .hero-bio {
  color: #a0a0b8;
}
[data-theme="dark"] .hero-widget {
  color: #a0a0b8;
}
[data-theme="dark"] .hero-section .nav-toggle {
  color: #e4e4f0;
}
[data-theme="dark"] .hero-btn-outline {
  background: rgba(30,32,48,0.6);
  border-color: #3a3c5a;
  color: #a0a8d0;
}
[data-theme="dark"] .hero-btn-outline:hover {
  background: rgba(50,52,78,0.8);
  border-color: var(--accent);
  color: var(--accent);
}
[data-theme="dark"] .site-card:hover {
  box-shadow: 0 4px 16px rgba(108,138,255,0.08);
}
[data-theme="dark"] .site-icon-img[src] {
  background: var(--surface);
}
[data-theme="dark"] .site-icon-wrap {
  background: var(--accent-dim);
}
[data-theme="dark"] .nav-cat-item.active {
  color: #fff;
}
[data-theme="dark"] .admin-cat-item.active {
  color: #fff;
}
[data-theme="dark"] .music-mini-bar {
  background: rgba(30,32,48,0.6);
  border-color: #2a2c4a;
}
[data-theme="dark"] .music-mini-bar:hover {
  border-color: #3a3c5a;
}
[data-theme="dark"] .music-mini-bar .music-btn {
  color: #a0a8d0;
}
[data-theme="dark"] .music-mini-bar .music-btn:hover {
  color: var(--accent);
  background: rgba(108,138,255,0.12);
}
[data-theme="dark"] .music-mini-bar .music-btn-play {
  color: #e4e4f0;
  background: rgba(108,138,255,0.12);
  border-color: rgba(108,138,255,0.25);
}
[data-theme="dark"] .music-mini-bar .music-btn-play:hover {
  background: rgba(108,138,255,0.22);
}
[data-theme="dark"] .music-station {
  color: #a0a8d0;
}
[data-theme="dark"] .page-btn:hover:not(.disabled):not(.active) {
  color: #fff;
  background: var(--accent);
}
[data-theme="dark"] .search-engine-dropdown {
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
[data-theme="dark"] .playlist-panel {
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
[data-theme="dark"] .modal-box {
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
[data-theme="dark"] .admin-panel-box {
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
[data-theme="dark"] .hero-btn-primary {
  color: #fff;
}
[data-theme="dark"] .btn {
  color: #fff;
}

/* ── 批量操作栏 ── */
.bulk-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.bulk-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bulk-bar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bulk-select-all {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  user-select: none;
}

.bulk-select-all input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.selection-count {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

/* 文件复选框 */
.file-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

/* 确保文件项横向排列 */
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.file-item .file-info {
  flex: 1;
  min-width: 0;
}
.file-item .file-actions {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
}

@media (max-width: 640px) {
  .bulk-action-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .bulk-bar-actions {
    width: 100%;
  }
  .bulk-bar-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 6px 8px;
  }
}
/* v6 */