/* ============================================================
   Theme.css - 网站全局主题样式
   基于 Bootstrap 5 + layout.css (YouTube 风格暗色布局)
   覆盖 Bootstrap 组件外观，统一暗色主题视觉
   兼容: PC / 平板 / 手机
   ============================================================ */

/* ============================================================
   外部 CSS 导入
   路径换算说明:
     HTML 中 __CDN__   → public/assets/
     HTML 中 __ADDON__ → public/assets/addons/cms/ (CMS 插件)
   当前文件位置: public/assets/theme/css/theme.css
   ============================================================ */
/* __CDN__/assets/css/bootstrap.min.css */
@import url("../../libs/bootstrap/dist/css/bootstrap.min.css");
/* __CDN__/assets/libs/font-awesome/css/font-awesome.min.css */
@import url("../../libs/font-awesome/css/font-awesome.min.css");
/* __CDN__/assets/libs/fastadmin-layer/dist/theme/default/layer.css */
@import url("../../libs/fastadmin-layer/dist/theme/default/layer.css");
/* __CDN__/assets/css/iconfont.css */
@import url("../../css/iconfont.css");
@import url("../../css/video-js/video-js.min.css");
/* __ADDON__/css/swiper.min.css */
@import url("../../addons/cms/css/swiper.min.css");
/* __ADDON__/css/share.min.css */
@import url("../../addons/cms/css/share.min.css");
/* __ADDON__/css/iconfont.css */
@import url("../../addons/cms/css/iconfont.css");
/* __ADDON__/css/common.css */
@import url("../../addons/cms/css/common.css");
/* __ADDON__/css/layout.css (同目录) */
@import url("./layout.css");
@import url("./new_diy.css");

/* ===== CSS 变量 ===== */
/*
   ═══════════════════════════════════════════════════
   变量命名规范:
     --layout-*  = 布局结构相关 (定义于 layout.css)
     --theme-*   = Bootstrap 组件覆盖 (定义于此)
   ═══════════════════════════════════════════════════
   注: 与 layout.css 重复的变量值, 此处通过
   var(--layout-*) 引用, 避免硬编码冗余。
   ═══════════════════════════════════════════════════
*/
:root {
  /* ── Bootstrap 主题色 (layout.css 未定义) ── */
  --theme-primary: #ff4d4f;
  --theme-primary-hover: #e04345;
  --theme-primary-light: rgba(255, 77, 79, 0.12);
  --theme-secondary: #6c757d;
  --theme-success: #22c55e;
  --theme-warning: #f59e0b;
  --theme-danger: #ef4444;
  --theme-info: #3b82f6;

  /* ── 引用 layout.css 的变量 (别名) ── */
  --theme-bg: var(--layout-bg);
  --theme-bg-secondary: var(--layout-bg-secondary);
  --theme-bg-tertiary: var(--layout-bg-tertiary);
  --theme-text: var(--layout-text-primary);
  --theme-text-secondary: var(--layout-text-secondary);
  --theme-border: var(--layout-border);
  --theme-font-family: var(--layout-font-family);
  --theme-font-size-xs: var(--layout-font-size-xs);
  --theme-font-size-sm: var(--layout-font-size-sm);
  --theme-font-size-base: var(--layout-font-size-base);
  --theme-font-size-md: var(--layout-font-size-md);
  --theme-font-size-lg: var(--layout-font-size-lg);
  --theme-font-size-xl: var(--layout-font-size-xl);
  --theme-font-size-xxl: var(--layout-font-size-xxl);
  --theme-font-size-h1: 2.8rem;
  --theme-font-size-h2: 2.4rem;
  --theme-font-size-h3: 2rem;
  --theme-font-size-h4: 1.8rem;
  --theme-font-size-h5: 1.6rem;
  --theme-font-size-h6: 1.4rem;

  /* ── Bootstrap 专用变量 (layout.css 未定义) — 默认暗色 ── */
  --theme-bg-elevated: #2d2d2d;
  --theme-bg-card: #1e1e1e;
  --theme-bg-input: #121212;
  --theme-text-muted: #717171;
  --theme-text-inverse: #0f0f0f;
  --theme-border-light: #3a3a3a;
  --theme-shadow-sm: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.3);
  --theme-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.4);
  --theme-shadow-lg: 0 0.8rem 2.4rem rgba(0, 0, 0, 0.5);
  --theme-shadow-xl: 0 1.2rem 4rem rgba(0, 0, 0, 0.6);
  --theme-font-family-monospace: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", "Menlo", "Courier New", monospace;
}

