/* ===================================
   船长动态谱 - 全局样式
   =================================== */

:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --primary-dark: #4a3ab0;
  --accent: #fd79a8;
  --danger: #d63031;
  --success: #00b894;
  --warning: #fdcb6e;
  --info: #0984e3;
  --bg: #f8f9fa;
  --bg-card: #ffffff;
  --text: #2d3436;
  --text-muted: #636e72;
  --border: #dee2e6;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --navbar-height: 56px;
  --drawer-width: 280px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

.hidden { display: none !important; }

/* ===================================
   导航栏（响应式，桌面 + 手机共用）
   =================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 200;
  box-shadow: var(--shadow);
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 24px;
}

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: rgba(108, 92, 231, 0.08);
}

.navbar-left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 桌面端用户菜单按钮 */
.user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  transition: all 0.2s;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.user-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.dropdown-caret {
  font-size: 11px;
  opacity: 0.6;
}

.user-menu {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 168px;
  overflow: hidden;
  z-index: 300;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  color: var(--text);
  font-size: 14px;
  transition: background 0.15s;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--bg);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ── 汉堡菜单按钮（手机端可见） ── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 8px;
  transition: border-color 0.2s;
}

.hamburger-btn:hover {
  border-color: var(--primary);
}

.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}

.hamburger-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── 抽屉蒙层 ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── 侧边抽屉 ── */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--drawer-width);
  background: var(--bg-card);
  z-index: 500;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.drawer.open {
  transform: translateX(0);
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.drawer-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-avatar {
  font-size: 28px;
  line-height: 1;
}

.drawer-username {
  font-size: 16px;
  font-weight: 700;
}

.drawer-role {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.drawer-close:hover {
  background: rgba(255,255,255,0.35);
}

.drawer-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.15s;
  margin-bottom: 2px;
}

.drawer-nav-item:hover {
  background: rgba(108,92,231,0.08);
  color: var(--primary);
}

.drawer-nav-item.active {
  background: rgba(108,92,231,0.1);
  color: var(--primary);
  font-weight: 600;
}

.drawer-footer {
  padding: 16px 16px 32px;
  border-top: 1px solid var(--border);
}

.drawer-logout-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(214,48,49,0.06);
  color: var(--danger);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  transition: background 0.15s;
  border: 1px solid rgba(214,48,49,0.15);
}

.drawer-logout-btn:hover {
  background: rgba(214,48,49,0.12);
}

/* ===================================
   主内容区
   =================================== */

/* #app 使用 flex 列布局，让页脚自动贴到内容底部 */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  padding-top: var(--navbar-height);
  flex: 1; /* 撑开剩余空间，将页脚推到最底 */
}

/* ===================================
   页脚
   =================================== */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  padding: 10px 20px;
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: var(--text-muted);
  justify-content: center;
}

.footer-brand {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.footer-divider {
  color: var(--border);
  user-select: none;
}

.footer-copy {
  white-space: nowrap;
}

.footer-link {
  color: var(--text-muted);
  transition: color 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-link:hover {
  color: var(--primary);
}

.footer-beian-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}



.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
}

/* ===================================
   卡片
   =================================== */

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ===================================
   按钮
   =================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: #b02626;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg);
  color: var(--text);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 13px;
}

/* 收藏心形按钮：与 .btn-sm 等高，纯图标方形
   padding 与 .btn-sm 一致（5px 12px），宽度自动对齐 */
.fav-btn {
  padding: 5px 10px;      /* 稍窄以便视觉上变方形 */
  font-size: 15px;
  background: var(--bg);
  color: var(--text-muted);
  border-color: var(--border);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.fav-btn:hover:not(:disabled) {
  border-color: #e05252;
  color: #e05252;
}

.fav-btn.faved {
  background: #fff0f0;
  color: #e05252;
  border-color: #e05252;
}

.fav-btn.faved:hover:not(:disabled) {
  background: #ffe0e0;
}



.btn-lg {
  padding: 12px 28px;
  font-size: 16px;
  border-radius: var(--radius);
}

.btn-block {
  width: 100%;
}

.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 6px;
}

