/* ============================================
   Jackie's Blog - Custom Styles (Light & Vibrant)
   ============================================ */

/* 全局字体优化 */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #faf8ff;
  color: #334155;
}

/* 主内容区域 */
#content-inner,
#page {
  background: transparent !important;
}

/* ========== 导航栏 - 白色毛玻璃 ========== */
#nav {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.12) !important;
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.04) !important;
}

#nav .site-name,
#nav .menus_item a {
  color: #1e293b !important;
  font-weight: 500;
}

#nav .menus_item a:hover {
  color: #a855f7 !important;
}

/* ========== 首页顶部区域 ========== */
#page-header {
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

#page-header #site-title {
  font-weight: 700;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

#page-header #site-subtitle {
  font-weight: 300;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
}

/* 顶部遮罩渐变 - 从背景图浅紫到页面背景 */
#page-header::before {
  background: linear-gradient(to bottom, transparent 30%, #faf8ff 100%) !important;
}

/* 文章页面不显示顶部背景图 */
.post #page-header {
  background-image: none !important;
  background: transparent !important;
}

.post #page-header::before {
  display: none !important;
}

.post #page-header #site-title {
  text-shadow: none;
  color: #1e293b;
}

.post #page-header #site-subtitle {
  text-shadow: none;
  color: #64748b;
}

/* ========== 侧边栏隐藏底部四个区块 ========== */
#aside-content .card-categories,
#aside-content .card-tags,
#aside-content .card-archives,
#aside-content .card-webinfo {
  display: none !important;
}

/* ========== 文章卡片 ========== */
#recent-posts .recent-post-item {
  border-radius: 16px !important;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(168, 85, 247, 0.1) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#recent-posts .recent-post-item:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 48px rgba(168, 85, 247, 0.15) !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
}

/* 文章卡片封面图悬停放大 */
#recent-posts .recent-post-item .post_cover img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#recent-posts .recent-post-item:hover .post_cover img {
  transform: scale(1.08) !important;
}

/* 文章卡片文字颜色 */
#recent-posts .recent-post-item .post-title a {
  color: #1e293b !important;
  transition: color 0.3s;
}

#recent-posts .recent-post-item .post-title a:hover {
  color: #a855f7 !important;
}

#recent-posts .recent-post-item .post-meta,
#recent-posts .recent-post-item .post-content {
  color: #64748b !important;
}

/* ========== 侧边栏卡片 ========== */
#aside-content .card-widget {
  border-radius: 16px !important;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(168, 85, 247, 0.08) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#aside-content .card-widget:hover {
  transform: translateY(-4px) scale(1.02) !important;
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.12) !important;
  border-color: rgba(168, 85, 247, 0.2) !important;
  background: rgba(255, 255, 255, 0.97) !important;
}

/* ========== 侧边栏个人信息 ========== */
#aside-content .card-info .card-info-data > .card-info-data-item a:first-child {
  color: #a855f7;
}

#aside-content .card-info .card-info-social-icons .social-icon {
  transition: all 0.3s ease !important;
}

#aside-content .card-info .card-info-social-icons .social-icon:hover {
  color: #a855f7 !important;
  transform: scale(1.2) !important;
}

/* 头像悬停旋转 */
#aside-content .card-info img {
  transition: all 0.5s ease !important;
}

#aside-content .card-info img:hover {
  transform: rotate(360deg) scale(1.1) !important;
}

/* ========== 公告区域 ========== */
#aside-content .card-announcement .item-headline i {
  color: #a855f7;
}

#aside-content .card-announcement .announcement_content {
  color: #64748b;
  line-height: 1.8;
}

/* ========== 最新文章侧边栏 ========== */
#aside-content .card-recent-post .recent-post-item {
  transition: all 0.3s ease !important;
  border-radius: 8px !important;
  padding: 8px !important;
}

#aside-content .card-recent-post .recent-post-item:hover {
  background: rgba(168, 85, 247, 0.06) !important;
  transform: translateX(4px) !important;
}

#aside-content .card-recent-post .recent-post-item .post-title a {
  color: #475569 !important;
  transition: color 0.2s;
}

#aside-content .card-recent-post .recent-post-item:hover .post-title a {
  color: #a855f7 !important;
}

/* ========== 标签和分类 ========== */
#aside-content .card-tags .card-tag-list a {
  transition: all 0.3s ease !important;
}

#aside-content .card-tags .card-tag-list a:hover {
  color: #a855f7 !important;
  transform: scale(1.1) !important;
}

#aside-content .card-categories ul .card-category-list-item:hover .card-category-list-name {
  color: #a855f7 !important;
}

