/* ============================================================
   1. 基础重置与变量 (保持原版高质量动画和响应式比例)
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box; /* 核心：确保尺寸计算精准 */
  margin: 0;
  padding: 0;
}

:root {
  /* 丝滑的过渡时间和曲线 */
  --transition-standard: 0.3s ease; 
  --transition-theme: 1.0s ease-in-out; /* ease-in-out 让色彩转换更柔和 */
  /* 阳面 (亮色) 主题变量 */
  --bg-color: #e6f4f1;
  --bg-gradient: linear-gradient(135deg, #e6f4f1, #d8efe3);
  --text-color: #1f3d3a;
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-border: rgba(100, 150, 130, 0.3);

  /* 按钮专用尺寸变量 (基于 em，可随 font-size 缩放) */
  --base-scale: 12px; /* 这里控制按钮整体大小 */
  --toggle-width: 5.625em;
  --toggle-height: 2.5em;
  --sun-diameter: 2.125em;
  --sun-offset: calc((var(--toggle-height) - var(--sun-diameter)) / 2);

  /* 按钮颜色变量 */
  --bg-toggle-light: #7dc5c1;
  --bg-toggle-dark: #1d1f2c;
  --color-sun: #bbead2;
  --color-moon: #c4c9d1;
  --color-crater: #959db1;
  --color-star: #fff;
  --color-cloud-front: #f3fdff;
  --color-cloud-back: #aacadf;

  /* 阴影定义 */
  --shadow-primary: rgba(0, 0, 0, 0.25);
  --shadow-highlight: rgba(255, 255, 255, 0.94);
  --halo-color: rgba(255, 255, 255, 0.1); /* 太阳的光晕感 */

  /* 太阳旋转花朵 专控变量 */
  --flower-color-main: #82ad73;      /* 花朵主色调 */
  --flower-color-accent: #ececec;    /* 花芯/渐变层颜色 */
  --flower-opacity: 0.5;             /* 花瓣基础透明度 */
  --flower-scale: 0.13;              /* 缩放比例 (根据太阳大小微调) */
  --flower-spin-speed: 20s;          /* 旋转速度 (数值越大转得越慢) */
  /* 唱片 */
  --player-base-size: 8px; /* 默认大小，设为 10px 则变小，20px 则巨大 */
  --player-bg-light: rgba(255, 255, 255, 0.9);
  --player-bg-dark: rgba(20, 20, 20, 0.9);
  --player-accent: #667eea;
  --volume-bar-width: 6em;  
  --volume-icon-size: 1.2em;

  /* ============================================================
     星空背景控制变量
     ============================================================ */
  --star-color-light: 102, 126, 234; /* 白天模式星星颜色 (RGB: 浅棕或紫色) */
  --star-color-dark: 255, 255, 255;  /* 黑夜模式星星颜色 (纯白) */
  --current-star-rgb: 180, 140, 100;
  --star-move-y: 2000px;
  --star-speed-small: 100s;
  --star-speed-medium: 150s;
  --star-speed-big: 200s;

  /* 默认背景色 (白天) */
  --star-bg-gradient: radial-gradient(ellipse at bottom, #e6f4f1 0%, #d8efe3 100%);
  /* 字体 */
  --font-main: "KaiTi", "STKaiti", serif;
}

html{
  transition: background-color var(--transition-theme), color var(--transition-theme);
}
/* ============================================================
   2. 阴面 (暗色模式) 变量覆盖
   ============================================================ */
html.dark {
  --bg-color: #0a0a0a;
  --bg-gradient: linear-gradient(135deg, #0a0a0a, #1a1a1a);
  --text-color: #e5e5e5;
  --card-bg: #111;
  --card-border: #444;
  --star-bg-gradient: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
  --star-move-y: -2000px;
  --current-star-rgb: 255, 255, 255; 
}
.font-apply-dark {
  --font-main: "Noto Serif SC", serif; /* 黑夜字体 */
}

/* ============================================================
   3. 全局博客样式应用
   ============================================================ */
body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-color);
  font-family: var(--font-main);
  transition: background var(--transition-standard), color var(--transition-standard);
  min-height: 100vh;
  background: var(--bg-gradient);
  color: var(--text-color);
  
  /* 【核心修改】将过渡时间改为 var(--transition-theme) */
  transition: background var(--transition-theme), color var(--transition-theme);
  
  background-attachment: fixed;
  font-family: var(--font-main);
  min-height: 100vh;

}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  transition: all var(--transition-standard);
}

