:root {
  --bg-gradient: radial-gradient(ellipse at top, #faf9f6, #f3f2ee);
  --bg-sidebar: #f4f3ef;
  --bg-card: #ffffff;
  
  --color-primary: #0e7090; /* 靛青色 (Quiet AI Pulse Core) */
  --color-primary-hover: #0891b2;
  --color-primary-alpha: rgba(14, 112, 144, 0.05);
  
  --color-queued: #b45309; /* 黄褐 */
  --color-processing: #0e7090; /* 靛青 */
  --color-completed: #047857; /* 翠绿 */
  --color-failed: #b91c1c; /* 砖红 */
  
  --color-queued-bg: rgba(180, 83, 9, 0.04);
  --color-processing-bg: rgba(14, 112, 144, 0.04);
  --color-completed-bg: rgba(4, 120, 87, 0.04);
  --color-failed-bg: rgba(185, 28, 28, 0.04);

  --text-main: #2c2d30; /* 高精密工程炭灰 */
  --text-muted: #787b82; /* 优雅雾灰 */
  --text-dark: #a1a4ab; /* 无焦点占位灰 */
  
  --border-light: rgba(0, 0, 0, 0.06); /* 极细工程分隔线 */
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-gradient);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.15);
}

/* 主容器 */
#app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* 3D 凸印键帽 */
kbd {
  font-family: var(--font-sans);
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-bottom: 2px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 9px;
  color: #4b5563;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-transform: uppercase;
  transition: all var(--transition-fast);
}

.menu-item:hover kbd {
  color: var(--text-main);
  background: #e4e4e7;
  border-bottom-color: #94a3b8;
}

/* 授权登录界面 */
#auth-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: var(--bg-gradient);
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 40px;
  width: 380px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  color: var(--text-main);
}

.auth-header p {
  color: var(--text-muted);
  font-size: 13px;
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  padding: 3px;
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13px;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 8px rgba(14, 112, 144, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 20px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 0 14px rgba(14, 112, 144, 0.2);
}

.btn:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #fcfcfc;
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: var(--shadow-sm);
}

.btn-cancel {
  width: auto;
  padding: 5px 10px;
  font-size: 11px;
  color: var(--color-failed);
  border-color: rgba(185, 28, 28, 0.15);
}

.btn-cancel:hover {
  background: var(--color-failed-bg);
  border-color: var(--color-failed);
}

/* 主工作台布局 */
#workspace-container {
  display: flex;
  flex: 1;
  height: 100%;
  overflow: hidden;
}

/* 侧边栏 Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-brand {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-brand svg {
  color: var(--color-primary);
}

.sidebar-brand h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-main);
}

.sidebar-menu {
  flex: 1;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.menu-item:hover {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-main);
}

.menu-item.active {
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Linear 经典纤细活动指示条 */
.menu-item.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 2.5px;
  background: var(--color-primary);
  border-radius: 0 4px 4px 0;
}

.menu-item.active svg {
  color: var(--color-primary);
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #fff;
  font-size: 13px;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.user-points {
  font-size: 11px;
  color: var(--text-muted);
}

.menu-item-resource {
  font-size: 11px;
  opacity: 0.7;
  padding: 6px 12px;
}

/* 主内容区 */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  overflow-y: auto;
  position: relative;
}

/* 顶部栏 */
.top-bar {
  height: 60px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: #ffffff;
  flex-shrink: 0; /* 防止内容超长时顶部栏被强行挤压 */
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.bc-item.active {
  color: var(--text-main);
  font-weight: 600;
}

.bc-sep {
  opacity: 0.4;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

#btn-signin {
  width: auto;
  padding: 6px 12px;
  font-size: 12px;
}

/* 面板内容容器 */
.panel-container {
  padding: 30px 40px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: none;
}

.panel-container.active {
  display: block;
}

/* 上传区 (Linear Paper Style) */
.upload-zone {
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: #fafaf9;
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-bottom: 30px;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--color-completed);
  background: rgba(16, 185, 129, 0.01);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.06);
}

.upload-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.upload-zone:hover .upload-icon {
  color: var(--color-completed);
  background: rgba(16, 185, 129, 0.05);
}

.upload-text h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.upload-text p {
  font-size: 12px;
  color: var(--text-muted);
}

.upload-input {
  display: none;
}