/* ========== 文章页面优化 ========== */
#article-container {
  font-size: 16px;
  line-height: 1.8;
  color: #334155;
}

#article-container h1,
#article-container h2,
#article-container h3 {
  font-weight: 600;
  letter-spacing: -0.3px;
  color: #1e293b;
}

#article-container h2 {
  border-bottom: 2px solid rgba(168, 85, 247, 0.15);
  padding-bottom: 8px;
}

#article-container h2:before {
  color: #a855f7;
}

/* 链接样式 */
#article-container a {
  color: #a855f7;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

#article-container a:hover {
  border-bottom-color: #a855f7;
}

/* 代码块优化 */
#article-container pre,
#article-container code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', monospace;
}

#article-container pre {
  border-radius: 12px !important;
  background: rgba(15, 10, 25, 0.95) !important;
}

#article-container :not(pre) > code {
  background: rgba(168, 85, 247, 0.08) !important;
  color: #a855f7 !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  font-size: 0.875em;
}

/* 引用块优化 */
#article-container blockquote {
  border-left: 4px solid #a855f7;
  background: rgba(168, 85, 247, 0.04) !important;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px !important;
  color: #475569;
}

/* 表格优化 */
#article-container table {
  border-radius: 12px;
  overflow: hidden;
}

#article-container table th {
  background: rgba(168, 85, 247, 0.06);
  color: #a855f7;
}

#article-container table td {
  border-color: rgba(168, 85, 247, 0.06);
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.25);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.45);
}

/* ========== 按钮和交互元素 ========== */
#pagination .page-number.current {
  background: #a855f7 !important;
}

#pagination a:hover {
  color: #a855f7 !important;
}

/* ========== TOC 目录 ========== */
#aside-content #card-toc .toc-content .toc-link {
  color: #64748b;
  transition: all 0.3s ease;
}

#aside-content #card-toc .toc-content .toc-link:hover {
  color: #a855f7 !important;
  transform: translateX(4px);
}

#aside-content #card-toc .toc-content .toc-link.active {
  color: #a855f7 !important;
}

/* ========== 回到顶部 ========== */
#go-up {
  transition: all 0.3s ease !important;
}

#go-up:hover {
  background: #a855f7 !important;
  transform: translateY(-4px) !important;
}

/* ========== 页脚 ========== */
#footer {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  color: #64748b;
}

#footer a:hover {
  color: #a855f7 !important;
}

/* ========== 选中文字颜色 ========== */
::selection {
  background: rgba(168, 85, 247, 0.2);
  color: #1e293b;
}

/* ========== 页面过渡平滑 ========== */
html {
  scroll-behavior: smooth;
}

/* ========== 底部横向区块 ========== */
.footer-blocks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  margin: 30px 0 20px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.footer-blocks .fb-item {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 16px 20px;
  border: 1px solid rgba(168, 85, 247, 0.08);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  min-height: 0;
}

.footer-blocks .fb-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.25);
  background: rgba(255, 255, 255, 0.97);
}

.footer-blocks .fb-item .fb-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.footer-blocks .fb-item .fb-title i {
  color: #a855f7;
  font-size: 14px;
}

.footer-blocks .fb-item .fb-content {
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.footer-blocks .fb-item .fb-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-blocks .fb-item .fb-content ul li {
  padding: 2px 0;
  transition: transform 0.2s, color 0.2s;
}

.footer-blocks .fb-item .fb-content ul li a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-blocks .fb-item .fb-content ul li:hover {
  transform: translateX(4px);
}

.footer-blocks .fb-item .fb-content ul li a:hover {
  color: #a855f7;
}

.footer-blocks .fb-item .fb-content .fb-num {
  font-size: 20px;
  font-weight: 700;
  color: #a855f7;
  display: block;
  margin: 4px 0;
}

/* 标签云在底部区块中的样式 */
.footer-blocks .fb-tags .fb-content a {
  display: inline-block;
  padding: 1px 8px;
  margin: 2px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.1);
  transition: all 0.3s ease;
  font-size: 12px;
}

.footer-blocks .fb-tags .fb-content a:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.25);
  color: #a855f7 !important;
  transform: scale(1.1);
}

@media (max-width: 900px) {
  .footer-blocks {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .footer-blocks {
    grid-template-columns: 1fr;
  }
}

/* 暗色模式底部区块 */
[data-theme='dark'] .footer-blocks .fb-item {
  background: rgba(30, 20, 50, 0.85);
  border-color: rgba(168, 85, 247, 0.12);
}

[data-theme='dark'] .footer-blocks .fb-item:hover {
  background: rgba(30, 20, 50, 0.92);
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.2);
}