.img-hover {
  transition: transform 0.3s ease;
}
.img-hover:hover {
  transform: scale(1.03);
}

/* ============================================================
   4. 日月切换按钮核心样式 (完全回归源代码逻辑)
   ============================================================ */
.theme-toggle {
  font-size: var(--base-scale); /* 控制按钮大小的拉杆 */
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent; /* 移动端点击无高亮 */
  padding: 0; /* 移除默认 padding */
}

/* 舞台容器 */
.theme-toggle__container {
  width: var(--toggle-width);
  height: var(--toggle-height);
  background-color: var(--bg-toggle-light);
  border-radius: 100em; /* 胶囊形状 */
  position: relative;
  overflow: hidden; /* **核心：拉严窗帘，挡住外面的月亮和云** */
  transition: background-color var(--transition-standard);
  box-shadow: 0.06em 0.06em 0.125em rgba(255,255,255,0.4); /* 外阴影，增加立体感 */
}

html.dark .theme-toggle__container {
  background-color: var(--bg-toggle-dark);
}

/* 按钮内部上边缘的内阴影，增加深度感 */
.theme-toggle__container::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.5) inset;
  border-radius: 100em;
  pointer-events: none;
}

/* 主角：太阳 (也是月亮的参照物) */
.theme-toggle__sun {
  width: var(--sun-diameter);
  height: var(--sun-diameter);
  background-color: var(--color-sun);
  border-radius: 50%;
  position: absolute;
  top: var(--sun-offset);
  /* 白天位置 */
  transform: translateX(var(--sun-offset)); 
  transition: transform var(--transition-standard);
  
  /* 多层阴影：外发光 + 内部立体感 */
  box-shadow: 0.05em 0.125em 0.125em var(--shadow-primary),
    0em 0.05em 0.125em var(--shadow-primary),
    0.05em 0.05em 0.05em 0em rgba(254, 255, 239, 0.61) inset,
    0em -0.05em 0.05em 0em #a1872a inset, 
    0 0 0 0.625em var(--halo-color),
    0 0 0 1.25em var(--halo-color), 
    0 0 0 1.875em var(--halo-color);
    overflow: hidden;
}

/* 旋转花朵容器 */
.sun-decoration {
  position: absolute;
  top: 50%;
  left: 50%;
  /* 使用变量控制缩放 */
  transform: translate(-50%, -50%) scale(var(--flower-scale)); 
  width: 100px;
  height: 100px;
  pointer-events: none;
  z-index: 1;
  
  /* 使用变量控制旋转速度 */
  animation: lowSpeedSpin var(--flower-spin-speed) linear infinite;
  transition: opacity var(--transition-standard);
}
html.dark .sun-decoration {
  opacity: 0;
}

.sun-decoration span {
  position: absolute;
  width: 100px;
  height: 100px;
  background: var(--flower-color-main); /* 使用变量 */
  border-radius: 0px 90px;
  display: block;
}

/* 对应各个花瓣的透明度和渐变变量化 */
.sun-decoration span:nth-child(1) {
  transform: rotate(45deg);
  opacity: var(--flower-opacity);
  background: radial-gradient(circle, var(--flower-color-accent) 35%, var(--flower-color-main) 15%);
}

.sun-decoration span:nth-child(2) {
  transform: rotate(135deg);
  opacity: var(--flower-opacity);
  background: radial-gradient(circle, var(--flower-color-accent) 35%, var(--flower-color-main) 15%);
}

.sun-decoration span:nth-child(3) {
  transform: rotate(-5deg);
  opacity: var(--flower-opacity);
  background: radial-gradient(circle, var(--flower-color-accent) 15%, var(--flower-color-main) 50%);
}