/* ── 亮色主题：覆盖 Bootstrap 专用变量 ── */
body.light-theme {
  --theme-bg-elevated: #ffffff;
  --theme-bg-card: #ffffff;
  --theme-bg-input: #f5f5f5;
  --theme-text-muted: #909090;
  --theme-text-inverse: #ffffff;
  --theme-border-light: #d0d0d0;
  --theme-shadow-sm: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.06);
  --theme-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.08);
  --theme-shadow-lg: 0 0.8rem 2.4rem rgba(0, 0, 0, 0.1);
  --theme-shadow-xl: 0 1.2rem 4rem rgba(0, 0, 0, 0.12);
}

/* ── 系统偏好亮色（用户未手动设置时） ── */
@media (prefers-color-scheme: light) {
  body:not(.light-theme):not(.dark-theme) {
    --theme-bg-elevated: #ffffff;
    --theme-bg-card: #ffffff;
    --theme-bg-input: #f5f5f5;
    --theme-text-muted: #909090;
    --theme-text-inverse: #ffffff;
    --theme-border-light: #d0d0d0;
    --theme-shadow-sm: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.06);
    --theme-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.08);
    --theme-shadow-lg: 0 0.8rem 2.4rem rgba(0, 0, 0, 0.1);
    --theme-shadow-xl: 0 1.2rem 4rem rgba(0, 0, 0, 0.12);
  }
}

/* ============================================================
   全局基础样式 (仅补充 layout.css, 不重复定义 body)
   注意: body 基础样式已在 layout.css 中定义
   ============================================================ */
::selection {
  background-color: var(--theme-primary-light);
  color: var(--theme-text);
}

/* ============================================================
   Bootstrap 文字覆盖
   ============================================================ */
h1, .h1 { font-size: var(--theme-font-size-h1); }
h2, .h2 { font-size: var(--theme-font-size-h2); }
h3, .h3 { font-size: var(--theme-font-size-h3); }
h4, .h4 { font-size: var(--theme-font-size-h4); }
h5, .h5 { font-size: var(--theme-font-size-h5); }
h6, .h6 { font-size: var(--theme-font-size-h6); }

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--layout-text-primary);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 0.5em;
}

.text-primary { color: var(--theme-primary) !important; }
.text-secondary { color: var(--theme-text-secondary) !important; }
.text-muted { color: var(--theme-text-muted) !important; }
.text-success { color: var(--theme-success) !important; }
.text-warning { color: var(--theme-warning) !important; }
.text-danger { color: var(--theme-danger) !important; }
.text-info { color: var(--theme-info) !important; }
.text-body { color: var(--theme-text) !important; }
.text-light { color: var(--theme-text) !important; }
.text-dark { color: var(--theme-text-inverse) !important; }

/* ============================================================
   Bootstrap 背景覆盖
   ============================================================ */
.bg-primary { background-color: var(--theme-primary) !important; }
.bg-secondary { background-color: var(--theme-secondary) !important; }
.bg-success { background-color: var(--theme-success) !important; }
.bg-warning { background-color: var(--theme-warning) !important; }
.bg-danger { background-color: var(--theme-danger) !important; }
.bg-info { background-color: var(--theme-info) !important; }
.bg-dark { background-color: var(--theme-bg) !important; }
.bg-light { background-color: var(--theme-bg-tertiary) !important; }
.bg-white { background-color: var(--theme-bg-secondary) !important; }
.bg-transparent { background-color: transparent !important; }

/* ============================================================
   Bootstrap 按钮覆盖
   ============================================================ */
.btn {
  font-size:var(--layout-font-size-sm);
  padding: 0.5rem 1.6rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  font-family: var(--theme-font-family);
  line-height: 1.4;
}

.btn:hover {
  transform: translateY(-0.1rem);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  color: #fff;
}

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

.btn-primary:focus, .btn-primary.focus {
  background-color: var(--theme-primary-hover);
  border-color: var(--theme-primary-hover);
  box-shadow: 0 0 0 0.3rem var(--theme-primary-light);
}

