/* 自定义页面样式 */

/* ========== 页面背景 ========== */
body {
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(120, 119, 198, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 119, 198, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(78, 84, 200, 0.05) 0%,
      transparent 70%
    ),
    linear-gradient(
      135deg,
      #f8fafc 0%,
      #e2e8f0 25%,
      #f1f5f9 50%,
      #e2e8f0 75%,
      #f8fafc 100%
    ) !important;
  background-attachment: fixed;
  min-height: 100vh;
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 暗色模式背景 */
[data-theme="dark"] body {
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(120, 119, 198, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 119, 198, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(78, 84, 200, 0.08) 0%,
      transparent 70%
    ),
    linear-gradient(
      135deg,
      #0f172a 0%,
      #1e293b 25%,
      #0f172a 50%,
      #1e293b 75%,
      #0f172a 100%
    ) !important;
  animation: gradientShiftDark 15s ease infinite;
}

@keyframes gradientShiftDark {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ========== 全局字体设置 ========== */
/* 中文：霞鹜文楷 | 英文：Inter (无衬线体) */
body,
#post,
#page,
.article-content,
#aside_content,
.markdown-body,
.markdown-body p,
.markdown-body li,
.markdown-body td,
.markdown-body th,
#post-meta,
.footer-custom-text {
  font-family:
    "LXGW WenKai",
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Noto Sans SC",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif !important;
}

/* 标题字体 */
h1,
h2,
h3,
h4,
h5,
h6,
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-family: "LXGW WenKai", Inter, "Noto Sans SC", sans-serif !important;
  font-weight: 600 !important;
}

/* 代码字体 */
code,
pre,
.markdown-body code,
.markdown-body pre {
  font-family:
    "Fira Code", "JetBrains Mono", "Cascadia Code", Consolas, monospace !important;
}

/* 导航栏字体 */
#nav .site-page,
#nav a {
  font-family: "LXGW WenKai", Inter, "Noto Sans SC", sans-serif !important;
}

/* 友链页面样式 */
.flink-desc {
  text-align: center;
  font-size: 1.2em;
  color: #666;
  margin-bottom: 30px;
}