[data-theme='dark'] .footer-blocks .fb-item .fb-title {
  color: #e2e8f0;
}

[data-theme='dark'] .footer-blocks .fb-item .fb-content {
  color: #94a3b8;
}

[data-theme='dark'] .footer-blocks .fb-item .fb-content ul li a {
  color: #94a3b8;
}

[data-theme='dark'] .footer-blocks .fb-tags .fb-content a {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.12);
}

[data-theme='dark'] .footer-blocks .fb-tags .fb-content a:hover {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.3);
  color: #c084fc !important;
}

/* ========== 音乐播放按钮 ========== */
/* 放在 rightside 设置面板内 */
.rightside-config-hide .music-toggle-btn,
#rightside-config-hide .music-toggle-btn {
  margin-top: 12px !important;
}

.music-toggle-btn {
  display: block !important;
  width: 35px !important;
  height: 35px !important;
  border-radius: 5px !important;
  background-color: var(--btn-bg) !important;
  color: var(--btn-color) !important;
  border: none !important;
  text-align: center;
  line-height: 35px !important;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  padding: 0 !important;
  font-size: 16px !important;
  margin-bottom: 5px;
}

.music-toggle-btn svg {
  vertical-align: middle;
  margin-top: -2px;
}

.music-toggle-btn:hover {
  background-color: var(--btn-hover-color) !important;
}

.music-toggle-btn.playing {
  animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(168, 85, 247, 0); }
}

/* ========== 暗色模式（保持一致风格） ========== */
[data-theme='dark'] body {
  background: #1a1025;
  color: #e2e8f0;
}

[data-theme='dark'] #nav {
  background: rgba(26, 16, 37, 0.85) !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.15) !important;
}

[data-theme='dark'] #nav .site-name,
[data-theme='dark'] #nav .menus_item a {
  color: #e2e8f0 !important;
}

[data-theme='dark'] #nav .menus_item a:hover {
  color: #c084fc !important;
}

[data-theme='dark'] #page-header::before {
  background: linear-gradient(to bottom, transparent 40%, #1a1025 100%) !important;
}

[data-theme='dark'] .post #page-header #site-title {
  color: #e2e8f0;
}

[data-theme='dark'] .post #page-header #site-subtitle {
  color: #94a3b8;
}

[data-theme='dark'] #recent-posts .recent-post-item {
  background: rgba(30, 20, 50, 0.85) !important;
  border-color: rgba(168, 85, 247, 0.12) !important;
}

[data-theme='dark'] #recent-posts .recent-post-item:hover {
  border-color: rgba(168, 85, 247, 0.3) !important;
  box-shadow: 0 16px 48px rgba(168, 85, 247, 0.15) !important;
}

[data-theme='dark'] #recent-posts .recent-post-item .post-title a {
  color: #e2e8f0 !important;
}

[data-theme='dark'] #recent-posts .recent-post-item .post-title a:hover {
  color: #c084fc !important;
}

[data-theme='dark'] #recent-posts .recent-post-item .post-meta,
[data-theme='dark'] #recent-posts .recent-post-item .post-content {
  color: #94a3b8 !important;
}

[data-theme='dark'] #aside-content .card-widget {
  background: rgba(30, 20, 50, 0.85) !important;
  border-color: rgba(168, 85, 247, 0.1) !important;
}

[data-theme='dark'] #aside-content .card-widget:hover {
  border-color: rgba(168, 85, 247, 0.25) !important;
  background: rgba(30, 20, 50, 0.92) !important;
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.15) !important;
}

[data-theme='dark'] #aside-content .card-recent-post .recent-post-item .post-title a {
  color: #cbd5e1 !important;
}

[data-theme='dark'] #aside-content .card-recent-post .recent-post-item:hover .post-title a {
  color: #c084fc !important;
}

[data-theme='dark'] .card-announcement .announcement_content {
  color: #94a3b8;
}

[data-theme='dark'] #article-container {
  color: #e2e8f0;
}

[data-theme='dark'] #article-container h1,
[data-theme='dark'] #article-container h2,
[data-theme='dark'] #article-container h3 {
  color: #f1f5f9;
}

[data-theme='dark'] #article-container h2 {
  border-bottom-color: rgba(168, 85, 247, 0.2);
}

[data-theme='dark'] #article-container blockquote {
  background: rgba(168, 85, 247, 0.06) !important;
  color: #cbd5e1;
}

[data-theme='dark'] #footer {
  background: rgba(26, 16, 37, 0.8);
  color: #94a3b8;
}

[data-theme='dark'] ::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
}
