/* 全局滚动条隐藏 - 确保所有可滚动元素都隐藏滚动条 */
* {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* 确保 html 元素也隐藏滚动条 */
html {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* 自定义字体 */
@font-face {
  font-family: "CustomFont";
  src: url("https://cdn.lightxi.com/cloudreve/uploads/2025/08/05/Gx8dY4ld_regular-fontw5.ttf")
    format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CustomFont";
  src: url("https://cdn.lightxi.com/cloudreve/uploads/2025/08/05/tMZTU9WG_bold-fontw9.ttf")
    format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: "CustomFont", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #fff;
  color: #333;
  margin: 0;
  display: flex;
  min-height: 100vh;
  /* 隐藏整个页面的滚动条 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* 隐藏 body 的滚动条 */
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* 横屏时确保正确的布局和滚动 */
@media (orientation: landscape) and (min-width: 769px) {
  body {
    overflow: hidden;
  }

  .main-content {
    height: 100vh;
    overflow-y: auto;
    /* 确保横屏时主内容区滚动条隐藏 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }

  /* 横屏时主内容区滚动条隐藏 */
  .main-content::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
  }
}

.container {
  display: flex;
  flex-grow: 1;
}

.sidebar {
  width: 300px;
  padding: 40px;
  background-color: #fff;
  overflow-y: auto;
  height: 100vh;
  /* 隐藏侧边栏滚动条 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  transition: width 0.3s ease, padding 0.3s ease; /* 添加平滑过渡动画 */
}

/* 超大屏幕 (1600px+) - 最宽的侧边栏 */
@media (min-width: 1600px) and (orientation: landscape) {
  .sidebar {
    width: 340px;
    padding: 60px;
  }
}

/* 大屏幕 (1400px-1599px) - 宽侧边栏 */
@media (min-width: 1400px) and (max-width: 1599px) and (orientation: landscape) {
  .sidebar {
    width: 300px;
    padding: 50px;
  }
}

/* 中大屏幕 (1200px-1399px) - 标准偏宽侧边栏 */
@media (min-width: 1200px) and (max-width: 1399px) and (orientation: landscape) {
  .sidebar {
    width: 260px;
    padding: 45px;
  }
}

/* 中等屏幕 (1024px-1199px) - 标准侧边栏 */
@media (min-width: 1024px) and (max-width: 1199px) and (orientation: landscape) {
  .sidebar {
    width: 220px;
    padding: 35px;
  }
}

/* 中小屏幕 (900px-1023px) - 较窄侧边栏 */
@media (min-width: 900px) and (max-width: 1023px) and (orientation: landscape) {
  .sidebar {
    width: 180px;
    padding: 25px;
  }

  /* 调整头像和字体大小 */
  .avatar {
    width: 90px;
    height: 90px;
  }

  h1 {
    font-size: 2em;
  }
}

/* 小屏幕横屏 (769px-899px) - 最窄侧边栏 */
@media (min-width: 769px) and (max-width: 899px) and (orientation: landscape) {
  .sidebar {
    width: 180px;
    padding: 20px;
  }

  /* 调整头像和字体大小 */
  .avatar {
    width: 80px;
    height: 80px;
  }

  h1 {
    font-size: 1.8em;
  }

  .profile p {
    font-size: 0.9em;
  }

  h2 {
    font-size: 1.1em;
  }

  li {
    font-size: 0.9em;
  }
}

/* 隐藏侧边栏的滚动条 */
.sidebar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.profile {
  text-align: left;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

h1 {
  font-size: 2.5em;
  margin: 20px 0 10px;
  font-weight: 600;
}

.profile p {
  font-size: 1em;
  color: #666;
}

.icons span {
  margin-right: 10px;
  font-size: 1.2em;
}

.work,
.life {
  margin-top: 40px;
}

.work ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 0 0;
}

.work li {
  margin-bottom: 8px;
  font-size: 1em;
  display: flex;
  align-items: center;
  line-height: 1.6;
}

.icon-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 3px;
  margin-right: 1px;
}

.inline-icon {
  width: 20px;
  height: 20px;
  object-fit: cover;
  vertical-align: middle;
}

/* 新增图标和间距调整 */
.social-icons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 15px;
}

.social-icon-link {
  display: block;
  width: 36px;
  height: 36px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s ease-out;
  transform: scale(1);
}

.social-icon-link:hover {
  transform: scale(1.15);
  transition: transform 0.2s ease-out;
}

/* 修改Find me部分 */
.find-me h2 {
  margin-bottom: 10px;
}

h2 {
  font-size: 1.2em;
  color: #999;
  font-weight: 500;
  border: none;
}

.collection h3,
.section-title {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  margin-bottom: 10px;
  font-size: 1em;
}

li a {
  text-decoration: none;
  color: #333;
}

/* 主内容区域响应式调整 */
.main-content {
  flex: 1;
  padding: 40px 100px;
  background-color: #f7f7f7;
  container-type: inline-size;
  /* 隐藏主内容区滚动条 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  transition: padding 0.3s ease; /* 添加平滑过渡动画 */
}

/* 超大屏幕主内容区调整 */
@media (min-width: 1600px) and (orientation: landscape) {
  .main-content {
    padding: 40px 140px;
  }
}

/* 大屏幕主内容区调整 */
@media (min-width: 1400px) and (max-width: 1599px) and (orientation: landscape) {
  .main-content {
    padding: 40px 120px;
  }
}

/* 中大屏幕主内容区调整 */
@media (min-width: 1200px) and (max-width: 1399px) and (orientation: landscape) {
  .main-content {
    padding: 40px 100px;
  }
}

/* 中等屏幕主内容区调整 */
@media (min-width: 1024px) and (max-width: 1199px) and (orientation: landscape) {
  .main-content {
    padding: 40px 80px;
  }
}

/* 中小屏幕主内容区调整 */
@media (min-width: 900px) and (max-width: 1023px) and (orientation: landscape) {
  .main-content {
    padding: 40px 60px;
  }
}

/* 小屏幕横屏主内容区调整 */
@media (min-width: 769px) and (max-width: 899px) and (orientation: landscape) {
  .main-content {
    padding: 40px 40px;
  }
}

/* 隐藏主内容区的滚动条 */
.main-content::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* 新的导航栏设计 */
.tabs {
  position: relative;
  z-index: 100;
  margin-bottom: 20px;
}

.tabs-container {
  display: flex;
  padding: 20px 0;
  overflow-x: auto;
  overflow-y: hidden;
  /* 隐藏滚动条 - 所有浏览器兼容 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* 隐藏 WebKit 浏览器（Chrome, Safari, Edge）的滚动条 */
.tabs-container::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* 横屏时固定在顶部 */
@media (orientation: landscape) and (min-width: 769px) {
  .tabs {
    position: fixed;
    top: 0;
    right: 0;
    background: rgba(247, 247, 247, 0.45);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    margin-bottom: 0;
    border-bottom: none;
    box-shadow: none;
    isolation: isolate;
    z-index: 100;
  }

  .tabs-container {
    padding: 20px 100px;
    overflow-x: visible; /* 横屏时不需要滚动 */
  }

  /* 为固定导航栏留出空间 */
  .main-content {
    padding-top: 100px;
  }
}

/* 超大屏幕导航栏调整 */
@media (min-width: 1600px) and (orientation: landscape) {
  .tabs {
    left: 440px; /* 380px + 60px*2 */
  }

  .tabs-container {
    padding: 20px 140px;
  }
}

/* 大屏幕导航栏调整 */
@media (min-width: 1400px) and (max-width: 1599px) and (orientation: landscape) {
  .tabs {
    left: 400px; /* 340px + 50px*2 */
  }

  .tabs-container {
    padding: 20px 120px;
  }
}

/* 中大屏幕导航栏调整 */
@media (min-width: 1200px) and (max-width: 1399px) and (orientation: landscape) {
  .tabs {
    left: 350px; /* 300px + 45px*2 */
  }

  .tabs-container {
    padding: 20px 100px;
  }
}

/* 中等屏幕导航栏调整 */
@media (min-width: 1024px) and (max-width: 1199px) and (orientation: landscape) {
  .tabs {
    left: 290px; /* 260px + 35px*2 */
  }

  .tabs-container {
    padding: 20px 80px;
  }
}

/* 中小屏幕导航栏调整 */
@media (min-width: 900px) and (max-width: 1023px) and (orientation: landscape) {
  .tabs {
    left: 230px; /* 220px + 25px*2 */
  }

  .tabs-container {
    padding: 20px 60px;
  }
}

/* 小屏幕横屏导航栏调整 */
@media (min-width: 769px) and (max-width: 899px) and (orientation: landscape) {
  .tabs {
    left: 220px; /* 180px + 20px*2 */
  }

  .tabs-container {
    padding: 20px 40px;
  }
}

/* 竖屏时滚动到位置才固定 */
@media (orientation: portrait), (max-width: 768px) {
  .tabs {
    position: sticky;
    top: 0;
    background: rgba(247, 247, 247, 0.45);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    margin-left: -20px;
    margin-right: -20px;
    border-bottom: none;
    box-shadow: none;
    isolation: isolate;
  }

  .tabs-container {
    padding: 20px;
    gap: 8px; /* 按钮之间的间距 */
  }
}

.tab-button {
  background: none;
  border: none;
  padding: 8px 24px;
  font-size: 1em;
  cursor: pointer;
  border-radius: 25px;
  color: #333;
  position: relative;
  transition: all 0.3s ease;
  font-weight: 500;
  white-space: nowrap; /* 防止按钮文字换行 */
  flex-shrink: 0; /* 防止按钮被压缩 */
}

/* 竖屏时保持按钮固定尺寸 */
@media (orientation: portrait), (max-width: 768px) {
  .tab-button {
    min-width: 80px; /* 设置最小宽度确保按钮不会太小 */
  }
}

.tab-button:last-child {
  margin-right: 20px; /* 最后一个按钮添加右边距，确保滚动时有足够空间 */
}

.tab-button.active {
  color: #fff;
  background-color: #000;
}

.tab-button:hover:not(.active) {
  background-color: rgba(0, 0, 0, 0.05);
}

/* 移除旧的指示器 */
.tab-indicator {
  display: none;
}

.tab-content {
  display: none;
  /* 性能优化：硬件加速 */
  transform: translate3d(0, 0, 0);
  will-change: opacity;
  backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
}

.tab-content.active {
  display: block;
  /* 切换动画优化 */
  animation: fadeInContent 0.2s ease-out;
}

/* 添加内容淡入动画 */
@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.collection {
  margin-top: 0px;
  margin-bottom: 0px;
}

.collection h3,
.section-title {
  font-size: 2.2em; /* 增大标题字体大小 */
}

.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: calc((100cqi - 80px) / 5);
  gap: 25px; /* 增加小部件之间的间距以容纳阴影 */
  padding: 0px 10px; /* 添加内边距防止阴影被裁切 */
  margin: -15px; /* 抵消内边距对布局的影响 */
}

/* 竖屏或小屏幕下的响应式布局 */
@media (orientation: portrait) {
  .gallery {
    grid-template-columns: repeat(2, 1fr) !important; /* 强制两列布局 */
    grid-auto-rows: calc((100cqi - 40px) / 2);
    gap: 20px;
    align-content: start; /* 根据内容自动调整行数 */
  }
}

/* 音乐集合限制为1行，确保5个专辑在一行内显示，网格稍微小一点 */
.collection:first-of-type .gallery {
  grid-template-rows: repeat(1, calc((100cqi - 120px) / 5));
  overflow: visible;
  padding-bottom: 20px;
  gap: 25px; /* 确保与相册集合边距一致 */
  padding: 10px; /* 确保与相册集合内边距一致 */
  margin: -15px; /* 确保与相册集合外边距一致 */
}

/* 记录页gallery样式优化，确保小部件为正方形 */
#records .gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: calc((100cqi - 80px) / 5); /* 确保网格单元为正方形 */
  gap: 25px;
  padding: 0px 10px;
  margin: -15px;
}