.flink-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.flink-list-item {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.flink-list-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.flink-list-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.flink-item-icon img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.flink-item-name {
  font-weight: bold;
  font-size: 1.1em;
  color: #333;
}

.flink-item-desc {
  color: #888;
  font-size: 0.9em;
  text-align: center;
}

/* ========== 音乐页面样式 (APlayer + MetingJS) ========== */

.music-section {
  text-align: center;
  margin-bottom: 28px;
}

.music-intro {
  font-size: 1.05em;
  color: #666;
  letter-spacing: 0.5px;
}

/* --- 歌单卡片容器 --- */
.music-playlist-item {
  position: relative;
  border-radius: 16px;
  margin-bottom: 28px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.music-playlist-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* --- 卡片头部 --- */
.music-card-header {
  padding: 18px 22px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.music-card-platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.music-card-platform i {
  font-size: 1em;
}

.music-playlist-title {
  font-size: 1.2em;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.3px;
}

/* --- QQ音乐卡片：绿色系 --- */
.music-source-tencent {
  background: linear-gradient(165deg, #e8f9ee 0%, #f0fdf4 30%, #ffffff 100%);
  border: 1px solid rgba(17, 180, 88, 0.15);
  box-shadow: 0 4px 16px rgba(17, 180, 88, 0.08);
}

.music-source-tencent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #11b458, #34d058, #11b458);
}

.music-source-tencent .music-card-platform {
  background: rgba(17, 180, 88, 0.12);
  color: #0d7a3a;
}

.music-source-tencent .music-playlist-title {
  color: #0d3d1f;
}

.music-source-tencent:hover {
  box-shadow: 0 12px 32px rgba(17, 180, 88, 0.18);
}

.music-source-tencent .aplayer {
  border-radius: 0 0 16px 16px !important;
  border: none !important;
  box-shadow: none !important;
  background: rgba(255, 255, 255, 0.6) !important;
}

/* --- 网易云卡片：红色系 --- */
.music-source-netease {
  background: linear-gradient(165deg, #fdf0f0 0%, #fef5f5 30%, #ffffff 100%);
  border: 1px solid rgba(194, 12, 12, 0.12);
  box-shadow: 0 4px 16px rgba(194, 12, 12, 0.06);
}

.music-source-netease::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c20c0c, #e84040, #c20c0c);
}

.music-source-netease .music-card-platform {
  background: rgba(194, 12, 12, 0.1);
  color: #9b0a0a;
}

.music-source-netease .music-playlist-title {
  color: #3d0d0d;
}

.music-source-netease:hover {
  box-shadow: 0 12px 32px rgba(194, 12, 12, 0.15);
}

.music-source-netease .aplayer {
  border-radius: 0 0 16px 16px !important;
  border: none !important;
  box-shadow: none !important;
  background: rgba(255, 255, 255, 0.6) !important;
}

/* --- APlayer 内部微调 --- */
.aplayer {
  font-family: "LXGW WenKai", Inter, sans-serif !important;
  margin: 0 !important;
}

.aplayer .aplayer-info .aplayer-music .aplayer-title {
  font-weight: 600 !important;
}

.aplayer .aplayer-list ol li:hover {
  background: rgba(0, 0, 0, 0.04) !important;
}

.aplayer .aplayer-list ol li.aplayer-list-light {
  background: rgba(0, 0, 0, 0.06) !important;
}

/* --- 暗色模式 --- */
[data-theme="dark"] .music-intro {
  color: #aaa;
}

[data-theme="dark"] .music-source-tencent {
  background: linear-gradient(165deg, #0d2818 0%, #111d15 30%, #161b27 100%);
  border-color: rgba(45, 216, 122, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .music-source-tencent .music-card-platform {
  background: rgba(45, 216, 122, 0.15);
  color: #2dd87a;
}

[data-theme="dark"] .music-source-tencent .music-playlist-title {
  color: #b8f0ce;
}

[data-theme="dark"] .music-source-tencent .aplayer {
  background: rgba(22, 27, 39, 0.8) !important;
}

[data-theme="dark"] .music-source-netease {
  background: linear-gradient(165deg, #2a0d0d 0%, #1f1111 30%, #161b27 100%);
  border-color: rgba(240, 85, 85, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .music-source-netease .music-card-platform {
  background: rgba(240, 85, 85, 0.15);
  color: #f05555;
}

[data-theme="dark"] .music-source-netease .music-playlist-title {
  color: #f0c0c0;
}

[data-theme="dark"] .music-source-netease .aplayer {
  background: rgba(22, 27, 39, 0.8) !important;
}

[data-theme="dark"] .aplayer .aplayer-list ol li:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .aplayer .aplayer-list ol li.aplayer-list-light {
  background: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .flink-list-item {
  background: #2d2d2d;
}

[data-theme="dark"] .flink-item-name {
  color: #fff;
}

[data-theme="dark"] .flink-item-desc {
  color: #aaa;
}

/* 页脚美化样式 */
#footer {
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 40%, #dbe4ef 100%);
  color: #444;
  padding: 40px 0 20px;
  margin-top: 0;
  border-top: none;
  position: relative;
}

#footer::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg, transparent 0%, #f1f5f9 100%);
  pointer-events: none;
}

#footer .footer-custom-text {
  margin-bottom: 15px;
}

#footer p {
  margin: 8px 0;
  line-height: 1.6;
}

#footer a {
  color: #667eea;
  text-decoration: none;
  border-bottom: 1px dashed rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

#footer a:hover {
  color: #764ba2;
  border-bottom-color: #764ba2;
}

#footer .fa-heart {
  animation: heartbeat 1.5s ease-in-out infinite;
  display: inline-block;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* 页脚版权信息 */
#footer .copyright {
  font-size: 0.85em;
  color: #666;
  margin-top: 10px;
}

/* 页脚运行时间 */
#runtime {
  font-size: 0.85em;
  color: #666;
  margin: 8px 0;
}

/* 暗色模式页脚适配 */
[data-theme="dark"] #footer {
  background: linear-gradient(180deg, #1e293b 0%, #172033 40%, #0f172a 100%);
  color: #e0e0e0;
  border-top: none;
}

[data-theme="dark"] #footer::before {
  background: linear-gradient(180deg, transparent 0%, #1e293b 100%);
}

[data-theme="dark"] #footer a {
  color: #8b9cf7;
}

[data-theme="dark"] #footer a:hover {
  color: #a78bfa;
}

[data-theme="dark"] #footer .copyright,
[data-theme="dark"] #runtime {
  color: #aaa;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .flink-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .music-playlist-item {
    padding: 16px;
  }

  #footer {
    padding: 25px 15px 15px;
  }
}

