/* ============================================================
   首页左右两栏布局
   ============================================================ */
#recent-posts.home-split {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

#recent-posts.home-split .home-main {
  flex: 2;
  min-width: 0;
}

#recent-posts.home-split .home-sidebar {
  flex: 1;
  min-width: 240px;
  max-width: 340px;
  position: sticky;
  top: 24px;
  z-index: 2;
  overflow: hidden; /* 兜底：阻止 Canvas 粒子溢出 */
  border-radius: 20px; /* 与卡片圆角一致，配合内部卡片形成层叠感 */
}

/* ============================================================
   文章缩略标题：极简，只显示标题
   ============================================================ */
#recent-posts.home-split .recent-post-item.home-compact {
  padding: 16px 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.15);
  background: transparent;
}

#recent-posts.home-split .recent-post-item.home-compact:last-child {
  border-bottom: none;
}

#recent-posts.home-split .recent-post-item.home-compact .recent-post-info {
  padding: 0;
}

#recent-posts.home-split .recent-post-item.home-compact .article-title {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--font-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

#recent-posts.home-split .recent-post-item.home-compact .article-title:hover {
  color: var(--theme-color, #49b1f5);
}

#recent-posts.home-split .recent-post-item.home-compact .sticky {
  margin-right: 6px;
  color: var(--theme-color, #49b1f5);
}

#recent-posts.home-split .recent-post-item.home-compact .post_cover,
#recent-posts.home-split .recent-post-item.home-compact .article-meta-wrap,
#recent-posts.home-split .recent-post-item.home-compact .content {
  display: none !important;
}

/* ============================================================
   三明治图层法（严格堆叠顺序，但限定在 .home-sidebar 内，不再霸屏）
   Layer 0: #weather-canvas   z-index: 0  pointer-events: none
   Layer 1: .weather-overlay  z-index: 1  pointer-events: none
   Layer 2+: .home-sidebar 内可交互 UI
   ============================================================ */
#weather-canvas {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  z-index: 0 !important;
  pointer-events: none !important;
  display: block;
  background: transparent;
  will-change: transform;
  transform: translateZ(0);
}

.weather-overlay {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: rgba(0, 0, 0, 0.3);
  will-change: transform;
  transform: translateZ(0);
}

/* 主内容浮于其上（保留此前保险层级） */
#body-wrap {
  position: relative;
  z-index: 2;
}

#rightside {
  position: relative;
  z-index: 3;
}

html,
body {
  overflow-x: hidden;
}

body {
  overflow-y: auto;
}

/* ============================================================
   玻璃拟态卡片：深灰 + 中性灰/白（去除香槟金强调）
   ============================================================ */
.home-sidebar .widget-card.glass-card {
  display: block;
  margin-bottom: 16px;
  padding: 18px 20px;
  border-radius: 20px;
  color: #f0f0f3;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(35, 36, 42, 0.62), rgba(22, 23, 28, 0.62));
  background-size: 200% 200%;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
  animation: card-float 5s ease-in-out infinite, card-shimmer 8s ease-in-out infinite;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-sidebar .widget-card.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.04) 0%, transparent 55%);
  pointer-events: none;
  z-index: 2;
}

.home-sidebar .widget-card.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@keyframes card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes card-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ============================================================
   天气卡片（紧凑式：顶部标签+城市 / 中心图标+温度+状态 / 底部范围）
   ============================================================ */
.weather-card.weather-card-compact {
  padding: 16px 18px 14px;
}

.weather-card-compact .weather-content {
  position: relative;
  z-index: 2;
}

/* 顶部行：左 天气图标+标签，右 定位图标+城市 */
.weather-card-compact .weather-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(240, 217, 181, 0.82);
}

.weather-card-compact .weather-label,
.weather-card-compact .weather-location {
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0.92;
}

.weather-card-compact .weather-label svg,
.weather-card-compact .weather-location svg {
  flex-shrink: 0;
}

.weather-card-compact .weather-label-icon {
  width: 18px;
  height: 18px;
  color: rgba(240, 217, 181, 0.85);
}

.weather-card-compact .weather-loc-icon {
  width: 13px;
  height: 13px;
  color: #D4A373;
}

.weather-card-compact #weather-city {
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* 中心主区：左 太阳图标，右 温度+状态 */
.weather-card-compact .weather-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 12px 0 10px;
}