/* 记录页竖屏模式下的响应式布局 */
@media (orientation: portrait) {
  #records .gallery {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: unset !important; /* 由项目自身的 aspect-ratio 决定高度 */
    gap: 16px;
    align-content: start;
    padding: 12px;
    margin: -12px;
    align-items: start;
  }

  /* 确保竖屏模式下记录小部件为正方形并等比缩小 */
  #records .widget {
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    height: auto !important; /* 让高度跟随宽度计算出来的正方形 */
    box-sizing: border-box !important;
    transform: scale(0.85) !important; /* 等比缩小15% */
    transform-origin: center !important;
  }

  /* 优化文件夹小部件的圆角（进一步增大）*/
  #records .widget .folder {
    border-radius: 22px !important;
    width: 100% !important;
    height: 100% !important;
  }

  #records .widget .folder::before {
    border-radius: 14px 14px 0 0 !important;
  }

  #records .widget .folder-pocket {
    border-radius: 0 0 22px 22px !important;
  }
}

/* 记录页横屏模式下确保小部件为正方形 */
@media (orientation: landscape) {
  #records .gallery {
    grid-template-columns: repeat(
      auto-fit,
      minmax(121.1px, 121.1px)
    ) !important;
    grid-auto-rows: minmax(121.1px, 121.1px) !important;
    justify-content: start;
    gap: 25px !important;
  }

  /* 确保记录页小部件本身为正方形 */
  #records .widget {
    aspect-ratio: 1 / 1 !important;
    width: 121.1px !important;
    height: 121.1px !important;
  }
}
#portfolio .gallery {
  grid-template-columns: repeat(auto-fit, minmax(121.1px, 121.1px)) !important;
  grid-auto-rows: minmax(121.1px, 121.1px) !important;
  justify-content: start;
  gap: 25px !important;
}