/* ========== 分类/标签导航栏样式 ========== */
#catalog-bar {
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  border: 1px solid #e0e0e0;
  margin-bottom: 1rem;
  background: #fff;
  transition: border-color 0.3s ease;
}

#catalog-bar:hover {
  border-color: #667eea;
}

#catalog-bar i {
  color: #667eea;
  margin-right: 0.5rem;
}

#catalog-list {
  margin: 0 0.5rem;
  display: flex;
  white-space: nowrap;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#catalog-list::-webkit-scrollbar {
  display: none;
}

.catalog-list-item {
  display: inline-block;
}

.catalog-list-item a {
  display: inline-block;
  margin: 0 0.2em;
  padding: 0.3em 0.6em;
  font-weight: 500;
  border-radius: 8px;
  color: #555;
  font-size: 0.9em;
  transition: all 0.3s ease;
  text-decoration: none;
}

.catalog-list-item:hover a {
  background: #667eea;
  color: #fff;
}

.catalog-list-item.selected a {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

a.catalog-more {
  min-width: fit-content;
  font-weight: bold;
  color: #667eea;
  font-size: 0.9em;
  text-decoration: none;
  margin-left: auto;
}

a.catalog-more:hover {
  color: #764ba2;
}

/* 暗色模式适配 */
[data-theme="dark"] #catalog-bar {
  background: #2d2d2d;
  border-color: #444;
}

[data-theme="dark"] #catalog-bar:hover {
  border-color: #667eea;
}

[data-theme="dark"] .catalog-list-item a {
  color: #ccc;
}

[data-theme="dark"] .catalog-list-item:hover a,
[data-theme="dark"] .catalog-list-item.selected a {
  background: #667eea;
  color: #fff;
}

[data-theme="dark"] a.catalog-more {
  color: #8b9cf7;
}

[data-theme="dark"] a.catalog-more:hover {
  color: #a78bfa;
}

/* ========== 追番/追剧页面样式 (hexo-bilibili-bangumi 覆盖) ========== */

/* --- 引言区域 --- */
.bangumi-page blockquote,
#bangumi blockquote {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border-left: 4px solid #667eea;
  border-radius: 0 12px 12px 0;
  padding: 16px 24px;
  margin: 20px 0 30px;
  font-style: italic;
  color: #555;
}

[data-theme="dark"] .bangumi-page blockquote,
[data-theme="dark"] #bangumi blockquote {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
  border-left-color: #8b9cf7;
  color: #ccc;
}

/* --- 标签页导航 --- */
.bangumi-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0 20px !important;
  padding: 6px;
  background: rgba(102, 126, 234, 0.06);
  border-radius: 14px;
  width: fit-content;
}

a.bangumi-tab {
  padding: 10px 24px !important;
  border-radius: 10px;
  font-family: "LXGW WenKai", Inter, sans-serif !important;
  font-size: 0.95em;
  font-weight: 500;
  color: #555;
  transition: all 0.3s ease;
  text-decoration: none !important;
  cursor: pointer;
}

a.bangumi-tab:hover {
  background: rgba(102, 126, 234, 0.12);
  color: #667eea;
}

a.bangumi-tab.bangumi-active,
.bangumi-active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

[data-theme="dark"] .bangumi-tabs {
  background: rgba(102, 126, 234, 0.1);
}

[data-theme="dark"] a.bangumi-tab {
  color: #bbb;
}

[data-theme="dark"] a.bangumi-tab:hover {
  color: #8b9cf7;
  background: rgba(102, 126, 234, 0.15);
}