.btn-outline-primary {
  color: var(--theme-primary);
  border-color: var(--theme-primary);
  background-color: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  color: #fff;
}

.btn-secondary {
  background-color: var(--theme-bg-tertiary);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

.btn-secondary:hover {
  background-color: var(--theme-bg-elevated);
  border-color: var(--theme-border-light);
  color: var(--theme-text);
}

.btn-outline-secondary {
  color: var(--theme-text-secondary);
  border-color: var(--theme-border);
  background-color: transparent;
}

.btn-outline-secondary:hover {
  background-color: var(--theme-bg-tertiary);
  border-color: var(--theme-border-light);
  color: var(--theme-text);
}

.btn-link {
  color: var(--theme-primary);
  text-decoration: none;
}

.btn-link:hover {
  color: var(--theme-primary-hover);
  text-decoration: underline;
}

.btn-sm {
  font-size: var(--theme-font-size-sm);
  padding: 0.4rem 1.2rem;
  border-radius: 0.6rem;
}

.btn-lg {
  font-size: var(--theme-font-size-md);
  padding: 1.2rem 2.4rem;
  border-radius: 1rem;
}

.btn-block {
  width: 100%;
}

/* ============================================================
   Bootstrap 表单覆盖
   ============================================================ */
.form-control {
  background-color: var(--theme-bg-input);
  /*border: 1px solid var(--theme-border);*/
  /*color: var(--theme-text);*/
  font-size: var(--theme-font-size-sm);
  font-family: var(--theme-font-family);
  padding: 0.8rem 1.2rem;box-shadow:none;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  background-color: var(--theme-bg-input);
  border-color: var(--theme-info);
  /*color: var(--theme-text);*/
  box-shadow: 0 0 0 0.3rem rgba(59, 130, 246, 0.15);
}

.form-control::placeholder {
  color: var(--theme-text-muted);
}

.form-control:disabled,
.form-control[readonly] {
  background-color: var(--theme-bg-tertiary);
  opacity: 0.7;
}

.form-select {
  background-color: var(--theme-bg-input);
  border: 1px solid var(--theme-border);
  color: var(--theme-text);
  font-size: var(--theme-font-size-base);
  border-radius: 0.8rem;
  padding: 0.8rem 3.2rem 0.8rem 1.2rem;
  font-family: var(--theme-font-family);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23aaaaaa' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.2rem center;
  appearance: none;
}

.form-select:focus {
  border-color: var(--theme-info);
  box-shadow: 0 0 0 0.3rem rgba(59, 130, 246, 0.15);
}

.form-check-input {
  background-color: var(--theme-bg-tertiary);
  border-color: var(--theme-border);
}

.form-check-input:checked {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
}

.form-check-input:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 0.3rem var(--theme-primary-light);
}

.form-label {
  color: var(--theme-text);
  font-size: var(--theme-font-size-base);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.form-text {
  color: var(--theme-text-muted);
  font-size: var(--theme-font-size-sm);
}

/* ============================================================
   Bootstrap 卡片覆盖
   ============================================================ */
.card {
  background-color: var(--theme-bg-card);
  border: 1px solid var(--theme-border);
  border-radius: 1.2rem;
  box-shadow: var(--theme-shadow-sm);
}

.card-header {
  background-color: var(--theme-bg-secondary);
  border-bottom: 1px solid var(--theme-border);
  padding: 1.2rem 1.6rem;
  font-weight: 600;
  border-radius: 1.2rem 1.2rem 0 0;
}

.card-body {
  padding: 1.6rem;
}

.card-footer {
  background-color: var(--theme-bg-secondary);
  border-top: 1px solid var(--theme-border);
  padding: 1.2rem 1.6rem;
  border-radius: 0 0 1.2rem 1.2rem;
}

/* ============================================================
   Bootstrap 表格覆盖
   ============================================================ */
.table {
  color: var(--theme-text);
  border-color: var(--theme-border);
  font-size: var(--theme-font-size-base);
}

.table > :not(caption) > * > * {
  border-bottom-color: var(--theme-border);
  padding: 1rem 1.2rem;
}

.table > thead {
  background-color: var(--theme-bg-secondary);
  border-bottom: 0.2rem solid var(--theme-border);
}

.table > thead th {
  font-weight: 600;
  color: var(--theme-text);
  border-bottom: none;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.03);
}