/* 确保项目小部件本身为正方形 */
#portfolio .project-widget {
  aspect-ratio: 1 / 1 !important;
  width: 121.1px !important;
  height: 121.1px !important;
}

/* 确保项目链接填满整个小部件 */
#portfolio .project-link {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box !important;
  padding: 0 !important;
  border: 5px solid #fff !important;
}

/* 为作品集合增加底部边距，为网格外部的文字留出空间 */
/* 横屏触摸屏：移除点击蓝色高亮/选择框，仅保留键盘可见焦点 */
@media (orientation: landscape) and (pointer: coarse) {
  a,
  button,
  .widget,
  .project-link,
  .tab-button,
  .social-icon-link {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    outline: none !important;
    user-select: none !important;
  }

  a:focus,
  button:focus,
  .widget:focus,
  .project-link:focus,
  .tab-button:focus,
  .social-icon-link:focus {
    outline: none !important;
  }

  a:focus-visible,
  button:focus-visible,
  .project-link:focus-visible,
  .tab-button:focus-visible {
    outline: none !important;
  }
}

#portfolio .collection {
  margin-bottom: 60px;
}

/* 性能优化：启用硬件加速 */
.widget {
  overflow: hidden;
  border-radius: 25px; /* 横屏时默认圆角 */
  background-color: #fff;
  border: none; /* 默认不添加边框 */
  box-sizing: border-box;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out,
    border-radius 0.2s ease-out;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
  /* 使用双层阴影确保更好的视觉效果和兼容性 */

  /* 硬件加速优化 */
  transform: translate3d(0, 0, 0);
  will-change: transform, box-shadow;
  backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;

  /* 初始状态：透明且稍微下移 */
  opacity: 0;
  transform: translate3d(0, 20px, 0);

  /* 相对定位以便添加遮罩 */
  position: relative;
}

/* 小部件加载遮罩 */
.widget::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
  z-index: 10;
  opacity: 1;
  transition: opacity 0.3s ease-out;

  /* 硬件加速 */
  transform: translate3d(0, 0, 0);
  will-change: opacity;
}

/* 加载动画 - 骨架屏效果 */
.widget.loading::before {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: widgetShimmer 1.5s infinite;
}

@keyframes widgetShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.widget.loaded::before {
  opacity: 0;
  pointer-events: none;
}

.widget:not(.cd-spinner-box):hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
  /* 优化悬停阴影效果，使用双层阴影增强层次感 */
}

/* 确保加载完成的小部件悬停效果正常 */
.widget.loaded:not(.cd-spinner-box):hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
}

/* 我的作品小部件不添加边框 */
.collection:nth-of-type(3) .widget {
  border: none;
}

/* 相册小部件添加白色边框，使用明确的类名选择器 */
.widget.photo-widget {
  border: 5px solid #fff !important;
  position: relative;
  z-index: 500;
  /* 为相册小部件优化阴影，减少对白边的影响 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  /* 移除初始状态的下移效果，防止加载完成后的上浮动画 */
  transform: translate3d(0, 0, 0) !important;
}

/* 相册小部件悬停时的阴影优化 */
.widget.photo-widget:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08), 0 3px 8px rgba(0, 0, 0, 0.06) !important;
}

/* 内联图标样式，使其看起来像emoji */
.inline-icon {
  width: 1.2em;
  height: 1.2em;
  vertical-align: text-bottom;
  margin-right: 0.3em;
  display: inline-block;
  border-radius: 4px;
}

/* 相册模态框样式 */
.photo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;

  /* 硬件加速优化 */
  transform: translate3d(0, 0, 0);
  will-change: opacity, visibility;
  backface-visibility: hidden;
}

.photo-modal.show {
  opacity: 1;
  visibility: visible;
}

.photo-modal-content {
  max-width: 85vw;
  max-height: 85vh;
  border-radius: 25px; /* 横屏时默认圆角 */
  overflow: hidden;
  transform: scale(0.1);
  transition: transform 0.4s ease-out, border-radius 0.2s ease-out;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3), 0 10px 40px rgba(0, 0, 0, 0.2);
  /* 使用双层阴影增强模态框的视觉层次 */
  transform-origin: center center;
  margin: 20px; /* 确保阴影不会被屏幕边缘裁切 */
}

.photo-modal.show .photo-modal-content {
  transform: scale(1);
}

.photo-modal img {
  max-width: 85vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 25px; /* 横屏时默认圆角 */
  transition: border-radius 0.2s ease-out;
}

.photo-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.photo-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.widget img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget.size-1x1 {
  grid-column: span 1;
  grid-row: span 1;
}

.widget.size-1x2 {
  grid-column: span 1;
  grid-row: span 2;
}

.widget.size-2x1 {
  grid-column: span 2;
  grid-row: span 1;
}

.widget.size-2x2 {
  grid-column: span 2;
  grid-row: span 2;
}

.find-me {
  margin-top: 40px;
}

/* Toast Styles */
#toast {
  position: absolute; /* Changed from fixed */
  background-color: #333;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
  pointer-events: none; /* So it doesn't interfere with mouse events */
}

#toast.show {
  opacity: 1;
  visibility: visible;
}

.social-icons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.social-icon-link {
  display: block;
  width: 32px;
  height: 32px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s ease-out;
  transform: scale(1);
}

.social-icon-link:hover {
  transform: scale(1.15);
  transition: transform 0.2s ease-out;
}