/* ===================================
   表单
   =================================== */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.2s;
  font-size: 14px;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12);
}

.form-control.error {
  border-color: var(--danger);
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 密码强度条 */
.password-strength {
  margin-top: 6px;
  display: flex;
  gap: 4px;
}

.strength-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}

.strength-bar.weak { background: var(--danger); }
.strength-bar.medium { background: var(--warning); }
.strength-bar.strong { background: var(--success); }

/* ===================================
   表格
   =================================== */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }

.table tr:hover td { background: rgba(108,92,231,0.03); }

/* ===================================
   标签 / 徽章
   =================================== */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-primary { background: rgba(108,92,231,0.12); color: var(--primary); }
.badge-success { background: rgba(0,184,148,0.12); color: var(--success); }
.badge-warning { background: rgba(253,203,110,0.2); color: #b7780a; }
.badge-danger  { background: rgba(214,48,49,0.12); color: var(--danger); }
.badge-muted   { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* ===================================
   弹窗（Modal）
   =================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.2s;
}

.modal-lg {
  max-width: 720px;
}

.modal-header {
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--text);
}

.modal-body {
  padding: 24px 28px;
}

.modal-footer {
  padding: 18px 28px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Modal 内 form-row 样式 */
.modal-body .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.modal-body .form-row:last-child {
  margin-bottom: 0;
}
.modal-body .form-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.modal-body .form-row .input,
.modal-body .form-row input,
.modal-body .form-row select,
.modal-body .form-row textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.modal-body .form-row .input:focus,
.modal-body .form-row input:focus,
.modal-body .form-row select:focus,
.modal-body .form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.modal-body .form-row .form-error {
  font-size: 12px;
  color: var(--danger, #e53e3e);
  min-height: 16px;
}

/* 两列 grid 布局（用于表单字段较多时） */
.modal-body .form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.modal-body .form-grid-2col .form-row-full {
  grid-column: 1 / -1;
}

/* ===================================
   Toast 通知
   =================================== */

#toast-container {
  position: fixed;
  top: 76px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  font-size: 14px;
  pointer-events: all;
  animation: slideInRight 0.25s ease forwards;
  max-width: 320px;
  min-width: 200px;
  cursor: pointer;
}

.toast.toast-hide {
  animation: slideOutRight 0.28s ease forwards;
}

.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info    { border-left-color: var(--info); }

.toast-icon { font-size: 16px; }
.toast-text { flex: 1; }

/* ===================================
   歌曲列表
   =================================== */

.song-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.song-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  background: var(--bg-card);
}

.song-item:last-child {
  border-bottom: none;
}

.song-item:hover {
  background: rgba(108,92,231,0.03);
}

.song-info {
  flex: 1;
  min-width: 0;
}

.song-title {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.song-artist {
  color: var(--text-muted);
  font-size: 13px;
}

.song-uploader {
  color: var(--text-muted);
  font-size: 12px;
}

.song-time {
  color: var(--text-muted);
  font-size: 12px;
}

.song-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

/* ===================================
   空状态
   =================================== */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  opacity: 0.5;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 14px;
  margin-bottom: 20px;
}

/* ===================================
   加载状态
   =================================== */

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.load-more {
  text-align: center;
  padding: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.load-more-spinner {
  display: flex;
  justify-content: center;
  padding: 14px 0;
}

/* ===================================
   标签页 Tab
   =================================== */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  cursor: pointer;
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab:hover:not(.active) {
  color: var(--text);
}

/* ===================================
   文件上传
   =================================== */

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(108,92,231,0.04);
}

.upload-zone .zone-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.upload-zone .zone-text {
  font-size: 14px;
  color: var(--text-muted);
}

.upload-zone .zone-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.file-chosen {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 进度条 */
.progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s;
}

