:root {
  /* 核心色调 - 深邃蓝黑风格 */
  --bg-main: #0f172a;       /* 更深的蓝灰背景 */
  --bg-card: #1e293b;       /* 卡片背景 */
  --bg-card-hover: #334155; /* 卡片悬停 */
  
  /* 主题色 - 靛蓝渐变 */
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-grad-from: #6366f1;
  --primary-grad-to: #8b5cf6; /* 调整为偏紫的渐变，更具科技感 */
  
  /* 文本颜色 */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  /* 边框与分割线 */
  --border-subtle: #334155;
  --border-focus: #6366f1;

  /* 功能色 */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* 阴影系统 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15); /* 霓虹光晕 */

  /* 兼容性别名 (为了支持旧代码/内联样式) */
  --primary-color: var(--primary);
  --bg-color: var(--bg-main);
  --card-bg: var(--bg-card);
  --text-color: var(--text-main);
  --border-color: var(--border-subtle);
  --hover-bg: var(--bg-card-hover);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* 防止水平滚动 */
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
  border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
/* Firefox 兼容 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) var(--bg-main);
}

/* 链接 */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--primary);
}

/* 布局容器 */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent 40%),
              radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.1), transparent 40%);
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* 通用卡片样式 */
.card {
  background-color: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.3);
}

/* 卡片头部 */
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(to right, rgba(255,255,255,0.02), transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.025em;
}

.card-body {
  padding: 24px;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}
.card-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* 侧边栏 */
.sidebar {
  width: 240px;
  background-color: rgba(15, 23, 42, 0.95);
  border-right: 1px solid var(--border-subtle);
  position: fixed;
  top: 56px;
  bottom: 0;
  left: 0;
  padding: 20px 0;
  overflow-y: auto;
  backdrop-filter: blur(12px);
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s;
  margin: 4px 12px;
  border-radius: 8px;
  gap: 12px;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 1.1em;
}

.nav-divider {
  height: 1px;
  background-color: var(--border-subtle);
  margin: 12px 24px;
  opacity: 0.5;
}

/* 顶部导航栏 */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.user-info {
  font-size: 0.9rem;
  font-weight: 500;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(14px);
}

.language-switcher .language-option {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.25s ease;
  background: transparent;
}

.language-switcher .language-option:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.language-switcher .language-option.active {
  color: #ffffff;
  border-color: var(--primary-color);
  background: linear-gradient(135deg, var(--primary-grad-from), var(--primary-grad-to));
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}


.auth-wrapper {
  position: relative;
  width: min(360px, 100%);
  margin: 0 auto;
}

.auth-wrapper .card {
  width: 100%;
}

/* 登录/注册页面的语言切换器 - 固定在顶部居中 */
.auth-page > .language-switcher {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .auth-wrapper {
    width: 100%;
  }
  
  /* 移动端语言切换器 */
  .auth-page > .language-switcher {
    top: 15px;
  }
}

/* Page Transitions */
@keyframes pageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pageOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

.main-content {
  margin-left: 240px;
  margin-top: 56px;
  padding: 32px;
  min-height: calc(100vh - 56px);
  transition: margin-left 0.3s ease;
  animation: pageIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.page-exit .main-content {
    animation: pageOut 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* 页面标题 */
.page-header {
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.page-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-header .text-muted {
  margin: 0;
  font-size: 0.95rem;
}

/* 表单元素 */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.95rem;
}

.form-control, .form-input {
  width: 100%;
  padding: 10px 16px;
  background-color: rgba(15, 23, 42, 0.6); /* 半透明深色背景 */
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-control:hover, .form-input:hover {
  border-color: var(--text-muted);
}

.form-control:focus, .form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  background-color: rgba(15, 23, 42, 0.9);
}

/* 按钮系统 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 8px;
  line-height: 1.2;
}

.btn:active {
  transform: scale(0.98);
}

.btn-block {
  width: 100%;
  display: flex;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-grad-from), var(--primary-grad-to));
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

.btn-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background-color: var(--danger);
  color: white;
}

.btn-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.btn-success:hover {
  background-color: var(--success);
  color: white;
}

/* 特殊组件：平台卡片 */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.platform-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary-grad-from), var(--primary-grad-to));
  opacity: 0;
  transition: opacity 0.3s;
}