.sun-decoration span:nth-child(4) {
  transform: rotate(95deg);
  opacity: var(--flower-opacity);
  background: radial-gradient(circle at -10px -15px, var(--flower-color-main) 50%, var(--flower-color-main) 50%);
}

/* 动画帧也需要同步变量，否则缩放会失效 */
@keyframes lowSpeedSpin {
  0% {
    transform: translate(-50%, -50%) scale(var(--flower-scale)) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) scale(var(--flower-scale)) rotate(360deg);
  }
}

/* 黑夜太阳移动到右侧 */
html.dark .theme-toggle__sun {
  transform: translateX(calc(var(--toggle-width) - var(--sun-diameter) - var(--sun-offset)));
}

/* **修复核心：月亮遮罩** */
.theme-toggle__moon-mask {
  position: absolute; /* **必须是绝对定位，才能相对于太阳对齐** */
  top: 0;             /* **强制顶端对齐** */
  left: 0;            /* **强制左侧对齐** */
  width: 100%;        /* **尺寸与太阳完全一致** */
  height: 100%;
  background-color: var(--color-moon);
  border-radius: inherit; /* 继承太阳的圆角 */
  
  /* **白天隐藏逻辑：向右推自身宽度的 100%，刚好滑出太阳边界** */
  transform: translateX(100%); 
  transition: transform var(--transition-standard);
  
  /* 月球立体感内阴影 */
  box-shadow: 
    0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset,
    0em -0.062em 0.062em 0em #969696 inset;
}

/* **黑夜月亮归位，完全覆盖太阳** */
html.dark .theme-toggle__moon-mask {
  transform: translateX(0);
}

/* 陨石坑 */
.theme-toggle__crater {
  position: absolute;
  background-color: var(--color-crater);
  border-radius: 50%;
  box-shadow: 0em 0.03em 0.06em rgba(0,0,0,0.25) inset;
}
.theme-toggle__crater:nth-child(1) { top: 30%; left: 15%; width: 30%; height: 30%; }
.theme-toggle__crater:nth-child(2) { top: 40%; left: 60%; width: 15%; height: 15%; }
.theme-toggle__crater:nth-child(3) { top: 15%; left: 45%; width: 10%; height: 10%; }

/* ============================================================
   5. 背景元素动画 (星星与云朵的跷跷板)
   ============================================================ */
/* 星空 */
.theme-toggle__stars {
  position: absolute;
  left: 0.3em;
  top: 0.5em;
  width: 2.75em;
  color: var(--color-star);
  /* 白天藏在天花板上面 */
  transform: translateY(-2.5em); 
  transition: transform var(--transition-standard);
}

.theme-toggle__flower::after {
  content: "";
  position: absolute;
  inset: -0.2em 0.25em;
  background-color: inherit;
  border-radius: 100em;
  box-shadow: 0.8em 0.7em 0 -0.1em rgba(255, 255, 255, 0.7);
  transform: rotate(-45deg);
}

/* 核心逻辑：白天显示，黑夜滑出 */
html.dark .theme-toggle__flower {
  transform: translateX(-2em); /* 向左滑出隐藏 */
  opacity: 0;
}

/* 黑夜降落 */
html.dark .theme-toggle__stars {
  transform: translateY(0);
}

/* 云朵 (巧妙的单 div + 多重 box-shadow 构造) */
.theme-toggle__clouds {
  position: absolute;
  left: 0.8em;
  bottom: -0.6em; /* 白天在底部露出一块 */
  width: 1.25em;
  height: 1.25em;
  background-color: var(--color-cloud-front);
  border-radius: 50%;
  
  /* 原版复杂的云群 box-shadow */
  box-shadow: 
    0.937em 0.312em var(--color-cloud-front),
    1.437em 0.375em var(--color-cloud-front), 2.187em 0 var(--color-cloud-front),
    2.937em 0.312em var(--color-cloud-front),
    3.625em -0.062em var(--color-cloud-front),
    4.5em -0.312em var(--color-cloud-front),
    4.625em -1.75em 0 0.437em var(--color-cloud-front),
    -0.312em -0.312em var(--color-cloud-back),
    0.5em -0.125em var(--color-cloud-back),
    1.25em -0.062em var(--color-cloud-back),
    2em -0.312em var(--color-cloud-back), 2.625em 0em var(--color-cloud-back),
    3.375em -0.437em var(--color-cloud-back),
    4em -0.625em var(--color-cloud-back),
    4.125em -2.125em 0 0.437em var(--color-cloud-back);
    
  /* 白天默认状态 */
  transform: translateY(0); 
  transition: transform var(--transition-standard);
}