.social-icon-link.bilibili {
  background-image: url("https://cdn.lightxi.com/cloudreve/uploads/2025/08/21/6wJANqcB_blbl.png");
}

.social-icon-link.xiaohongshu {
  background-image: url("https://cdn.lightxi.com/cloudreve/uploads/2025/08/21/RI3xD0jo_rnote.png");
}

.social-icon-link.twitter {
  background-image: url("https://cdn.lightxi.com/cloudreve/uploads/2025/08/21/1QJ9Kvjy_xt.png");
}

.social-icon-link.email {
  background-image: url("https://cdn.lightxi.com/cloudreve/uploads/2025/08/21/GtgJ4UuI_eml.png");
}

.social-icon-link.qq {
  background-image: url("https://cdn.lightxi.com/cloudreve/uploads/2025/08/21/Nu5ueTCV_7476fac638bdab011065bf6edc44babf.png");
}

.social-icon-link.wechat {
  background-image: url("https://cdn.lightxi.com/cloudreve/uploads/2025/08/21/LfB5SiQ6_wc.png");
}

.social-icon-link.monster-club {
  background-image: url("https://cdn.lightxi.com/cloudreve/uploads/2025/08/21/tur0ruW7_%E6%AF%9B%E6%80%AA%E4%BF%B1%E4%B9%90%E9%83%A8_2.0.0.png");
}

.social-icon-link.weibo {
  background-image: url("https://cdn.lightxi.com/cloudreve/uploads/2025/08/21/tuixO073_%E5%BE%AE%E5%8D%9A_15.8.3.png");
}

.social-icon-link.coolapk {
  background-image: url("https://cdn.lightxi.com/cloudreve/uploads/2025/08/21/fkSjPfHe_ka.png");
}

/* =================================
   CD光碟播放器 - 完全独立样式系统
   ================================= */

/* CD光碟播放器主容器 */
.cd-spinner-box {
  position: relative !important;
  overflow: visible !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
  transition: none !important;
  cursor: pointer !important;
  z-index: 500 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: translate3d(0, 0, 0) !important;
  aspect-ratio: 1 / 1 !important; /* 确保容器始终为正方形 */
}

/* 音乐小部件禁用通用的加载遮罩 */
.cd-spinner-box::before {
  display: none !important;
}

/* 完全隐藏原始图片 */
.cd-spinner-box > img {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  z-index: -999 !important;
}

/* CD光碟外层容器 */
.cd-disc-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.25));
  z-index: 10;
  aspect-ratio: 1 / 1; /* 确保容器始终为正方形 */
}