/* --- 内容卡片 --- */
.bangumi-item {
  background: #fff;
  border-radius: 14px !important;
  padding: 20px !important;
  margin-bottom: 16px !important;
  border-bottom: none !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  min-height: auto !important;
}

.bangumi-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .bangumi-item {
  background: #1e293b !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .bangumi-item:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* --- 封面图片 --- */
.bangumi-picture {
  position: relative !important;
  width: auto !important;
  left: auto !important;
  top: auto !important;
  float: left;
  margin-right: 20px;
}

.bangumi-picture img {
  border-radius: 10px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  object-fit: cover;
}

.bangumi-picture img:hover {
  transform: scale(1.03);
}

/* --- 信息区域 --- */
.bangumi-info {
  padding-left: 0 !important;
  overflow: hidden;
}

.bangumi-title {
  font-family: "LXGW WenKai", Inter, sans-serif !important;
  font-size: 1.2em !important;
  margin-bottom: 8px;
}

.bangumi-title a {
  color: #333;
  text-decoration: none !important;
  transition: color 0.3s ease;
}

.bangumi-title a:hover {
  color: #667eea;
}

[data-theme="dark"] .bangumi-title a {
  color: #e2e8f0;
}

[data-theme="dark"] .bangumi-title a:hover {
  color: #8b9cf7;
}

/* --- 元数据信息栏 --- */
.bangumi-info-items {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  float: none !important;
  width: auto !important;
  height: auto !important;
  color: #667eea !important;
}

.bangumi-info-item {
  background: rgba(102, 126, 234, 0.08);
  border-radius: 8px !important;
  padding: 6px 12px !important;
  border-right: none !important;
  width: auto !important;
  height: auto !important;
  text-align: center;
}

.bangumi-info-label {
  font-size: 0.7em;
  color: #888;
  line-height: 1.2;
}

.bangumi-info-item em {
  font-size: 0.85em;
  font-weight: 700;
  padding-top: 2px !important;
  color: #333;
}

[data-theme="dark"] .bangumi-info-item {
  background: rgba(102, 126, 234, 0.15);
}

[data-theme="dark"] .bangumi-info-item em {
  color: #e2e8f0;
}

[data-theme="dark"] .bangumi-info-label {
  color: #aaa;
}

.bangumi-info-total {
  font-size: 0.85em;
  padding-top: 6px !important;
}

/* --- 进度条 --- */
.bangumi-info .bangumi-progress {
  background-color: rgba(102, 126, 234, 0.1) !important;
  border-radius: 8px !important;
  height: 22px !important;
  margin-top: 10px !important;
}

.bangumi-info .bangumi-progress-text {
  font-family: "LXGW WenKai", Inter, sans-serif !important;
  font-size: 0.8em !important;
  color: #555 !important;
}

.bangumi-info .bangumi-progress .progress-bar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border-radius: 8px !important;
}

[data-theme="dark"] .bangumi-info .bangumi-progress {
  background-color: rgba(102, 126, 234, 0.15) !important;
}

[data-theme="dark"] .bangumi-info .bangumi-progress-text {
  color: #ccc !important;
}

/* --- 简介文本 --- */
.bangumi-comments {
  font-family: "LXGW WenKai", Inter, sans-serif !important;
  font-size: 0.88em !important;
  color: #666;
  margin-top: 12px !important;
  line-height: 1.6;
}

[data-theme="dark"] .bangumi-comments {
  color: #aaa !important;
}

/* --- 分页按钮 --- */
.bangumi-pagination {
  margin-top: 24px !important;
}

.bangumi-button {
  padding: 8px 20px !important;
  border-radius: 8px;
  font-family: "LXGW WenKai", Inter, sans-serif !important;
  transition: all 0.3s ease;
}

.bangumi-button:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: #fff !important;
}

/* ========== 音乐播放错误提示 ========== */
.music-error-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(50, 50, 50, 0.9);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9em;
  font-family: "LXGW WenKai", Inter, sans-serif;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.music-error-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

[data-theme="dark"] .music-error-toast {
  background: rgba(200, 200, 200, 0.9);
  color: #1e293b;
}