/* 黑夜沉入地板以下消失 */
html.dark .theme-toggle__clouds {
  transform: translateY(3em);
}

/*=========================================== 
                    唱片部分
============================================= */
/* 播放器容器：固定左下角 */
.player-left-bottom {
  position: fixed;
  bottom: 2em;
  left: 8em; /* 改为左侧 */
  z-index: 9999;
  
  /* 关键：使用 em 单位。1em = --player-base-size */
  font-size: var(--player-base-size); 
  
  width: 36em;    /* 宽度随变量缩放 */
  height: 12em;   /* 高度随变量缩放 */
  background: var(--player-bg-light);
  backdrop-filter: blur(15px);
  border-radius: 2em;
  display: flex;
  align-items: center;
  padding-left: 8em; /* 为左侧超出的唱片留位置 */
  box-shadow: 0 1em 3em rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255,255,255,0.3);
  transition: all 0.3s ease;
  transform: translateY(100px); 
  opacity: 0;

  transition: opacity 0.5 ease,background var(--transition-standard);
}

/* 暗色模式适配 */
html.dark .player-left-bottom {
  background: var(--player-bg-dark);
  color: #eee;
  border: 1px solid rgba(255,255,255,0.1);
}

/* 黑胶唱片：尺寸全部使用 em */
.album {
  height: 14em; 
  width: 14em;
  border-radius: 50%;
  position: absolute;
  left: -7em; /* 露出一半在外面 */
  top: 50%;
  transform: translateY(-50%);
  background: #111;
  box-shadow: 0 0.5em 1.5em rgba(0, 0, 0, 0.4);
  overflow: hidden;
  cursor: grab;
  border: 0.4em solid #222;
}

.album img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }

/* 内部间距与文字 */
.songContainer {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5em 2em;
  height: 100%;
}

.songName { font-size: 1.4em; font-weight: 700; }
.artists { font-size: 1em; opacity: 0.7; }

/* 进度条 */
.seekBar {
    width: 100%;
    height: 0.6em; 
    background: rgba(0, 0, 0, 0.1);
    border-radius: 1em; /* 保持圆角 */
    margin-top: 1em;
    cursor: pointer;
    position: relative;
    transition: background var(--transition-standard);
  }
html.dark .seekBar { background: rgba(255,255,255,0.1); }

.seekProgress {
  height: 100%;
  background: var(--player-accent);
  width: 0%;
  position: relative;
}
.volume-box {
  display: flex;
  align-items: center;
  gap: 0.5em; /* 图标与条之间的间距 */
  margin-left: auto; /* 将音量控制推向右侧，与按钮拉开距离 */
}

#volumeIcon {
  width: var(--volume-icon-size);
  height: var(--volume-icon-size);
  opacity: 0.7;
  color: inherit; /* 自动跟随文字颜色 */
}

#volumeSlider {
  /* 使用变量控制长度 */
  width: var(--volume-bar-width); 
  
  height: 0.3em;
  cursor: pointer;
  accent-color: var(--player-accent); /* 进度条填充色 */
  
  /* 去除默认外观，使其更精致 */
  appearance: none;
  -webkit-appearance: none;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 1em;
  outline: none;
}

/* 暗色模式下的背景 */
html.dark #volumeSlider {
  background: rgba(255, 255, 255, 0.2);
}

/* 针对 Chrome 的滑块小圆点样式 (可选) */
#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0.8em;
  height: 0.8em;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  box-shadow: 0 0.1em 0.3em rgba(0,0,0,0.2);
}
/* 控制按钮 */
.playerControls { display: flex; align-items: center; gap: 2em; }
.control-btn { cursor: pointer; background: none; border: none; color: inherit; transition: scale 0.2s; }
.control-btn:hover { scale: 1.1; }