/* CD环形纹理效果 */
.cd-disc-element {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  background: repeating-conic-gradient(
      from 0deg,
      transparent 0deg 1deg,
      rgba(255, 255, 255, 0.05) 1deg 2deg
    ),
    conic-gradient(
      from 0deg at center,
      #f8f8f8 0deg,
      #e8e8ff 45deg,
      #ffe8e8 90deg,
      #e8ffe8 135deg,
      #ffe8ff 180deg,
      #ffffe8 225deg,
      #e8ffff 270deg,
      #f8f8f8 315deg,
      #f8f8f8 360deg
    ),
    linear-gradient(135deg, #f8f8f8, #f0f0f0, #fbfbfb, #ededed);
  -webkit-mask: radial-gradient(
    circle at center,
    transparent 6.5%,
    black 7.25%
  );
  mask: radial-gradient(circle at center, transparent 6.5%, black 7.25%);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.6),
    inset 0 0 40px rgba(255, 255, 255, 0.3);
  border: 3px solid #d5d5d5;
  transform: translate3d(0, 0, 0);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* CD光碟加载状态的圆形遮罩 */
.cd-spinner-box.loading .cd-disc-element::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(90deg, #f8f9fa 25%, #e0e0e0 50%, #f8f9fa 75%);
  background-size: 200% 100%;
  animation: cdShimmer 1.5s infinite;
  z-index: 20;
  -webkit-mask: radial-gradient(
    circle at center,
    transparent 6.5%,
    black 7.25%
  );
  mask: radial-gradient(circle at center, transparent 6.5%, black 7.25%);
}

/* CD光碟加载动画 */
@keyframes cdShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* 隐藏加载时的专辑封面 */
.cd-spinner-box.loading .cd-cover-image {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

/* 加载完成后显示专辑封面 */
.cd-spinner-box.loaded .cd-cover-image {
  opacity: 1;
}

/* 专辑封面图片 */
.cd-cover-image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 65%;
  height: 65%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  z-index: 12;
  border: 1px solid rgba(210, 210, 210, 0.6);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* CD中心孔洞效果 */
.cd-disc-element::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(22px, 14.5%, 48px);
  height: clamp(22px, 14.5%, 48px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: clamp(2px, 0.6vmin, 4px) solid #c8c8c8;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4), 0 0 0 2px #ebebeb,
    0 2px 4px rgba(255, 255, 255, 0.8);
  z-index: 25; /* 确保在加载动画之上 */
  pointer-events: none;
}

/* CD光碟旋转动画效果 */
.cd-spinner-box:hover .cd-disc-element {
  transform: translate3d(0, 0, 0) rotate(180deg);
  filter: brightness(1.05);
}

/* 歌曲信息显示区域 */
.cd-text-display {
  position: absolute;
  top: calc(100% + 18px);
  left: 0;
  right: 0;
  background: transparent;
  color: #333;
  padding: 10px 5px;
  font-size: 0.9em;
  text-align: center;
  z-index: 600;
}

.cd-song-name {
  font-weight: 600;
  margin-bottom: 4px;
  color: #2c2c2c;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.1em;
}

.cd-performer-name {
  font-size: 1em;
  color: #666;
  opacity: 0.9;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =================================
   个人页面样式
   ================================= */

.personal-section {
  margin-bottom: 0px;
}

.personal-section h2 {
  font-size: 1.8em;
  color: #333;
  margin-bottom: 25px;
  font-weight: 600;
  position: relative;
  display: inline-block;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
}

.info-item {
  display: flex;
  font-size: 1.1em;
  line-height: 1.6;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
}

.info-label {
  color: #333;
  font-weight: 500;
  min-width: 70px;
}

.info-value {
  color: #555;
  margin-left: -10px;
}

.qa-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 修改QA项目的样式，去除卡片化设计 */
.qa-item {
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  transition: none;
  margin-bottom: 0;
}

.qa-item:last-child {
  margin-bottom: 0;
}

.qa-item:hover {
  box-shadow: none;
}

.qa-question {
  font-size: 1.2em;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.qa-answer {
  font-size: 1.05em;
  color: #555;
  line-height: 1.6;
  padding: 0;
}

/* 中等屏幕尺寸的圆角过渡 */
@media (max-width: 1024px) and (min-width: 769px) {
  .qa-item {
    border-radius: 0; /* 移除中等屏幕尺寸的过渡圆角 */
  }
}

/* 竖屏模式的优化 */
@media (orientation: portrait), (max-width: 768px) {
  .qa-item {
    border-radius: 0; /* 竖屏时移除圆角 */
    padding: 0;
  }

  .qa-question {
    font-size: 1.1em;
  }

  .qa-answer {
    font-size: 1em;
  }

  .info-item {
    font-size: 1em;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: calc((100vw - 75px) / 2);
    gap: 18px;
    padding: 12px;
    margin: -12px;
  }

  /* 作品页面在竖屏模式下改为列表形式 */
  #portfolio .gallery {
    display: flex !important;
    flex-direction: column;
    gap: 16px;
    padding: 12px;
    margin: -12px;
    grid-template-columns: none !important;
    grid-auto-rows: none !important;
  }

  /* 竖屏模式下项目小部件列表样式 */
  #portfolio .project-widget {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    background: #fff !important;
    border-radius: 12px !important;
    padding: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08) !important;
    height: auto !important;
    width: 100% !important;
    margin: 0 !important;
    aspect-ratio: unset !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative; /* 便于需要时放置覆盖层 */
    cursor: pointer; /* 提示可点击 */
  }

  /* 竖屏模式下项目小部件悬停效果 */
  #portfolio .project-widget:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-1px);
  }

  #portfolio .project-link {
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0;
    margin-right: 14px;
    border-radius: 10px !important;
    border: 3px solid #fff !important;
    overflow: hidden;
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  #portfolio .project-link img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
  }

  #portfolio .project-text-display {
    position: static !important;
    flex: 1;
    text-align: left;
    padding: 0;
    margin: 0;
    top: auto !important;
  }

  #portfolio .project-name {
    font-size: 1.1em;
    margin-bottom: 2px;
    font-weight: 600;
    color: #2c2c2c;
    line-height: 1.3;
  }

  #portfolio .project-date {
    font-size: 0.85em;
    color: #666;
    opacity: 0.9;
  }

  /* 竖屏模式下为作品集合增加底部边距 */
  #portfolio .collection {
    margin-bottom: 50px;
  }

  /* 音乐集合在竖屏模式下使用2列2行网格，增加行间距 */
  .collection:first-of-type .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(1, calc((100vw - 115px) / 2));
    overflow: visible;
    padding-bottom: 20px;
    gap: 68px 18px; /* 再次增加行间距近68px，第一个值是行间距，第二个值是列间距 */
    padding: 12px;
    margin: -12px;
  }

  /* 竖屏模式下显示前4个音乐小部件 */
  .collection:first-of-type .gallery .cd-spinner-box:nth-child(n + 5) {
    display: none !important;
  }

  /* 隐藏第7个及以后的相册小部件，确保不会多出一行 */
  .collection:nth-of-type(2) .gallery .widget:nth-child(n + 7) {
    display: none !important;
  }

  .scroll-gallery .widget {
    width: 200px;
  }

  /* 竖屏时的小部件尺寸调整，保持横屏比例 */
  .widget.size-2x1 {
    grid-column: span 2;
    grid-row: span 1;
  }

  .widget.size-2x2 {
    grid-column: span 2;
    grid-row: span 2;
  }

  .widget.size-1x1 {
    grid-column: span 1;
    grid-row: span 1;
  }

  .widget.size-1x2 {
    grid-column: span 1;
    grid-row: span 2;
  }

  /* 保持小部件内部图片比例 */
  .widget img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* 竖屏模式下的阴影优化 */
  .widget {
    /* 确保在竖屏模式下阴影也能完整显示 */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
    border-radius: 18px; /* 竖屏时缩小圆角从25px到1px */
    border: none; /* 竖屏模式下默认不添加边框 */
  }

  /* 移除移动端点击时的蓝色高亮框 */
  * {
    -webkit-tap-highlight-color: transparent;
    outline: none;
  }

  /* 相册小部件在竖屏模式下的特殊阴影优化 */
  .widget.photo-widget {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    border: 5px solid #fff !important; /* 确保竖屏模式下相册小部件也有白边 */
    /* 移除上浮动画效果 */
    transform: translate3d(0, 0, 0) !important;
  }

  /* 音乐集合在竖屏模式下的底部边距调整 */
  .collection:first-of-type {
    margin-bottom: 40px;
  }

  /* CD光盘播放器竖屏模式调整 */
  .cd-spinner-box {
    aspect-ratio: 1 / 1 !important; /* 确保容器始终为正方形 */
    width: calc((100vw - 130px) / 2); /* 调整宽度以改变大小 */
    height: calc((100vw - 130px) / 2); /* 调整高度与宽度相等 */
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto; /* 居中对齐 */
  }

  .cd-disc-container {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1; /* 确保容器始终为正方形 */
    filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.2));
  }

  .cd-disc-element {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1 !important;
    -webkit-mask: radial-gradient(
      circle at center,
      transparent 10px,
      black 11px
    );
    mask: radial-gradient(circle at center, transparent 10px, black 11px);
    border: 2px solid #d5d5d5;
    /* 确保在竖屏模式下保持完美圆形 */
    box-sizing: border-box;
    position: relative;
    display: block;
    border-radius: 50%;
  }

  .cd-disc-element::after {
    width: 24px;
    height: 24px;
    border: 2px solid #c8c8c8;
  }

  .cd-cover-image {
    width: 65%;
    height: 65%;
    aspect-ratio: 1 / 1;
  }

  .cd-text-display {
    font-size: 0.8em;
    padding: 6px 3px;
    top: calc(100% + 10px);
    background: transparent; /* 移除背景色 */
    border-radius: 8px;
    z-index: 650; /* 提高z-index确保显示在最上层 */
    max-width: 90%;
    left: 5%;
    right: 5%;
    margin: 0 auto;
    backdrop-filter: none; /* 移除磨砂效果 */
    -webkit-backdrop-filter: none; /* 移除磨砂效果 */
    box-shadow: none; /* 移除阴影 */
  }

  .cd-song-name {
    font-size: 1.05em;
    margin-bottom: 3px;
  }

  .cd-performer-name {
    font-size: 0.95em;
  }

  .cd-spinner-box:hover .cd-disc-element {
    transform: translate3d(0, 0, 0) rotate(90deg);
  }

  .widget:not(.cd-spinner-box):hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1), 0 6px 12px rgba(0, 0, 0, 0.06);
  }

  /* 相册小部件悬停时的特殊阴影 */
  .widget.photo-widget:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.05) !important;
  }

  /* 竖屏模式下的加载动画优化 */
  .widget.loading::before {
    background: linear-gradient(90deg, #f5f5f5 25%, #e8e8e8 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: widgetShimmer 1.2s infinite; /* 竖屏时加快动画速度 */
  }

  /* 竖屏模式下音乐小部件的圆形加载动画 */
  .cd-spinner-box.loading .cd-disc-element::before {
    background: linear-gradient(90deg, #f5f5f5 25%, #e8e8e8 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: cdShimmer 1.2s infinite; /* 竖屏时加快动画速度 */
  }

  /* 竖屏时其他元素的圆角优化 */
  .project-widget {
    border-radius: 0 !important; /* 确保项目小部件没有圆角 */
    background: transparent !important; /* 确保背景透明 */
    box-shadow: none !important; /* 确保没有阴影 */
  }

  /* 但在作品页面中允许背景和阴影 */
  #portfolio .project-widget {
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    border-radius: 15px !important;
  }

  .project-widget .project-icon {
    border-radius: 8px; /* 竖屏时项目图标圆角 */
  }

  .photo-modal-content {
    border-radius: 18px; /* 竖屏时模态框圆角 */
  }

  .photo-modal img {
    border-radius: 18px; /* 竖屏时模态框图片圆角 */
  }

  /* 确保容器不会裁切阴影 */
  .tab-content {
    overflow: visible;
  }

  .collection {
    overflow: visible;
  }

  /* 针对所有小屏幕设备的额外保护规则 */
  @media screen and (max-width: 768px) {
    .gallery {
      grid-template-columns: repeat(2, 1fr) !important;
    }

    .collection:first-of-type .gallery {
      grid-template-columns: repeat(2, 1fr) !important;
    }
  }
}