.platform-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.platform-card:hover::before {
  opacity: 1;
}
.platform-card.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}
.platform-card.selected::before {
  opacity: 1;
}

/* 快速入口网格 */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.quick-actions-grid .btn {
  height: auto;
  min-height: 120px;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  transition: all 0.3s;
}
.quick-actions-grid .btn:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-hover);
}
.quick-actions-grid .btn div:first-child {
  font-size: 2rem;
  margin-bottom: 12px;
}

/* 表格美化 */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.table th {
  text-align: left;
  padding: 16px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background-color: rgba(0,0,0,0.2);
}
.table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}
.table tr:hover td {
  background-color: rgba(255,255,255,0.02);
}

/* 状态指示器 */
.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}
.status-indicator.live {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}
.status-indicator.paused {
  background-color: var(--warning);
}
.status-indicator.stopped {
  background-color: var(--text-muted);
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* 消息提示 */
.message {
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  z-index: 9999;
}

/* 工具类 */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.error-text { color: var(--danger); font-size: 0.875rem; margin-top: 4px; }

/* 骨架屏动画 */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 移动端适配 */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .mobile-menu-btn {
    display: block;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
  }
  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 40;
    display: none;
  }
  .mobile-overlay.active {
    display: block;
  }
}
@media (min-width: 992px) {
  .mobile-menu-btn { display: none; }
}

/* 动画 - 淡入 */
.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 帮助类：输入组 */
.input-group {
  display: flex;
  gap: 8px;
}
.input-group .form-control {
  flex: 1;
}

/* ====================================
   页面特定样式 (合并自各个页面的inline style)
   ==================================== */

/* 直播控制面板 */
.live-control-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .live-control-panel {
    grid-template-columns: 1fr;
  }
}

.status-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border-subtle);
  height: 100%;
}

.control-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* 弹幕面板 */
.danmaku-panel {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  background: rgba(0,0,0,0.1);
}

.danmaku-item {
  padding: 12px;
  margin-bottom: 10px;
  border-left: 3px solid var(--primary);
  background: rgba(255,255,255,0.02);
  border-radius: 4px;
  transition: background-color 0.2s;
}
.danmaku-item:hover {
  background: rgba(255,255,255,0.05);
}
.danmaku-item.replied {
  border-left-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}
.danmaku-item.new-danmaku {
  animation: danmakuHighlight 1s ease-out;
}
@keyframes danmakuHighlight {
  0% { background-color: rgba(99, 102, 241, 0.2); }
  100% { background-color: transparent; }
}

.danmaku-time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 语音队列 */
.voice-queue {
  max-height: 300px;
  overflow-y: auto;
}

.queue-item {
  padding: 12px;
  margin-bottom: 8px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}
.queue-item:hover {
  border-color: var(--primary);
}
.queue-item.playing {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
  border-color: var(--primary);
  color: var(--primary);
}

.floating-voice-list {
  display: flex;
  flex-direction: column;
  max-height: 350px;
  min-height: 150px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.04);
  padding: 8px;
  /* 自定义滚动条样式 */
  scrollbar-width: thin;
  scrollbar-color: var(--primary) rgba(255, 255, 255, 0.1);
  /* 确保内容可以滚动 */
  position: relative;
  box-sizing: border-box;
}

.floating-voice-list::-webkit-scrollbar {
  width: 8px;
}

.floating-voice-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.floating-voice-list::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.floating-voice-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover, #6366f1);
}

.floating-voice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}

.floating-voice-item + .floating-voice-item {
  margin-top: 6px;
}

.floating-voice-item:hover {
  border-color: var(--primary);
}

.floating-voice-item.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
}

.floating-voice-info {
  flex: 1;
  overflow: hidden;
}

.floating-voice-title {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.status-chip {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.floating-voice-meta {
  margin-left: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: right;
}

.floating-progress {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 6px;
}

.floating-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.2s ease;
}

.floating-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  gap: 6px;
}

.floating-progress-label {
  flex: 1;
}

.floating-audio-link {
  color: var(--primary);
  font-size: 0.75rem;
  white-space: nowrap;
  text-decoration: underline;
}

/* 统计网格 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* 提取器专用样式 */
.extractor-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
@media (max-width: 1024px) {
  .extractor-container {
    grid-template-columns: 1fr;
  }
}