/* 上传配置面板 */
.upload-config-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
  display: none;
}

.file-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f9f9fb;
  border: 1px solid var(--border-light);
  border-radius: 6px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.file-name {
  font-size: 13px;
  font-weight: 500;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-size: 11px;
  color: var(--text-muted);
}

.config-section {
  margin-top: 24px;
}

.config-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.mode-selector-group {
  display: flex;
  gap: 12px;
}

.mode-option-card {
  flex: 1;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  background: #ffffff;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

.mode-option-card:hover {
  border-color: rgba(0, 0, 0, 0.12);
}

.mode-option-card.active {
  border-color: var(--color-primary);
  background: var(--color-primary-alpha);
  box-shadow: 0 0 10px rgba(14, 112, 144, 0.05);
}

.mode-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mode-badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.mode-badge.std {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
}

.mode-badge.pro {
  background: rgba(14, 112, 144, 0.1);
  color: var(--color-primary);
}

.mode-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.config-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

#btn-submit-task {
  width: 180px;
}

/* 列表与表格 */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.table-filter-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
}

.table-search {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 13px;
  transition: all var(--transition-fast);
}

.table-search:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 8px rgba(14, 112, 144, 0.05);
}

.data-table-card {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: #fafaf9;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
}

.data-table td {
  padding: 14px 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: #fbfbfa;
}

.table-empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 30px;
}

/* 状态标签 */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid transparent;
}

.status-tag::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-tag.queued {
  color: var(--color-queued);
  background: var(--color-queued-bg);
  border-color: rgba(180, 83, 9, 0.15);
}
.status-tag.queued::before { background: var(--color-queued); }

.status-tag.processing {
  color: var(--color-processing);
  background: var(--color-processing-bg);
  border-color: rgba(14, 112, 144, 0.15);
}
.status-tag.processing::before { background: var(--color-processing); }

.status-tag.completed {
  color: var(--color-completed);
  background: var(--color-completed-bg);
  border-color: rgba(4, 120, 87, 0.15);
}
.status-tag.completed::before { background: var(--color-completed); }

.status-tag.failed {
  color: var(--color-failed);
  background: var(--color-failed-bg);
  border-color: rgba(185, 28, 28, 0.15);
}
.status-tag.failed::before { background: var(--color-failed); }

.action-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.action-link:hover {
  color: var(--color-primary-hover);
}

/* 详情滑入面板 (Notion Document Layout) */
.detail-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff; /* 高克重白纸背景 */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}

.detail-panel.active {
  transform: translateX(0);
}

/* Notion Cover 头图 */
.notion-cover {
  height: 50px;
  width: 100%;
  background: linear-gradient(135deg, #f4f3ef 0%, #eae8e1 100%);
  position: relative;
  border-bottom: 1px solid var(--border-light);
}

.notion-emoji-badge {
  width: 48px;
  height: 48px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: -24px;
  left: 40px;
  box-shadow: var(--shadow-sm);
  z-index: 2; /* 压在底下的极细脉搏线之上 */
  color: var(--color-primary);
}

/* 静默 AI 脉搏线 */
.ai-pulse-line {
  height: 2px;
  width: 100%;
  background: var(--border-light);
  position: absolute; /* 绝对定位，依附于顶部栏最底部 */
  bottom: 0;
  left: 0;
  overflow: hidden;
  transition: background var(--transition-normal);
  z-index: 1;
}

.ai-pulse-line.active {
  background: linear-gradient(90deg, #0e7090, #10b981, #0e7090);
  background-size: 200% 100%;
  animation: pulse-flow 4s linear infinite;
}

.ai-pulse-line.success-done {
  background: var(--color-completed);
}

.ai-pulse-line.failed-done {
  background: var(--color-failed);
}

@keyframes pulse-flow {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.back-btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.back-btn:hover {
  background: #fcfcfc;
  color: var(--text-main);
  border-color: rgba(0, 0, 0, 0.15);
}

/* 详情页最顶部的极简操作控制条 (Notion 风格) */
.detail-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 40px;
  background: transparent;
  border-bottom: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 12; /* 确保盖在 Cover 和 Badge 上，可点击 */
  height: 48px;
  box-sizing: border-box;
}

.detail-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-top-actions .btn-secondary {
  padding: 6px 12px;
  font-size: 13px;
}

/* Notion 尊贵大标题 (文件名) */
.document-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  margin: 32px 0 20px 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
  word-break: break-all;
}

/* Notion 属性网格 */
.notion-properties-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 30px;
  padding: 16px 0; /* 修改为 0，与文档流左侧完美对齐 */
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.notion-property-row {
  display: contents;
}

.notion-property-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.notion-property-label svg {
  opacity: 0.6;
}

.notion-property-value {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 600;
}

/* 文档阅读区 */
.document-scroller {
  flex: 1;
  overflow-y: auto;
  padding: 20px 40px 140px;
  display: flex;
  justify-content: center;
}

.document-view-container {
  max-width: 760px;
  width: 100%;
}

.doc-search-wrapper {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.doc-search-field {
  position: relative;
  flex: 1;
}

.doc-search-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 10px 14px;
  padding-right: 90px;
  color: var(--text-main);
  font-size: 13px;
  transition: all var(--transition-fast);
}

.doc-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 8px rgba(14, 112, 144, 0.05);
}