/* 添加纯文本链接样式 */
.qa-answer a {
  color: #0070f3;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.qa-answer a:hover {
  border-color: #0070f3;
}

/* 中等屏幕尺寸的圆角过渡 */
@media (max-width: 1024px) and (min-width: 769px) {
  .widget {
    border-radius: 22px; /* 中等屏幕尺寸的过渡圆角 */
  }

  .project-widget {
    border-radius: 0 !important; /* 确保项目小部件没有圆角 */
    background: transparent !important; /* 确保背景透明 */
    box-shadow: none !important; /* 确保没有阴影 */
  }

  .project-widget .project-icon {
    border-radius: 10px;
  }

  .photo-modal-content {
    border-radius: 22px;
  }

  .photo-modal img {
    border-radius: 22px;
  }
}

/* 横屏模式下的项目小部件样式 */
@media (orientation: landscape) and (max-height: 768px) {
  .project-widget {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .widget-main-content {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .widget-icon-container {
    margin-right: 15px;
    flex-shrink: 0;
  }

  .widget-icon-container .widget-icon {
    width: 50px;
    height: 50px;
  }

  .widget-text {
    display: flex;
    flex-direction: column;
  }

  .widget-tags {
    display: flex;
  }
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    min-height: 100vh; /* 确保容器至少占满整个视口高度 */
  }

  .sidebar {
    width: auto;
    padding: 20px;
    height: auto;
    flex-shrink: 0; /* 防止侧边栏被压缩 */
    /* 竖屏时侧边栏滚动条隐藏 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }

  /* 竖屏时侧边栏滚动条隐藏 */
  .sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
  }

  .main-content {
    padding: 20px;
    flex: 1; /* 让主内容区占据剩余的所有空间 */
    min-height: 100vh; /* 确保主内容区至少占满整个视口高度 */
    overflow-y: visible;
    overflow-x: visible; /* 确保水平方向也不裁切阴影 */
    /* 竖屏时主内容区滚动条隐藏 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }

  /* 竖屏时主内容区滚动条隐藏 */
  .main-content::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
  }
}

/* 平板设备HDR防护 */
@media (hover: none) and (pointer: coarse) and (min-width: 768px) and (max-width: 1200px) {
  /* 相册区域HDR防护 */
  .photo-widget img,
  .photo-modal img,
  #modalImage {
    /* 限制亮度和对比度，防止触发HDR */
    filter: brightness(0.9) contrast(0.9) saturate(0.95) !important;
  }

  /* 平板上的相册集合特别优化 */
  .collection:nth-of-type(2) .gallery .widget img {
    /* 额外降低相册图片的鮮艳度 */
    filter: brightness(0.85) contrast(0.85) saturate(0.9) !important;
  }

  /* 模态框中的图片特别处理 */
  .photo-modal-content img {
    /* 模态框中的图片更加保守的设置 */
    filter: brightness(0.8) contrast(0.8) saturate(0.85) !important;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
  }
}

/* =================================
   磨砂效果类（复制导航栏效果）
   ================================= */