.volume-box input { width: 5em; height: 0.3em; accent-color: var(--player-accent); }
/* ============================================================
   新增：加载遮罩层样式
   ============================================================ */
#loader-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;            /* 开启 Flex 布局 */
    justify-content: center;   /* 水平居中 */
    align-items: center;       /* 垂直居中 */
    background: var(--bg-color);
    z-index: 99999;
    transition: opacity 0.8s ease, visibility 0.8s
}

.loader-content {
    display: flex;
    flex-direction: column;    /* 让圆环和文字上下排列 */
    align-items: center;       /* 确保子元素水平对齐 */
    justify-content: center;
}
/* 旋转转圈 */
.spinner-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 30px;
}

.spinner {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top-color: var(--player-accent);
    border-bottom-color: var(--player-accent);
    border-radius: 50%;
    animation: spin 2s linear infinite;
    opacity: 0.6;
}
.spinner-inner {
    position: absolute;
    inset: 15px;
    border: 2px solid transparent;
    border-left-color: var(--player-accent);
    border-right-color: var(--player-accent);
    border-radius: 50%;
    animation: spin-reverse 1.2s linear infinite;
}
#enter-text {
    font-family: var(--font-main);
    color: var(--player-accent);
    font-size: 1.2rem;
    letter-spacing: 0.6em; /* 更有意境 */
    padding-left: 0.6em; /* 抵消字间距带来的偏移 */
    cursor: pointer;
    animation: textPulse 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(var(--current-star-rgb), 0.3);
    width: 100%;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes spin-reverse {
    to { transform: rotate(-360deg); }
}
@keyframes textPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.96); }
    50% { opacity: 1; transform: scale(1); }
}

.fade-out {
    opacity: 0 !important;
    pointer-events: none;
}


/*====================================================== 
  星空背景容器 
========================================================*/

#star-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 底层：白天背景 */
    background: radial-gradient(ellipse at bottom, #e6f4f1 0%, #d8efe3 100%);
    z-index: -1;
    overflow: hidden;
}

#star-background::before {
    content: "";
    position: absolute;
    inset: 0;
    /* 顶层：黑夜背景 */
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    
    /* 初始透明度为 0（即显示底层的白天） */
    opacity: 0;
    
    /* 核心：控制这个透明度的过渡时间，这里设为 1.5s 显得更深邃 */
    transition: opacity 1.5s ease-in-out;
    z-index: -1;
}
html.dark #star-background::before {
    opacity: 1;
}
/* 星星基础样式 */
#stars, #stars2, #stars3 {
  background: transparent;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  animation: animStarDown var(--star-speed-small) linear infinite;
}
#stars, #stars2, #stars3, #star-flicker-layer {
  transition: none !important; 
}
#stars { width: 1px; height: 1px; animation-duration: 100s;
  animation-timing-function: linear;
  animation-iteration-count: infinite; }
#stars2 { width: 2px; height: 2px; animation-duration: 100s;
  animation-timing-function: linear;
  animation-iteration-count: infinite; }
#stars3 { width: 3px; height: 3px; animation-duration: 100s;
  animation-timing-function: linear;
  animation-iteration-count: infinite; }

/* 伪元素实现无限滚动 */
#stars::after, #stars2::after, #stars3::after {
    content: " ";
    position: absolute;
    /* 核心：永远在位移的反方向生成克隆体,这个厉害 */
    top: calc(var(--star-move-y) * -1); 
    width: inherit;
    height: inherit;
    background: transparent;
    box-shadow: inherit;
}
@keyframes starBlink {
  0% { opacity: 1; }
  30% { opacity: 0; } /* 快速消失 */
  70% { opacity: 0; } /* 保持 1s 左右的空白 */
  100% { opacity: 1; } /* 缓慢出现 */
}
.stars-flicker-active {
  animation: starBlink 1.0s ease-in-out forwards;
}
@keyframes animStarDown {
  from { transform: translateY(-2000px); }
  to { transform: translateY(0); }
}
@keyframes animStarUp {
  from { transform: translateY(0); }
  to { transform: translateY(-2000px); }
}
#stars::after, #stars2::after, #stars3::after {
  content: " ";
  position: absolute;
  /* 同时在上下都准备好克隆体，这是最稳妥的 */
  top: 2000px; 
  width: inherit;
  height: inherit;
  background: transparent;
  box-shadow: inherit;
}