.table-hover > tbody > tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.table-bordered {
  border: 1px solid var(--theme-border);
}

.table-dark {
  background-color: var(--theme-bg);
  color: var(--theme-text);
}

/* ============================================================
   Bootstrap 导航覆盖
   ============================================================ */
.nav-link {
  color: var(--theme-text-secondary);
  padding: 0.8rem 1.2rem;
  border-radius: 0.8rem;
  transition: all 0.15s ease;
  font-size: var(--theme-font-size-base);
}

.nav-link:hover {
  color: var(--theme-text);
  background-color: var(--theme-bg-tertiary);
}

.nav-link.active {
  color: var(--theme-text);
  background-color: var(--theme-bg-tertiary);
  font-weight: 600;
}

.nav-tabs {
  border-bottom: 1px solid var(--theme-border);
}

.nav-tabs .nav-link {
  border: none;
  border-bottom: 0.2rem solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
  color: var(--theme-text-secondary);
  padding: 1rem 1.6rem;
}

.nav-tabs .nav-link:hover {
  background-color: transparent;
  border-bottom-color: var(--theme-border);
}

.nav-tabs .nav-link.active {
  background-color: transparent;
  border-bottom-color: var(--theme-primary);
  color: var(--theme-text);
}

.nav-pills .nav-link.active {
  background-color: var(--theme-primary);
  color: #fff;
}

/* ============================================================
   Bootstrap 徽章覆盖
   ============================================================ */
.badge {
  font-weight: 600;
  font-size: var(--theme-font-size-xs);
  padding: 0.2rem 0.8rem;
  border-radius: 50%;
  line-height: 1.4;
}

.badge-primary {
  background-color: var(--theme-primary);
  color: #fff;
}

.badge-secondary {
  background-color: var(--theme-bg-tertiary);
  color: var(--theme-text-secondary);
}

/* ============================================================
   Bootstrap 弹窗/模态框覆盖
   ============================================================ */
.modal-content {
  background-color: var(--theme-bg-secondary);
  border: 1px solid var(--theme-border);
  border-radius: 1.6rem;
  box-shadow: var(--theme-shadow-xl);
}

.modal-header {
  border-bottom: 1px solid var(--theme-border);
  padding: 1.6rem 2rem;
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  border-top: 1px solid var(--theme-border);
  padding: 1.6rem 2rem;
}

.modal-title {
  font-weight: 700;
  font-size: var(--theme-font-size-lg);
}

.btn-close {
  filter: invert(0.8);
  opacity: 0.8;
}

.btn-close:hover {
  opacity: 1;
}

/* ============================================================
   Bootstrap 下拉菜单覆盖
   ============================================================ */
.dropdown-menu {
  background-color: var(--theme-bg-elevated);
  border: 1px solid var(--theme-border);
  border-radius: 1.2rem;
  box-shadow: var(--theme-shadow-lg);
  padding: 0.6rem;
}

.dropdown-item {
  color: var(--theme-text);
  padding: 0.8rem 1.2rem;
  border-radius: 0.8rem;
  font-size: var(--theme-font-size-base);
  transition: background-color 0.1s ease;
}

.dropdown-item:hover {
  background-color: var(--theme-bg-tertiary);
  color: var(--theme-text);
}

.dropdown-item.active {
  background-color: var(--theme-primary);
  color: #fff;
}

.dropdown-divider {
  border-top-color: var(--theme-border);
  margin: 0.6rem 0;
}