.weather-card-compact .weather-main-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.weather-card-compact .weather-main-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 8px rgba(212, 163, 115, 0.35));
}

.weather-card-compact .weather-main-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.weather-card-compact .weather-main-temp {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: #FFEBC8;
  text-shadow: 0 2px 10px rgba(212, 163, 115, 0.25);
}

.weather-card-compact .weather-main-temp .weather-temp-unit {
  font-size: 18px;
  font-weight: 600;
  margin-left: 2px;
  opacity: 0.75;
  color: rgba(240, 217, 181, 0.85);
}

.weather-card-compact .weather-main-text {
  font-size: 14px;
  font-weight: 500;
  color: rgba(240, 217, 181, 0.88);
}

/* 底部温度范围 */
.weather-card-compact .weather-range-row {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: rgba(240, 217, 181, 0.6);
}

/* ============================================================
   音乐播放器：极简玻璃拟态（播放/暂停始终可见 + 音量条）
   ============================================================ */
.music-card {
  position: relative;
}

.music-card .music-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.music-card .music-cover-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.music-card .music-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.music-card .music-cover.spinning {
  animation: cover-spin 10s linear infinite;
  will-change: transform;
}

@keyframes cover-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.music-card .music-info {
  flex: 1;
  min-width: 0;
}

.music-card .music-tag {
  display: none; /* 已按需求移除 CLOUD MUSIC 文字 */
}

.music-card .music-extra {
  font-size: 11px;
  opacity: 0.55;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.55);
}

/* 进度条 */
.music-card .music-progress {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.music-card .music-time {
  font-size: 11px;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  color: rgba(255, 255, 255, 0.7);
}

.music-card .progress-track {
  flex: 1;
  position: relative;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.music-card .progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, #ffffff, #d0d0d0);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
  transition: width 0.1s linear;
}

.music-card .progress-thumb {
  position: absolute;
  left: 0%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  margin-left: -6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transform: scale(0.8);
  transition: transform 0.15s ease, left 0.1s linear;
}

.music-card .progress-track:hover .progress-thumb {
  transform: scale(1);
}

/* 控制区 */
.music-card .music-controls {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.music-card .ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  outline: none;
}

.music-card .ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.08);
}

.music-card .ctrl-btn svg {
  width: 18px;
  height: 18px;
}

/* 播放/暂停按钮：48px 热区 */
.music-card .ctrl-btn.play-btn {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ffffff, #cccccc);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
  color: #1a1a1f;
}

.music-card .ctrl-btn.play-btn:hover {
  background: linear-gradient(135deg, #ffffff, #d8d8d8);
  transform: scale(1.08);
}

.music-card .ctrl-btn.play-btn svg {
  width: 24px;
  height: 24px;
}

/* 音量控制 */
.music-card .music-volume {
  display: flex;
  align-items: center;
  gap: 6px;
}

.music-card .vol-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #ffffff;
  opacity: 0.85;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease;
  outline: none;
}

.music-card .vol-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.music-card .vol-btn svg {
  width: 16px;
  height: 16px;
}

.music-card .volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  outline: none;
  cursor: pointer;
}

.music-card .volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: transparent;
}

.music-card .volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}

.music-card .volume-slider:hover::-webkit-slider-thumb {
  transform: scale(1.15);
}

.music-card .volume-slider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
}

.music-card .volume-slider::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: #ffffff;
}

.music-card .volume-slider::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
}

/* 底部歌名滚动字幕 */
.music-card .music-marquee {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  overflow: hidden;
}

.music-card .marquee-inner {
  display: flex;
  width: max-content;
  will-change: transform;
}

.music-card .marquee-seg {
  white-space: nowrap;
  font-size: 12px;
  opacity: 0.85;
  padding-right: 48px;
  color: rgba(255, 255, 255, 0.85);
}

.music-card .music-marquee.scrolling .marquee-inner {
  animation: marquee-scroll 14s linear infinite;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   移动端
   ============================================================ */
@media (max-width: 900px) {
  #recent-posts.home-split {
    flex-direction: column;
  }

  #recent-posts.home-split .home-sidebar {
    position: static;
    max-width: 100%;
    width: 100%;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }

  #recent-posts.home-split .home-sidebar .widget-card.glass-card {
    flex: 1;
    min-width: 250px;
  }
}