.glass-effect {
  background: rgba(247, 247, 247, 0.7);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.glass-effect-light {
  background: rgba(240, 240, 240, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* =================================
   胶囊播放器样式
   ================================= */

.music-player {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  width: 90%;
  max-width: 500px;
  background: rgba(247, 247, 247, 0.7);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 12px 20px;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  /* 展开状态的最大高度 */
  max-height: 80px; /* 初始高度 */
}

.music-player.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* 展开状态 */
.music-player.expanded {
  border-radius: 20px;
  max-height: 450px;
  padding: 20px;
}

.music-player.hidden {
  display: none;
}

.player-content {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  flex-shrink: 0; /* 保持底部控制区域不变 */
}

/* 展开内容区域 */
.player-expanded-content {
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  margin: 0;
}

.music-player.expanded .player-expanded-content {
  opacity: 1;
  visibility: visible;
  max-height: 350px;
  padding: 20px 0;
  margin-bottom: 20px;
}

.player-album-cover {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  margin-left: -4px; /* 向左移动4px */
}

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

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

.player-song-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.player-artist {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 底部播放/暂停按钮 */
.player-controls .play-pause-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: transform 0.2s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #333;
}

.player-controls .play-pause-btn:hover {
  transform: scale(1.1);
}

/* 关闭按钮（红点） */
.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.close-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.close-dot {
  width: 12px;
  height: 12px;
  background-color: #ff3b30;
  border-radius: 50%;
  display: block;
}

/* 展开按钮（三条杠） */
.expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.expand-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.hamburger-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hamburger-lines span {
  width: 14px;
  height: 2px;
  background-color: #007aff;
  border-radius: 1px;
  display: block;
}

/* 展开内容中的专辑信息 */
.expanded-album-info {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0x;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.expanded-album-title {
  font-size: 20px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0;
  text-align: center;
  line-height: 1.2;
}

/* 展开内容中的播放列表 */
.expanded-playlist {
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 20px;
  /* 隐藏滚动条 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.expanded-playlist::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

.expanded-playlist-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
  transition: all 0.2s ease-out;
  border-left: 3px solid transparent;
  position: relative;
}

.expanded-playlist-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.expanded-playlist-item.active {
  background-color: transparent; /* 去掉灰色背景 */
  border-radius: 8px;
}

.expanded-playlist-item-info {
  flex: 1;
  min-width: 0;
  margin-left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.expanded-playlist-item-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  color: #1d1d1f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.expanded-playlist-item.active .expanded-playlist-item-title {
  color: #007aff; /* 正在播放的歌曲显示为蓝色 */
}

/* 音频频率图样式 */
.audio-visualizer {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 16px;
  margin-left: 10px;
}

.audio-bar {
  width: 3px;
  background: #007aff;
  border-radius: 1.5px;
  animation: audioJump 1.2s ease-in-out infinite;
}

.audio-bar:nth-child(1) {
  height: 4px;
  animation-delay: 0s;
}

.audio-bar:nth-child(2) {
  height: 8px;
  animation-delay: 0.2s;
}

.audio-bar:nth-child(3) {
  height: 12px;
  animation-delay: 0.4s;
}

.audio-bar:nth-child(4) {
  height: 6px;
  animation-delay: 0.6s;
}

.audio-bar:nth-child(5) {
  height: 10px;
  animation-delay: 0.8s;
}

@keyframes audioJump {
  0%,
  100% {
    transform: scaleY(0.3);
  }
  50% {
    transform: scaleY(1);
  }
}

.expanded-playlist-item-artist {
  font-size: 12px;
  color: #6e6e73;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* 展开内容中的进度控制 */
.expanded-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: -20px;
}

.expanded-time-current,
.expanded-time-total {
  font-size: 12px;
  color: #6e6e73;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 35px;
  font-weight: 500;
}

.expanded-time-current {
  text-align: right;
}

.expanded-time-total {
  text-align: left;
}

.expanded-progress-bar {
  flex: 1;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: height 0.2s ease-out;
}

.expanded-progress-bar:hover {
  height: 6px;
}

.expanded-progress-fill {
  height: 100%;
  background: #333;
  border-radius: 2px;
  transition: width 0.1s ease-out;
  width: 0%;
  position: relative;
}

.player-panel {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  /* 直接应用与导航栏相同的磨砂效果 */
  background: rgba(247, 247, 247, 0.7) !important;
  backdrop-filter: blur(30px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 10px;
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 450px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1001;
  /* 强制建立新的堆叠上下文以确保磨砂效果 */
  isolation: isolate;
  contain: layout style;
}

.player-panel.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* 面板头部 */
.panel-header {
  background: rgba(240, 240, 240, 0.6) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 20px;
  border-radius: 20px 20px 0 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.panel-album-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.panel-album-cover {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.panel-album-details {
  flex: 1;
  min-width: 0;
}

.panel-album-title {
  font-size: 20px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-album-artist {
  font-size: 16px;
  color: #6e6e73;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 面板内容区域 */
.panel-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-playlist {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.panel-playlist::-webkit-scrollbar {
  width: 4px;
}

.panel-playlist::-webkit-scrollbar-track {
  background: transparent;
}

.panel-playlist::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.playlist-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.2s ease-out;
  border-left: 3px solid transparent;
  position: relative;
}

.playlist-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.playlist-item.active {
  background-color: rgba(0, 0, 0, 0.08);
  border-left: 3px solid #333;
}

.playlist-item.active::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #333;
  border-radius: 50%;
  margin-right: 12px;
}

.playlist-item-info {
  flex: 1;
  min-width: 0;
  margin-left: 0;
}

.playlist-item.active .playlist-item-info {
  margin-left: 24px;
}

.playlist-item-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #1d1d1f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.playlist-item.active .playlist-item-title {
  color: #333;
}

.playlist-item-artist {
  font-size: 14px;
  color: #6e6e73;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.playlist-item-duration {
  font-size: 14px;
  color: #86868b;
  margin-left: 12px;
  min-width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 面板控制区域 */
.panel-controls {
  background: rgba(240, 240, 240, 0.6) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 20px;
  border-radius: 0 0 20px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.panel-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.time-current,
.time-total {
  font-size: 13px;
  color: #6e6e73;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 40px;
  font-weight: 500;
}

.time-current {
  text-align: right;
}

.time-total {
  text-align: left;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: height 0.2s ease-out;
}

.progress-bar:hover {
  height: 6px;
}

.progress-fill {
  height: 100%;
  background: #333;
  border-radius: 2px;
  transition: width 0.1s ease-out;
  width: 0%;
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #333;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.progress-bar:hover .progress-fill::after {
  opacity: 1;
}

/* 竖屏模式下的播放器优化 */
@media (max-width: 768px) {
  .music-player {
    bottom: 15px;
    left: 20px;
    right: 20px;
    width: auto;
    max-width: none;
    transform: translateX(0) translateY(100px);
    padding: 10px 16px;
    border-radius: 40px;
  }

  .music-player.show {
    transform: translateX(0) translateY(0);
  }

  .player-content {
    gap: 10px;
  }

  .player-album-cover {
    width: 35px;
    height: 35px;
    margin-left: -3px; /* 竖屏模式下向左移动3px */
  }

  .player-song-title {
    font-size: 14px;
  }

  .player-artist {
    font-size: 12px;
  }

  .close-btn,
  .expand-btn {
    width: 32px;
    height: 32px;
    padding: 6px;
  }

  .close-dot {
    width: 10px;
    height: 10px;
  }

  .hamburger-lines span {
    width: 12px;
    height: 1.5px;
  }

  .player-panel {
    border-radius: 16px;
    max-height: 320px;
    margin-left: 0;
    margin-right: 0;
    /* 竖屏模式也直接应用磨砂效果 */
    background: rgba(247, 247, 247, 0.7) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
  }

  .panel-header {
    padding: 16px;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(240, 240, 240, 0.6) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  }

  .panel-album-info {
    gap: 12px;
  }

  .panel-album-cover {
    width: 50px;
    height: 50px;
    border-radius: 10px;
  }

  .panel-album-title {
    font-size: 18px;
    margin-bottom: 2px;
  }

  .panel-album-artist {
    font-size: 14px;
  }

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

  .playlist-item-title {
    font-size: 15px;
  }

  .playlist-item-artist {
    font-size: 13px;
  }

  .playlist-item-duration {
    font-size: 13px;
    margin-left: 8px;
    min-width: 35px;
  }

  .panel-controls {
    padding: 16px;
    border-radius: 0 0 16px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(240, 240, 240, 0.6) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  }

  .panel-progress {
    gap: 12px;
    margin-bottom: 16px;
  }

  .time-current,
  .time-total {
    font-size: 12px;
    min-width: 35px;
  }
}

/* 项目小部件的基础样式 */
.project-widget {
  position: relative;
  overflow: visible;
  padding: 0;
  background: transparent !important; /* 强制覆盖.widget的背景色 */
  border: none !important; /* 强制覆盖.widget的边框 */
  box-shadow: none !important; /* 强制覆盖.widget的阴影 */
  border-radius: 0 !important; /* 强制覆盖.widget的圆角 */
  transition: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* 确保项目小部件没有::before伪元素遮罩 */
.project-widget::before {
  display: none !important;
}

.project-link {
  text-decoration: none;
  color: inherit;
  border-radius: 25px;
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
  height: 100%;
}

/* 项目文本显示区域 - 仿照光盘文本样式 */
.project-text-display {
  position: absolute;
  top: calc(100% + 18px);
  left: 0;
  right: 0;
  background: transparent;
  color: #333;
  padding: 10px 5px;
  font-size: 0.9em;
  text-align: center;
  z-index: 600;
}

.project-name {
  font-weight: 600;
  margin-bottom: 4px;
  color: #2c2c2c;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.1em;
}

.project-date {
  font-size: 1em;
  color: #666;
  opacity: 0.9;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.widget-icon-container {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.widget-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-text {
  margin-bottom: 15px;
}

.widget-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 5px;
}

.widget-subtitle {
  font-size: 0.9em;
  color: #666;
}

/* 虚线分隔符 */
.dashed-line {
  width: 100%;
  height: 1px;
  border-top: 2px dashed #eee;
  margin: 15px 0;
}

/* 标签容器和标签样式 */
.widget-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.widget-tag {
  padding: 6px 12px;
  background-color: #f5f5f5;
  border-radius: 15px;
  font-size: 0.9em;
  color: #333;
}

/* 项目小部件的悬停效果 */
.project-widget:hover .project-link {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08), 0 3px 8px rgba(0, 0, 0, 0.06);
}

.project-widget:hover .project-name {
  color: #000;
}

/* 移动端适配 */
@media (orientation: portrait), (max-width: 768px) {
  .project-widget {
    padding: 0;
  }

  .project-text-display {
    font-size: 1.2em;
    padding: 6px 3px;
    top: calc(100% + 10px);
    max-width: 90%;
    left: 5%;
    right: 5%;
    margin: 0 auto;
  }

  .project-name {
    font-size: 1.05em;
    margin-bottom: 3px;
  }

  .project-date {
    font-size: 0.95em;
  }
}
.widget .folder {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: #ff4d4d;
  border-radius: 12px;
  aspect-ratio: 1 / 1; /* 确保文件夹小部件为正方形 */
}

/* The folder tab */
.widget .folder::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 20px;
  width: 40%;
  height: 25px;
  background-color: #ff4d4d;
  border-radius: 8px 8px 0 0;
  z-index: 0;
}

.widget .paper {
  position: absolute;
  width: 85%;
  height: 75%;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease-out;
  top: 15%;
  left: 7.5%;
  z-index: 1;
}

.widget .paper:nth-of-type(1) {
  transform: rotate(-6deg);
}

.widget .paper:nth-of-type(2) {
  transform: rotate(4deg);
}

.widget .folder:hover .paper:nth-of-type(1) {
  transform: translateY(-10px) rotate(-8deg);
}

.widget .folder:hover .paper:nth-of-type(2) {
  transform: translateY(-15px) rotate(6deg);
}

.widget .folder-pocket {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 65%;
  background-color: #ff6666;
  border-radius: 0 0 12px 12px;
  padding: 15px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 2; /* On top of papers */
}

.widget .folder-label {
  color: white;
}

.widget .folder-title {
  font-size: 1.2em;
  font-weight: bold;
}

.widget .folder-count {
  font-size: 0.9em;
  opacity: 0.8;
}

.widget .folder-dots {
  display: flex;
}

.widget .dot {
  width: 4px;
  height: 4px;
  background-color: white;
  border-radius: 50%;
  margin-left: 4px;
}

.spacer {
  height: 120px;
}

@media (orientation: portrait) {
  .spacer {
    height: 40px;
  }
}
#article-content {
  color: #555;
  line-height: 1.6;
}

#article-content h1 {
  font-size: 1.6em;
  color: #333;
  font-weight: 600;
  margin: 0 0 12px 0;
}

#article-content h2 {
  font-size: 1.2em;
  color: #333;
  font-weight: 600;
  margin: 18px 0 6px 0;
}

#article-content h3 {
  font-size: 1.1em;
  color: #333;
  font-weight: 600;
  margin: 14px 0 4px 0;
}

#article-content p,
#article-content li {
  font-size: 1.05em;
  color: #555;
  line-height: 1.6;
}

#article-content ul,
#article-content ol {
  padding-left: 1.4em;
  margin: 6px 0 14px 0;
}

#article-content li {
  margin-bottom: 6px;
}

/* 移动端字体微调，保持与个人页一致的密度 */
@media (orientation: portrait), (max-width: 768px) {
  #article-content h1 {
    font-size: 1.4em;
  }
  #article-content h2 {
    font-size: 1.15em;
  }
  #article-content p,
  #article-content li {
    font-size: 1em;
  }
}