.live-preview {
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  min-height: 500px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.danmaku-display {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
  background: var(--bg-main);
}

.method-card {
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
}
.method-card::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0; width: 4px;
}
.method-card h3 {
  margin-top: 0;
  color: var(--text-main);
}

.ai-reply-box {
  margin-top: 8px;
  padding: 10px;
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid var(--success);
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px;
  margin-top: 8px;
  z-index: 1000;
  min-width: 160px;
  box-shadow: var(--shadow-lg);
}
.dropdown-item {
  display: block;
  padding: 8px 12px;
  color: var(--text-main);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s;
}
.dropdown-item:hover {
  background: var(--bg-card-hover);
}

/* ====================================
   页面特定样式 (合并 Batch 2)
   ==================================== */

/* 统计相关 (live_statistics.php) */
.stats-overview, .sentiment-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* 过滤器栏 (live_statistics.php) */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: center;
}

/* 会话列表 (live_statistics.php) */
.session-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.session-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.session-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}
.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.session-title {
    font-weight: bold;
    font-size: 16px;
}
.session-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}
.status-live { background: var(--success); color: white; }
.status-paused { background: var(--warning); color: white; }
.status-ended { background: #9E9E9E; color: white; }
.session-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}
.session-details {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}
.session-item.expanded .session-details {
    display: block;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-label { color: var(--text-muted); }
.detail-value { font-weight: 500; }

/* 配置页面 (live_config.php) */
.config-section { margin-bottom: 24px; }
.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.config-label { flex: 1; }
.config-label strong { display: block; margin-bottom: 4px; }
.config-label small { color: var(--text-muted); font-size: 12px; }
.config-control { width: 200px; }
.preset-buttons { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.preset-btn { padding: 6px 12px; font-size: 12px; }

/* 模态框 (General Modal Styles) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { margin: 0; font-size: 20px; font-weight: 600; }
.close {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover { color: var(--text-color); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 弹幕过滤 (danmaku_filter.php) */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}
.filter-tab {
    padding: 12px 20px;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
}
.filter-tab:hover { color: var(--text-main); }
.filter-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.filter-content { display: none; }
.filter-content.active { display: block; }
.word-item, .keyword-item, .blacklist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.word-info { flex: 1; }
.word-actions { display: flex; gap: 8px; }
.action-badge { padding: 4px 8px; border-radius: 4px; font-size: 12px; }
.action-filter { background: var(--danger); color: white; }
.action-replace { background: var(--warning); color: white; }
.action-mark { background: var(--info); color: white; }

/* 直播回放 (live_replay.php) */
.replay-timeline {
    margin-top: 20px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.timeline-item {
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.timeline-item:hover {
    background: var(--card-bg);
    transform: translateX(4px);
}
.timeline-time {
    color: var(--text-muted);
    font-size: 12px;
    margin-right: 12px;
}
.timeline-content { display: flex; align-items: center; gap: 12px; }
.timeline-type {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: var(--primary-color);
    color: white;
}
.replay-details { margin-top: 20px; }
.detail-section { margin-bottom: 24px; }
.detail-section h4 {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* 弹幕模拟器 (danmaku_simulator.php) */
.simulator-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .simulator-panel { grid-template-columns: 1fr; }
}
.danmaku-input { display: flex; gap: 12px; margin-bottom: 16px; }
.danmaku-input input { flex: 1; }

/* Alert样式 */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.alert strong {
    display: block;
    margin-bottom: 4px;
}
.alert small {
    display: block;
    margin-top: 4px;
    opacity: 0.9;
}
.alert code {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}
.alert-success {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.3);
    color: #28a745;
}
.dark-theme .alert-success {
    background: rgba(40, 167, 69, 0.2);
    color: #5cd97b;
}
.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: #dc3545;
}
.dark-theme .alert-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #f57482;
}
.alert-info {
    background: rgba(23, 162, 184, 0.15);
    border-color: rgba(23, 162, 184, 0.3);
    color: #17a2b8;
}
.dark-theme .alert-info {
    background: rgba(23, 162, 184, 0.2);
    color: #5fc9db;
}
.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}
.dark-theme .alert-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffd454;
}
.text-warning {
    color: #ffc107;
}
.dark-theme .text-warning {
    color: #ffd454;
}