#search-count {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.btn-search-nav {
  width: auto;
  padding: 8px 12px;
  display: none;
  height: 40px;
  border-color: var(--border-light);
}

/* Notion Callout 框 */
.notion-callout {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.notion-callout-icon {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}

.notion-callout-content {
  flex: 1;
}

.notion-callout-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text-main);
}

.notion-callout-content p {
  font-size: 13px;
  line-height: 1.5;
}

.notion-callout.failed {
  background: var(--color-failed-bg);
  border-left: 3px solid var(--color-failed);
}

.notion-callout.failed .notion-callout-icon svg {
  color: var(--color-failed);
}

.notion-callout.failed .notion-callout-content {
  color: var(--text-main);
}

.doc-text-body {
  font-size: 15px;
  line-height: 1.85; /* 黄金白纸行高 */
  color: var(--text-main);
  white-space: pre-wrap;
  letter-spacing: 0.3px;
}

/* 匹配高亮样式 */
.highlight {
  background-color: rgba(14, 112, 144, 0.12);
  color: var(--text-main);
  border-radius: 2px;
  padding: 0 1px;
  box-shadow: 0 0 0 1px rgba(14, 112, 144, 0.2);
  transition: background var(--transition-fast);
}

.highlight.current {
  background-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.5);
}

/* 底部音频控制栏 (Linear style) */
.audio-player-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  z-index: 20;
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 20px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.play-toggle-btn:hover {
  background: var(--color-primary-hover);
  transform: scale(1.03);
}

.player-progress-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-time {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  width: 46px;
}

.player-slider-wrapper {
  flex: 1;
  height: 20px;
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.player-slider-track {
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  position: relative;
}

.player-slider-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 2px;
  width: 0%;
}

.player-slider-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 0%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  display: none;
}

.player-slider-wrapper:hover .player-slider-thumb {
  display: block;
}

.player-speed-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.speed-btn {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.speed-btn.active, .speed-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.06);
}

/* 积分卡片与流水 */
.points-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.points-balance-lbl {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.points-balance-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
}

.points-actions {
  display: flex;
  gap: 12px;
}

.recharge-box {
  text-align: right;
}

.recharge-title {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.recharge-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.recharge-input {
  flex: 1;
}

#btn-recharge-submit {
  width: 100px;
  padding: 0 16px;
}

/* Toast 提示 */
#toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  animation: toast-fade-in 0.2s ease;
}

.toast.success {
  border-left: 3px solid var(--color-completed);
}

.toast.error {
  border-left: 3px solid var(--color-failed);
}

@keyframes toast-fade-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 最近任务卡片 */
.recent-tasks-panel {
  margin-top: 24px;
}

/* 资源中心 */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.resource-card:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: var(--shadow-md);
}

.resource-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-main);
}

.resource-time {
  font-size: 11px;
  color: var(--text-muted);
}

.resource-link {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.resource-link:hover {
  color: var(--color-primary-hover);
}

.resource-feedback {
  font-size: 11px;
  color: var(--color-failed);
  cursor: pointer;
  background: transparent;
  border: none;
  text-align: left;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.resource-feedback:hover {
  opacity: 1;
}

/* 反馈弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  z-index: 150;
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.feedback-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  width: 400px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  color: var(--text-main);
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-main);
}