/* ===== 全局样式 ===== */
body {
  background: #f7f9fb;
  font-family: "Microsoft Yahei", sans-serif;
  color: #333;
}

/* ===== 文件列表表格样式 ===== */
.table.filelist > thead {
  background: #f1f5f9;
}
.table.filelist th,
.table.filelist td {
  vertical-align: middle;
}
.table.filelist tr:hover {
  background-color: #f9f9f9;
}
.table.filelist td a {
  padding: 4px 6px;
  border-radius: 4px;
  color: #fff;
  background: #3b82f6;
  text-decoration: none;
  margin-right: 4px;
  font-size: 13px;
}
.table.filelist td a:hover {
  background: #2563eb;
}

/* ===== 徽章 / 标签样式 ===== */
.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  color: #fff;
  vertical-align: middle;
}
.label.label-default {
  background: #e5e7eb;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  color: #333;
}

/* ===== 颜色类（背景+文字） ===== */
.bg-primary   { background-color: #e0edff; color: #2563eb; }
.bg-success   { background-color: #d1fae5; color: #065f46; }
.bg-purple    { background-color: #ede9fe; color: #6b21a8; }
.bg-warning   { background-color: #fef3c7; color: #92400e; }
.bg-danger    { background-color: #fee2e2; color: #b91c1c; }
.bg-secondary { background-color: #e5e7eb; color: #374151; }
.bg-info      { background-color: #dbeafe; color: #1e40af; }

/* ===== 按钮样式 ===== */
.btn-xs {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  margin-bottom: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #fff !important;
  transition: all 0.2s ease-in-out;
}
.btn-success {
  background-color: #10b981;
}
.btn-success:hover {
  background-color: #059669;
}
.btn-info {
  background-color: #3b82f6;
}
.btn-info:hover {
  background-color: #2563eb;
}

/* ===== 软预览按钮样式 ===== */
.preview-soft {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: color-mix(in oklab, #3b82f6 8%, #f1f5f9);
  border: 1px solid color-mix(in oklab, #3b82f6 10%, #f1f5f9);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.2s ease-in-out;
}
.preview-soft:hover {
  background: color-mix(in oklab, #3b82f6 15%, #e0eaff);
  color: #fff;
  box-shadow: 0 2px 6px rgba(59,130,246,0.25);
}

/* ===== 轮播图样式 ===== */
.slider-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  border-radius: 10px;
  margin: 0 auto 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  aspect-ratio: 16 / 5;
}
.slider {
  display: flex;
  transition: transform 0.6s ease-in-out;
  height: 100%;
}
.slider a {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
}
.slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.slider-progress {
  height: 4px;
  background: #e2e8f0;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}
.slider-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(to right, #3b82f6, #60a5fa);
  transition: none;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #000;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
  border-radius: 50%;
  transition: background 0.25s ease;
}
.slider-btn.left  { left: 12px; }
.slider-btn.right { right: 12px; }
@media (hover: hover) and (pointer: fine) {
  .slider-btn:hover,
  .slider-btn:active {
    background: rgba(0, 0, 0, 0.15);
  }
}

/* ===== 通知框样式 ===== */
.notice-box {
  margin-bottom: 10px;
  background-color: #f0f9ff;
  border: 1px solid #cfeafe;
  border-radius: 6px;
  color: #0369a1;
  font-size: 14px;
  position: relative;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding: 0 15px;
  transform: translateY(-5px) scale(0.98);
  transform-origin: top center;
  animation-fill-mode: forwards;
  transition: margin-bottom 0.4s ease;
}
.notice-box i {
  margin-right: 6px;
}
.notice-close {
  position: absolute;
  top: 8px;
  right: 10px;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s;
}
.notice-close:hover {
  color: #dc2626;
}
@keyframes noticeFadeIn {
  0% {
    opacity: 0;
    max-height: 0;
    padding: 0 15px;
    transform: translateY(-5px) scale(0.98);
  }
  100% {
    opacity: 1;
    max-height: 200px;
    padding: 10px 15px;
    transform: translateY(0) scale(1);
  }
}
@keyframes noticeFadeOut {
  0% {
    opacity: 1;
    max-height: 200px;
    padding: 10px 15px;
    transform: translateY(0) scale(1);
    filter: none;
  }
  100% {
    opacity: 0;
    max-height: 0;
    padding: 0 15px;
    margin-bottom: 0;
    transform: translateY(20px) scale(0.9);
    filter: blur(4px);
  }
}
.notice-show {
  animation: noticeFadeIn 0.5s ease forwards;
}
.notice-hide {
  animation: noticeFadeOut 0.5s ease forwards;
  pointer-events: none;
}
.notice-box.blue {
  background-color: #f0f9ff;
  border-color: #cfeafe;
  color: #0369a1;
}
.notice-box.green {
  background-color: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.notice-box.yellow {
  background-color: #f5f5f5;
  color: #333;
}

/* ===== 侧边广告样式 ===== */
:root {
  --page-max-width: 1200px;
  --ad-width: 180px;
}
.side-ad {
  position: fixed;
  top: 100px;
  width: 240px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "Microsoft YaHei", sans-serif;
}
.left-ad {
  left: calc((100vw - var(--page-max-width)) / 2 - 250px);
}
.right-ad {
  right: calc((100vw - var(--page-max-width)) / 2 - 250px);
}
.side-ad a {
  position: relative;
  display: block;
  width: 100%;
  min-width: 100%;
  height: 40px;
  line-height: 40px;
  box-sizing: border-box;
  text-align: center;
  color: #333;
  font-size: 14px;
  border: 1px dashed #999;
  border-radius: 4px;
  text-decoration: none;
  background-color: transparent;
  white-space: nowrap;
  transition: all 0.2s ease-in-out;
  overflow: hidden;
}
.side-ad a:hover {
  color: #007bff;
  border-color: #007bff;
  transform: scale(1.01);
}
.side-ad a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
}
.side-ad a:hover::before {
  animation: shine 0.8s ease forwards;
}
@keyframes shine {
  from {
    left: -60%;
  }
  to {
    left: 120%;
  }
}
@media screen and (max-width: 992px) {
  .side-ad {
    display: none;
  }
}