.dropdown-header {
  color: var(--theme-text-muted);
  font-size: var(--theme-font-size-xs);
  padding: 0.6rem 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   Bootstrap 分页覆盖
   ============================================================ */
.page-link {
  background-color: var(--theme-bg-secondary);
  border-color: var(--theme-border);
  color: var(--theme-text);
  padding: 0.8rem 1.4rem;
  font-size: var(--theme-font-size-base);
  border-radius: 0.8rem;
  margin: 0 0.2rem;
  transition: all 0.15s ease;
}

.page-link:hover {
  background-color: var(--theme-bg-tertiary);
  border-color: var(--theme-border-light);
  color: var(--theme-text);
}

.page-item.active .page-link {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  color: #fff;
}

.page-item.disabled .page-link {
  background-color: var(--theme-bg-secondary);
  border-color: var(--theme-border);
  color: var(--theme-text-muted);
  opacity: 0.5;
}

/* ============================================================
   Bootstrap 警告框覆盖
   ============================================================ */
.alert {
  border-radius: 1rem;
  border: 1px solid transparent;
  padding: 1.2rem 1.6rem;
  font-size: var(--theme-font-size-base);
}

.alert-primary {
  background-color: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93bbfd;
}

.alert-success {
  background-color: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93bbfd;
}

.alert-dark {
  background-color: var(--theme-bg-tertiary);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

/* ============================================================
   Bootstrap 进度条覆盖
   ============================================================ */
.progress {
  background-color: var(--theme-bg-tertiary);
  border-radius: 50%;
  height: 0.8rem;
}

.progress-bar {
  background-color: var(--theme-primary);
  border-radius: 50%;
}

/* ============================================================
   Bootstrap 列表组覆盖
   ============================================================ */
.list-group {
  border-radius: 1.2rem;
  overflow: hidden;
}

.list-group-item {
  background-color: var(--theme-bg-card);
  border-color: var(--theme-border);
  color: var(--theme-text);
  padding: 1.2rem 1.6rem;
  font-size: var(--theme-font-size-base);
}

.list-group-item:hover {
  background-color: var(--theme-bg-tertiary);
}

.list-group-item.active {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  color: #fff;
}

/* ============================================================
   Bootstrap 面包屑覆盖
   ============================================================ */
.breadcrumb {
  padding: 0.8rem 0;
  font-size: var(--theme-font-size-sm);
}

.breadcrumb-item a {
  color: var(--theme-text-secondary);
}

.breadcrumb-item a:hover {
  color: var(--theme-text);
}

.breadcrumb-item.active {
  color: var(--theme-text);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--theme-text-muted);
  content: "/";
}

/* ============================================================
   Bootstrap 工具提示/弹出框覆盖
   ============================================================ */
.tooltip-inner {
  background-color: var(--theme-bg-elevated);
  color: var(--theme-text);
  border: 1px solid var(--theme-border);
  font-size: var(--theme-font-size-sm);
  padding: 0.6rem 1.2rem;
  border-radius: 0.8rem;
  box-shadow: var(--theme-shadow);
}

.popover {
  background-color: var(--theme-bg-elevated);
  border: 1px solid var(--theme-border);
  border-radius: 1.2rem;
  box-shadow: var(--theme-shadow-lg);
}

.popover-header {
  background-color: var(--theme-bg-secondary);
  border-bottom: 1px solid var(--theme-border);
  color: var(--theme-text);
  padding: 1.2rem 1.6rem;
  font-weight: 600;
}

.popover-body {
  color: var(--theme-text);
  padding: 1.2rem 1.6rem;
}

.popover-arrow::after {
  border-top-color: var(--theme-bg-elevated) !important;
  border-bottom-color: var(--theme-bg-elevated) !important;
}

/* ============================================================
   Bootstrap 输入组覆盖
   ============================================================ */
.input-group-text {
  background-color: var(--theme-bg-tertiary);
  border: 1px solid var(--theme-border);
  color: var(--theme-text-secondary);
  font-size: var(--theme-font-size-base);
  border-radius: 0.8rem;
  padding: 0.8rem 1.2rem;
}

/* ============================================================
   滚动条美化
   ============================================================ */
::-webkit-scrollbar {
  width: 0.8rem;
  height: 0.8rem;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--theme-border);
  border-radius: 50%;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--theme-text-muted);
}

/* Firefox 滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--theme-border) transparent;
}

/* ============================================================
   动画
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(1.2rem); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-1.2rem); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
  animation: fadeIn 0.3s ease;
}

.slide-up {
  animation: slideUp 0.3s ease;
}

.slide-down {
  animation: slideDown 0.3s ease;
}

/* ============================================================
   Bootstrap 工具类覆盖
   ============================================================ */
.border {
  border-color: var(--theme-border) !important;
}

.border-top {
  border-top-color: var(--theme-border) !important;
}

.border-bottom {
  border-bottom-color: var(--theme-border) !important;
}

.border-start {
  border-left-color: var(--theme-border) !important;
}

.border-end {
  border-right-color: var(--theme-border) !important;
}