/* ===================================
   等级徽章
   =================================== */

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.level-1 { background: #e0e0e0; color: #555; }
.level-2 { background: #bbf0d6; color: #166534; }
.level-3 { background: #bfdbfe; color: #1e40af; }
.level-4 { background: #ede9fe; color: #5b21b6; }
.level-5 { background: linear-gradient(135deg, #ffd700, #ffa500); color: #7c4700; }
.level-admin { background: #fee2e2; color: #991b1b; }

/* ===================================
   收藏限额进度
   =================================== */

.fav-quota {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
}

.fav-quota.warn {
  background: rgba(253,203,110,0.15);
  color: #b7780a;
}

.fav-quota.full {
  background: rgba(214,48,49,0.08);
  color: var(--danger);
}

/* ===================================
   分页
   =================================== */

.load-more-btn {
  display: block;
  width: 100%;
  padding: 14px;
  text-align: center;
  color: var(--primary);
  font-size: 14px;
  background: transparent;
  border-top: 1px solid var(--border);
  transition: background 0.15s;
}

.load-more-btn:hover {
  background: rgba(108,92,231,0.04);
}

/* ===================================
   搜索框
   =================================== */

.search-bar {
  position: relative;
  margin-bottom: 20px;
}

.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.search-bar input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  transition: border-color 0.2s;
  background: var(--bg-card);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,92,231,0.12);
}

/* ===================================
   播放页样式
   =================================== */

.player-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding-top: 0;
}

.player-topbar {
  height: var(--navbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

/* PDF 缩放控件条（播放页、编辑页共用） */
.pdf-zoom-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
}

.pdf-zoom-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.pdf-zoom-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 38px;
  text-align: center;
  user-select: none;
}

.pdf-zoom-fit {
  font-size: 12px;
  padding: 0 8px;
  height: 28px;
  white-space: nowrap;
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-song-title {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 13px;
  color: var(--text-muted);
}

.player-main {
  flex: 1;
  overflow: hidden;
  position: relative;
  margin-top: var(--navbar-height);
  margin-bottom: 80px;
}

.pdf-container {
  height: 100%;
  overflow-y: auto;
  background: #888;
  position: relative;
}

.pdf-page-wrapper {
  position: relative;
  margin: 12px auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.pdf-page-wrapper canvas {
  display: block;
}

/* 光标层 */
.cursor-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.cursor-block {
  position: absolute;
  border-radius: 2px;
  transition: none;
}

.cursor-block.current {
  background: rgba(0, 184, 100, 0.16);
  border-left: 1.5px solid rgba(0, 184, 100, 0.65);
  border-right: 1.5px solid rgba(0, 184, 100, 0.65);
  border-top: 0.5px dashed rgba(0, 184, 100, 0.35);
  border-bottom: 0.5px dashed rgba(0, 184, 100, 0.35);
}

.cursor-block.preview {
  background: rgba(220, 50, 50, 0.14);
  border-left: 1.5px solid rgba(220, 50, 50, 0.65);
  border-right: 1.5px solid rgba(220, 50, 50, 0.65);
  animation: blink-preview 0.33s infinite;
}




.cursor-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cursor-dot.current {
  background: rgba(0, 184, 100, 0.85);
}

.cursor-dot.preview {
  background: rgba(220, 50, 50, 0.85);
  animation: blink-preview 0.33s infinite;
}

/* 播放控制条 */
.player-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.play-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.progress-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-bar-wrap {
  position: relative;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  cursor: pointer;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  pointer-events: none;
}

.progress-buffer {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: rgba(108,92,231,0.25);
  border-radius: 3px;
  pointer-events: none;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: grab;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.volume-area {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.volume-icon {
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s;
}

.volume-icon:hover {
  color: var(--text);
}

.volume-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
}

/* 降级提示条 */
.info-banner {
  background: rgba(9,132,227,0.1);
  border-bottom: 1px solid rgba(9,132,227,0.2);
  padding: 8px 20px;
  font-size: 13px;
  color: #0969da;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-banner a {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.info-banner .close-banner {
  margin-left: auto;
  cursor: pointer;
  font-size: 16px;
}

/* ===================================
   编辑页样式
   =================================== */

.editor-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.editor-topbar {
  height: var(--navbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.editor-mode-btns {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.editor-mode-btn {
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
}

.editor-mode-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.editor-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  margin-top: var(--navbar-height);
}

/* PDF 区 (上 2/3) */
.editor-pdf-area {
  flex: 2;
  overflow: hidden;
  position: relative;
  background: #888;
}

/* 功能区（下 1/3）*/
.editor-panel {
  flex: 1;
  border-top: 2px solid var(--border);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 200px;
  max-height: 45vh;
}

.editor-panel-header {
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.editor-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.marker-info-row {
  display: flex;
  gap: 24px;
  font-size: 13px;
  flex-wrap: wrap;
}

.marker-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.marker-info-item label {
  color: var(--text-muted);
  font-size: 12px;
}

.marker-info-item span {
  font-weight: 600;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* 已标记列表 */
.marker-list-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}

.marker-list-table th {
  padding: 6px 10px;
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.marker-list-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.marker-list-table tr:last-child td {
  border-bottom: none;
}

.marker-list-table tr:hover td {
  background: rgba(108,92,231,0.03);
}

/* 行区间定义模式 */
.row-divider-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(50, 100, 220, 0.7);
  cursor: ns-resize;
  z-index: 10;
}

.row-divider-line::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -5px;
  bottom: -5px;
}

.row-band {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.row-band:nth-child(odd) {
  background: rgba(100, 150, 255, 0.06);
}

.row-band:nth-child(even) {
  background: rgba(100, 150, 255, 0.03);
}

.row-band-label {
  position: absolute;
  left: 4px;
  top: 2px;
  font-size: 10px;
  color: rgba(50, 100, 220, 0.5);
  font-weight: 600;
  pointer-events: none;
}

/* 磁吸行高亮 */
.row-highlight {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(50, 100, 220, 0.06);
  pointer-events: none;
  z-index: 1;
}

/* 编辑器光标块 */
.editor-cursor {
  position: absolute;
  border-radius: 2px;
  background: rgba(220, 50, 50, 0.18);
  border-left: 1.5px solid rgba(220, 50, 50, 0.7);
  border-right: 1.5px solid rgba(220, 50, 50, 0.7);
  border-top: 0.5px dashed rgba(220, 50, 50, 0.4);
  border-bottom: 0.5px dashed rgba(220, 50, 50, 0.4);
  cursor: grab;
  pointer-events: auto;
  z-index: 20;
  user-select: none;
  box-shadow: 0 0 6px rgba(220, 50, 50, 0.4);
  animation: cursor-blink 1.2s ease-in-out infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.editor-cursor.grabbing {
  cursor: grabbing;
  opacity: 0.85;
  animation: none;
}

/* 跨页拖动时的幽灵光标（跟随鼠标） */
.cursor-drag-ghost {
  position: fixed;
  width: 12px;
  background: rgba(220, 50, 50, 0.25);
  border-left: 2px solid rgba(220, 50, 50, 0.85);
  border-right: 2px solid rgba(220, 50, 50, 0.85);
  border-radius: 2px;
  pointer-events: none;
  z-index: 9999;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(220, 50, 50, 0.5);
}

/* 右侧面板：选中的标记条目 */
.marker-item.selected {
  background: rgba(108, 92, 231, 0.12);
  border-left: 3px solid var(--primary);
  padding-left: 9px; /* 补偿 border 占用的宽度 */
}

.marker-item {
  cursor: pointer;
  border-left: 3px solid transparent;
  padding-left: 9px;
}

/* ===================================
   登录/注册页
   =================================== */

.auth-page {
  /* 抵消 main-content 的 padding-top（登录/注册页无顶栏） */
  margin-top: calc(-1 * var(--navbar-height));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  gap: 16px;
}

.auth-card {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 500;
}

/* 登录/注册页底部备案号 */
.auth-page-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  padding-bottom: 8px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.auth-page-footer a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.15s;
  white-space: nowrap;
}

.auth-page-footer a:hover {
  color: rgba(255, 255, 255, 0.95);
}

.auth-footer-divider {
  color: rgba(255, 255, 255, 0.3);
  user-select: none;
}

/* 验证码 */
.captcha-row {
  display: flex;
  gap: 10px;
}

.captcha-img {
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg);
}

/* ===================================
   设置页
   =================================== */

.settings-section {
  margin-bottom: 32px;
}

.settings-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  color: var(--primary);
}

/* ===================================
   管理员页
   =================================== */

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-search {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-search input {
  width: 240px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

/* ===================================
   Toggle 开关
   =================================== */

.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.toggle-info h4 {
  font-weight: 600;
  font-size: 15px;
}

.toggle-info p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.toggle {
  position: relative;
  width: 46px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* ===================================
   响应式 - 桌面端 vs 手机端
   =================================== */

/* 桌面端：nav-links 和 user-menu 可见，汉堡按钮隐藏 */
.nav-links { display: flex !important; }
.user-menu  { display: block !important; }
.hamburger-btn { display: none !important; }

/* 手机端（≤768px）：汉堡按钮显示，nav-links 和 user-menu 隐藏 */
@media (max-width: 768px) {
  .nav-links  { display: none !important; }
  .user-menu  { display: none !important; }
  .hamburger-btn { display: flex !important; }

  .main-content {
    /* 手机上不再有底部导航，恢复正常 padding */
    padding-bottom: 0;
  }

  .page {
    padding: 16px;
  }

  .card {
    padding: 16px;
  }

  .song-item {
    padding: 12px 14px;
  }

  .song-actions {
    flex-direction: column;
    gap: 4px;
  }

  .player-controls {
    padding: 0 14px;
    gap: 10px;
  }

  .volume-area {
    display: none;
  }

  .table th, .table td {
    padding: 10px 12px;
  }
}

/* ===================================
   动画
   =================================== */

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(110%); opacity: 0; }
}

@keyframes blink-preview {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes celebrateIn {
  0%   { transform: scale(0.6) translateY(40px); opacity: 0; }
  70%  { transform: scale(1.05) translateY(-6px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.celebrate-modal .modal {
  animation: celebrateIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.celebrate-icon {
  font-size: 64px;
  margin-bottom: 12px;
}

/* ===================================
   编辑器扩展样式
   =================================== */

.editor-title-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.editor-title-wrap > span:first-child {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-mode-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.editor-mode-badge.mode-rows {
  background: rgba(9,132,227,0.12);
  color: #0984e3;
}

.editor-mode-badge.mode-markers {
  background: rgba(214,48,49,0.12);
  color: var(--danger);
}

.editor-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.editor-hint-bar {
  background: rgba(253,203,110,0.15);
  border-bottom: 1px solid rgba(253,203,110,0.3);
  padding: 6px 20px;
  font-size: 12px;
  color: #7c5e0a;
  min-height: 30px;
}

.editor-main {
  display: flex;
  flex: 1;
  overflow: hidden;
  margin-top: var(--navbar-height);
  margin-bottom: 0;
}

.editor-pdf-wrap {
  flex: 1;
  overflow: hidden;
  background: #888;
}

.editor-pdf-wrap .pdf-container {
  height: 100%;
}

.editor-panel {
  width: 280px;
  border-left: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.panel-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.panel-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  gap: 8px;
}

.rows-list,
.markers-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.empty-tip {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px;
}

.row-item,
.marker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: background 0.15s;
}

.row-item:hover,
.marker-item:hover {
  background: var(--bg);
}

.row-item-label,
.marker-item-num {
  font-weight: 600;
  color: var(--primary);
  min-width: 32px;
}

.row-item-range,
.marker-item-time {
  flex: 1;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.marker-item-time:hover {
  color: var(--primary);
}

.marker-item-pos {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: transparent;
  transition: all 0.15s;
  flex-shrink: 0;
}

.btn-icon.danger {
  color: var(--danger);
}

.btn-icon.danger:hover {
  background: rgba(214,48,49,0.1);
}

.editor-audio-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 100;
}

/* 进度条区域：flex:1 撑满可用宽度 */
.editor-audio-bar .progress-bar-wrap {
  flex: 1;
  height: 6px;
  cursor: pointer;
  /* 继承播放页风格：灰色底色 + 圆角，background-clip 保持默认（border-box） */
  background: var(--border);
  border-radius: 3px;
}

/* 用伪元素向上下各扩展 8px 的点击热区，不影响背景色渲染 */
.editor-audio-bar .progress-bar-wrap::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  bottom: -8px;
}

.play-btn.sm {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.time-display.sm {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.editor-audio-actions {
  display: flex;
  gap: 6px;
}

/* 行区间叠加层 */
.editor-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: crosshair;
  z-index: 10;
}

.row-band {
  position: absolute;
  pointer-events: all;
  border-top: 1px solid rgba(50,100,220,0.3);
  border-bottom: 1px solid rgba(50,100,220,0.3);
  background: rgba(50,100,220,0.06);
  box-sizing: border-box;
}

.row-band:hover {
  background: rgba(50,100,220,0.1);
}

.row-band.preview {
  background: rgba(50,100,220,0.1);
  pointer-events: none;
}

.row-band-label {
  position: absolute;
  left: 4px;
  top: 2px;
  font-size: 10px;
  color: rgba(50,100,220,0.6);
  font-weight: 700;
  pointer-events: none;
  user-select: none;
}

.row-handle {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  cursor: ns-resize;
  z-index: 5;
}

.row-handle.top-handle {
  top: -3px;
}

.row-handle.bot-handle {
  bottom: -3px;
}

.row-handle:hover {
  background: rgba(50,100,220,0.2);
}

.marker-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(220, 50, 50, 0.8);
  border: 2px solid rgba(220, 50, 50, 1);
  cursor: pointer;
  z-index: 10;
}

.marker-dot:hover {
  transform: scale(1.2);
  background: rgba(220, 50, 50, 1);
}

.marker-dot-time {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
}

.count-badge {
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
}

.hint-text {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: normal;
}

.dropdown-wrap {
  position: relative;
}

.select-sm {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: var(--bg-card);
  cursor: pointer;
}

/* ===================================
   管理后台扩展样式
   =================================== */

.admin-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
}

.admin-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg-card);
}

.admin-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(108,92,231,0.03); }

.action-cell {
  display: flex;
  gap: 6px;
  align-items: center;
}

.loading-cell,
.empty-cell,
.error-cell {
  text-align: center;
  padding: 40px !important;
  color: var(--text-muted);
}

.error-cell { color: var(--danger); }

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.role-badge.admin {
  background: rgba(214,48,49,0.1);
  color: var(--danger);
}

.role-badge.user {
  background: rgba(0,184,148,0.1);
  color: var(--success);
}

.config-val-cell {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: monospace;
  font-size: 13px;
}

.pagination-bar {
  display: flex;
  justify-content: center;
  padding: 16px;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 12px;
}

/* ===================================
   设置页扩展样式
   =================================== */

.settings-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 32px 20px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

.page-container {
  padding-top: calc(var(--navbar-height) + 24px);
}

.level-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  color: #fff;
}

.level-icon {
  font-size: 40px;
  line-height: 1;
}

.level-info {
  flex: 1;
}

.level-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.level-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.level-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  overflow: hidden;
}

.level-progress-fill {
  height: 100%;
  background: rgba(255,255,255,0.9);
  border-radius: 3px;
  transition: width 0.5s;
}

.level-progress-text {
  font-size: 12px;
  opacity: 0.85;
  white-space: nowrap;
}

.level-fav-limit {
  font-size: 12px;
  opacity: 0.8;
}

.settings-form {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.settings-form h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.input {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
}

.input:disabled {
  background: var(--bg);
  color: var(--text-muted);
  cursor: not-allowed;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: center;
}

.stat-item {}

.stat-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===================================
   骨架屏
   =================================== */

.skeleton {
  background: linear-gradient(90deg, var(--bg) 25%, #e0e0e0 50%, var(--bg) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}