/* 额外增加一个向上的克隆体，防止向上滚动时露底 */
#stars::before, #stars2::before, #stars3::before {
  content: " ";
  position: absolute;
  top: -2000px; 
  width: inherit;
  height: inherit;
  background: transparent;
  box-shadow: inherit;
}

/* 添加到 CSS 底部 */
.content-fading {
    opacity: 0;
    transform: translateY(5px); /* 稍微下沉，增加动感 */
}
#hero-title, #hero-tagline, #hero-motto, #main-photo, [id^="card-about-"] {  
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-out;
  white-space: pre-wrap;
  line-height: 1.6;
  margin-top: 0.5rem;
}
#songName, #artists
{
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-out;
}
/* 确保播放器文字在淡出时也有位移感 */
#songName.content-fading, #artists.content-fading {
    opacity: 0 !important;
    transform: translateY(5px);
}
/* 1. 图库容器：控制 4 列布局和间距 */
.character-gallery {
    display: grid;
    gap: 4rem;
}

.gallery-wardrobe {
    min-width: 0;
}

.gallery-text-card {
    margin-bottom: 1rem;
}

.gallery-character-title {
    font-size: 2rem;
    font-weight: 700;
    padding-left: 1rem;
    border-left: 4px solid currentColor;
}

.gallery-wardrobe-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gallery-fashion {
    margin-top: 2rem;
}

.gallery-fashion-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.gallery-description {
    opacity: 0.7;
    white-space: pre-wrap;
    line-height: 1.7;
    margin-top: 0.5rem;
}

.gallery-grid {
    display: grid;
    /* 核心：扩大间距，1.8rem 约 28px，让星空背景透出更多，更有设计感 */
    gap: 1.8rem; 
    
    /* 默认 2 列 (手机) */
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
}

/* 电脑端自动变为 4 列 */
@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 2. 单张图片的精致处理 */
.gallery-item {
    width: 100%;
    /* 核心：强制比例为正方形，确保像你图示那样整齐对齐 */
    aspect-ratio: 1 / 1; 
    object-fit: cover; /* 保证图片填充不留白、不拉伸 */
    
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    /* 保持原有的丝滑动画 */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: zoom-in;
}

/* 悬停效果：保持你的上浮设计 */
.gallery-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* 隐藏类：确保 JS 切换池子时生效 */
.hidden {
    display: none !important;
}

.details-entry-button {
    display: inline-block;
    margin-top: 1.25rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    opacity: 1;
    text-decoration: none;
}
/*======================================================= 
图片查看器
=========================================================*/
/* 图片查看器背景 */
#image-viewer {
    position: fixed;
    z-index: 30000; /* 确保在所有元素之上 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px); /* 增加高级感 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 当显示时的状态 */
#image-viewer.active {
    opacity: 1;
    display: flex ;
}

/* 查看器内部大图 */
.viewer-content {
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#image-viewer.active .viewer-content {
    transform: scale(1);
}

/* 关闭按钮 */
.close-viewer {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* 针对图库内图片的悬停放大效果 */
.gallery-grid img {
    /* 基础状态 */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease,
                border-color 0.4s ease;
    cursor: pointer;
    border: 2px solid transparent; /* 预留边框位置，防止抖动 */
}

/* 鼠标移上去时的状态 */
.gallery-grid img:hover {
    /* 1. 小小地放大：1.05 倍正好，既明显又不突兀 */
    transform: scale(1.05); 
    
    /* 2. 增加光晕/阴影：加强“被选中”的视觉感 */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    
    /* 3. 边框高亮（可选）：亮色模式用深色，暗色模式用亮色 */
    border-color: var(--player-accent); 
    
    /* 4. 提升层级：确保放大的图片不会被遮挡 */
    z-index: 20;
    position: relative;
}