.shadow-sm { box-shadow: var(--theme-shadow-sm) !important; }
.shadow { box-shadow: var(--theme-shadow) !important; }
.shadow-lg { box-shadow: var(--theme-shadow-lg) !important; }
.shadow-xl { box-shadow: var(--theme-shadow-xl) !important; }

.rounded { border-radius: 0.8rem !important; }
.rounded-lg { border-radius: 1.2rem !important; }
.rounded-xl { border-radius: 1.6rem !important; }

/* ============================================================
   响应式字体 - 平板
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --theme-font-size-h1: 2.6rem;
    --theme-font-size-h2: 2.2rem;
    --theme-font-size-h3: 1.8rem;
    --theme-font-size-h4: 1.7rem;
  }
}

/* ============================================================
   响应式字体 - 手机
   ============================================================ */
@media (max-width: 640px) {
  :root {
    --theme-font-size-h1: 2.2rem;
    --theme-font-size-h2: 2rem;
    --theme-font-size-h3: 1.8rem;
    --theme-font-size-h4: 1.6rem;
    --theme-font-size-h5: 1.5rem;
    --theme-font-size-base: 1.4rem;
    --theme-font-size-md: 1.5rem;
  }

  .btn {
    font-size: var(--theme-font-size-base);
    padding: 1rem 1.6rem;
    border-radius: 0.8rem;
  }

  .btn-sm {
    font-size: var(--theme-font-size-sm);
    padding: 0.6rem 1.2rem;
  }

  .btn-lg {
    font-size: var(--theme-font-size-md);
    padding: 1.4rem 2rem;
  }

  .card-body {
    padding: 1.2rem;
  }

  .table > :not(caption) > * > * {
    padding: 0.8rem 1rem;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1.4rem 1.6rem;
  }
}

/* ============================================================
   穴位视频懒加载播放器
   ============================================================ */
.xuewei-video-placeholder {
    position: relative;
    width: 100%;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
}
.xuewei-video-poster {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #111;
}
.xuewei-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0,0,0,0.65);
    border: 3px solid rgba(255,255,255,0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    pointer-events: none;
}
.xuewei-video-play-btn i {
    color: #fff;
    font-size: 22px;
    margin-left: 3px;
}
.xuewei-video-placeholder:hover .xuewei-video-play-btn {
    background: rgba(255,77,79,0.85);
    transform: translate(-50%, -50%) scale(1.08);
}
/* 视频播放器加载后的样式 */
.xuewei-video-player {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
}
.xuewei-video-player .video-js {
    border-radius: 6px;
}

/* ============================================================
   评论浮窗面板
   ============================================================ */
.comment-float-panel {
    position: fixed;
    z-index: 1050;
    width: 380px;
    max-height: 70vh;
    background: var(--theme-card-bg, #1e1e1e);
    border: 1px solid var(--theme-border, #333);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.comment-float-panel .comment-float-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--theme-border, #333);
    font-size: 14px;
    font-weight: 600;
}
.comment-float-panel .comment-float-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
    background: none;
    border: none;
    color: inherit;
    padding: 0 4px;
}
.comment-float-panel .comment-float-close:hover {
    opacity: 1;
}
.comment-float-panel .comment-float-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
}
.comment-float-panel .comment-float-body .comment-section {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}
.comment-float-panel .comment-float-body .comment-list {
    max-height: 40vh;
    overflow-y: auto;
}
/* 浮窗遮罩 */
.comment-float-overlay {
    position: fixed;
    inset: 0;
    z-index: 1049;
    background: transparent;
}

/* ============================================================
   Bootstrap 暗色模式 (如使用 Bootstrap 5.3+ dark 模式)
   ============================================================ */
[data-bs-theme="dark"] {
  --bs-body-color: var(--theme-text);
  --bs-body-bg: var(--theme-bg);
  --bs-emphasis-color: var(--theme-text);
  --bs-secondary-color: var(--theme-text-secondary);
  --bs-tertiary-color: var(--theme-text-muted);
  --bs-border-color: var(--theme-border);
  --bs-primary: var(--theme-primary);
  --bs-success: var(--theme-success);
  --bs-warning: var(--theme-warning);
  --bs-danger: var(--theme-danger);
  --bs-info: var(--theme-info);
}
