/* ========================================================
   Blog Custom CSS - Float Clearfix & Image Layout
   ======================================================== */

/* 1. Article Container Clearfix (BFC)
   Ensure floated images are completely enclosed so copyright box,
   author cards, comments, etc. NEVER overlap bottom of images */
#article-container,
.post-content,
#post .post-content {
  display: flow-root !important;
}

#article-container::after,
.post-content::after {
  content: "";
  display: table;
  clear: both;
}

/* 2. Force subsequent article sections to clear all floats */
.post-copyright,
#post-copyright,
.post-tools,
#post-tools,
#pagination,
#post-comment,
#giscus-wrap {
  clear: both !important;
  position: relative;
  z-index: 1;
}

/* 3. Floated & Custom-Aligned Article Images
   Make sure inline style width & float are respected and responsive */
#article-container img[style*="float: left"],
#article-container img[style*="float:left"] {
  float: left !important;
  display: inline-block !important;
  max-width: 100% !important;
  height: auto !important;
}

#article-container img[style*="float: right"],
#article-container img[style*="float:right"] {
  float: right !important;
  display: inline-block !important;
  max-width: 100% !important;
  height: auto !important;
}

#article-container div[align="center"] img {
  display: inline-block !important;
  margin: 0 auto !important;
  max-width: 100% !important;
  height: auto !important;
}

/* Handle AnZhiYu's fancybox wrapping <a> tags */
#article-container a:has(> img[style*="float: left"]),
#article-container a:has(> img[style*="float:left"]) {
  float: left !important;
  display: inline-block !important;
}

#article-container a:has(> img[style*="float: right"]),
#article-container a:has(> img[style*="float:right"]) {
  float: right !important;
  display: inline-block !important;
}


/* ========================================================
   Emotion Waterfall Gallery Styles
   ======================================================== */

#page:has(#album) .page-title,
#album + .page-title {
  display: none !important;
}

#album {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 0 40px;
}

.emotion-waterfall {
  column-count: 4;
  column-gap: 16px;
  width: 100%;
  margin: 0 auto;
}

@media screen and (max-width: 1200px) {
  .emotion-waterfall {
    column-count: 3;
    column-gap: 14px;
  }
}

@media screen and (max-width: 768px) {
  .emotion-waterfall {
    column-count: 2;
    column-gap: 10px;
  }
}

@media screen and (max-width: 480px) {
  .emotion-waterfall {
    column-count: 2;
    column-gap: 8px;
  }
}

.emotion-card {
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--anzhiyu-card-bg, #ffffff);
  border: 1px solid var(--anzhiyu-card-border, rgba(0, 0, 0, 0.08));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  display: block;
}

[data-theme="dark"] .emotion-card {
  background: var(--anzhiyu-card-bg, #1d1e22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.emotion-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--anzhiyu-main, #425AEF);
}

[data-theme="dark"] .emotion-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.emotion-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none !important;
  cursor: zoom-in;
  line-height: 0;
}

.emotion-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.emotion-card:hover .emotion-img {
  transform: scale(1.02);
}

.emotion-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--anzhiyu-secondtext, #858585);
  font-size: 1rem;
}

#page:has(#album),
#article-container:has(#album) {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}


/* ========================================================
   Home category bar: keep only "首页"
   ======================================================== */
#categoryBar .catalog-list-item:not([id="首页"]):not([id="/categories/哈姆宇宙/"]),
#categoryBar #category-bar-next,
#categoryBar .catalog-more {
  display: none !important;
}


/* breadcrumb separator: 首页 » 分类 */
#catalog-list .catalog-sep {
  margin: 0 10px;
  color: var(--anzhiyu-secondtext, #909399);
  font-weight: 600;
  letter-spacing: 1px;
  user-select: none;
}

/* breadcrumb: current chip */
#catalog-list .catalog-list-item.selected a {
  background: var(--anzhiyu-lighttext, #ff7e00);
  color: var(--anzhiyu-white, #fff);
  border-radius: 8px;
  padding: 0.1rem 0.6rem;
}
#catalog-list .catalog-list-item:not(.selected) a {
  background: transparent;
}

/* >>> console: always use the big-player layout (copied from theme <=1200px) */
  /* 移动端音乐列表 */
  body:has(#console.show) #nav-music .aplayer-list {
    display: block;
    position: absolute;
    z-index: 1;
    background: white;
    left: 0;
  }
  body:has(#console.show) .aplayer-list {
    max-height: none !important;
  }
  body:has(#console.show) .aplayer-list {
    position: fixed;
    display: none;
    width: 100%;
    bottom: -76%;
    left: 0;
    background: var(--sidebar-bg);
    height: auto;
    border-radius: 15px 15px 0px 0px;
    padding: 15px 0px;
  }
  body:has(#console.show) .aplayer-list.aplayer-list-hide {
    bottom: 0% !important;
  }
  body:has(#console.show) ol > li {
    display: flex;
    margin: 0 10px;
  }
  body:has(#console.show) ol > li span.aplayer-list-title {
    width: 30%;
  }
  body:has(#console.show) ol > li.aplayer-list-light {
    background: #33a673;
    padding: 5px 20px;
    border-radius: 10px;
  }

  body:has(#console.show) ol > li.aplayer-list-light span {
    color: #fff;
  }
  body:has(#console.show) ol > li span.aplayer-list-title {
    max-width: 55%;
    width: auto;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    overflow: hidden;
    -webkit-box-orient: vertical;
  }
  body:has(#console.show) ol > li span.aplayer-list-author {
    position: absolute;
    right: 10px;
    width: auto;
    max-width: 35%;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    overflow: hidden;
    -webkit-box-orient: vertical;
  }
  body:has(#console.show) ol > li.aplayer-list-light span.aplayer-list-author {
    right: 15px;
  }
  /* 移动端音乐 */
  body:has(#console.show) meting-js {
    position: relative;
  }
  #console .console-card-group {
    justify-content: center;
  }

  #console .console-card-group {
    display: none;
  }

  #console .console-card-group-right {
    width: 100%;
    margin: 0;
  }

  #consoleCommentBarrage {
    display: none;
  }

  #console .button-group {
    position: absolute;
    bottom: 70px;
  }
  body:has(#console.show) #nav-music #nav-music-hoverTips {
    display: none;
  }
  body:has(#console.show) #nav-music {
    position: fixed;
    display: block !important;
    left: 5.2%;
    top: 3.9rem !important;
    height: 70%;
    width: 85%;
  }
  body:has(#console.show) #console-music-bg {
    display: block;
    filter: blur(33px);
    display: block;
    background: #000000;
    opacity: 0.58;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    transform: scale(1.2);
  }
  [data-theme="dark"] body:has(#console.show) #console-music-bg {
    background: var(--anzhiyu-white);
  }
  body:has(#console.show) #console-music-bg::after {
    box-shadow: inset 0 0px 10px 116px #000000;
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
  }
  [data-theme="dark"] body:has(#console.show) #console-music-bg::after {
    box-shadow: inset 0 0px 10px 116px var(--anzhiyu-white);
  }
  body:has(#console.show) #nav-music .aplayer.aplayer-withlrc .aplayer-pic {
    height: 100px;
    width: 100px;
    border-radius: 50%;
    animation: none;
    border: none;
    transform: none !important;
    box-shadow: none;
    margin-top: 80px;
  }

  body:has(#console.show) #nav-music .aplayer {
    padding: 30px;
    border-radius: 0;
  }
  body:has(#console.show) #nav-music .aplayer .aplayer-info .aplayer-music .aplayer-title,
  body:has(#console.show) #nav-music .aplayer .aplayer-info .aplayer-music .aplayer-author {
    color: var(--anzhiyu-white);
  }
  body:has(#console.show) #nav-music .aplayer.aplayer-withlrc .aplayer-info {
    width: 100%;
    height: 45%;
  }
  body:has(#console.show) #nav-music .aplayer .aplayer-body {
    justify-content: space-between;
  }
  body:has(#console.show) #nav-music .aplayer.aplayer-withlrc .aplayer-info::after {
    position: absolute;
    content: "iPhone";
    top: -20px;
    left: 0;
    color: #b5b8bc;
  }
  body:has(#console.show) #nav-music .aplayer .aplayer-info .aplayer-music {
    padding: 25px 0 0;
    position: absolute;
    left: 0;
  }
  body:has(#console.show) #nav-music .aplayer.aplayer-withlrc .aplayer-lrc {
    height: 25px;
    text-align: left;
  }

  body:has(#console.show) #nav-music .aplayer .aplayer-lrc p.aplayer-lrc-current {
    color: var(--anzhiyu-white);
    font-size: 20px;
    line-height: 25px !important;
    float: left;
    white-space: nowrap;
    animation: an-text-roll 4s cubic-bezier(0.6, 0, 0.5, 1) alternate infinite;
    min-width: 100%;
    /* margin: 0; */
  }
  body:has(#console.show) #nav-music .aplayer .aplayer-lrc p {
    color: var(--anzhiyu-white);
    font-size: 16px;
    margin: 0;
    margin-top: 20px;
    margin-bottom: 20px;
  }
  body:has(#console.show) #nav-music .aplayer .aplayer-lrc .aplayer-lrc-contents {
    margin: -40px 0px 0;
  }
  body:has(#console.show) #nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-time {
    color: var(--anzhiyu-white);
    left: 50%;
    transform: translateX(-50%);
    top: 15px;
    position: absolute;
    width: 100%;
    padding: 0;
  }
  body:has(#console.show) #nav-music .aplayer .aplayer-info .aplayer-controller {
    top: 58px;
  }
  body:has(#console.show) .aplayer .aplayer-icon-back,
  body:has(#console.show) .aplayer .aplayer-icon-forward,
  body:has(#console.show) .aplayer .aplayer-icon-order,
  body:has(#console.show) .aplayer .aplayer-icon-play,
  body:has(#console.show)
    #nav-music
    .aplayer.aplayer-withlist
    .aplayer-info
    .aplayer-controller
    .aplayer-time
    .aplayer-icon.aplayer-icon-menu,
  body:has(#console.show) .aplayer.aplayer-mobile .aplayer-icon-volume-down {
    display: inline-block;
    opacity: 1;
  }
  body:has(#console.show) .aplayer .aplayer-icon-volume-down {
    width: 36px;
    height: 30px;
  }
  body:has(#console.show) .aplayer-volume-wrap {
    position: absolute;
    top: 150px;
    left: 50%;
    transform: translateX(-50%);
    width: 75px;
  }
  body:has(#console.show) #nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar {
    height: 10px;
    border-radius: 10px;
  }
  body:has(#console.show)
    #nav-music
    .aplayer
    .aplayer-info
    .aplayer-controller
    .aplayer-bar-wrap
    .aplayer-bar
    .aplayer-loaded {
    display: block;
    height: 10px;
    border-radius: 10px;
  }

  body:has(#console.show) .aplayer .aplayer-icon-back {
    left: 0;
  }
  body:has(#console.show) .aplayer .aplayer-icon-forward {
    right: 0;
  }
  body:has(#console.show) .aplayer .aplayer-icon-forward,
  body:has(#console.show) .aplayer .aplayer-icon-back {
    height: 40px;
    width: 33%;
    margin: 15px 0;
    position: absolute;
  }

  body:has(#console.show) .aplayer .aplayer-pic .aplayer-play {
    width: 120px;
    height: 120px;
  }
  body:has(#console.show) .aplayer .aplayer-pic .aplayer-pause {
    width: 100px;
    height: 100px;
  }
  body:has(#console.show) .aplayer .aplayer-pic .aplayer-play svg {
    width: 60px;
    height: 60px;
  }
  body:has(#console.show) .aplayer .aplayer-pic .aplayer-pause svg {
    width: 50px;
    height: 50px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  body:has(#console.show) .aplayer .aplayer-icon-play {
    height: 50px;
    width: 33%;
    margin: 10px 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  body:has(#console.show)
    .aplayer.aplayer-withlist
    .aplayer-info
    .aplayer-controller
    .aplayer-time
    .aplayer-icon.aplayer-icon-menu {
    right: 0;
  }
  body:has(#console.show) .aplayer.aplayer-arrow .aplayer-icon-order {
    left: 0;
  }
  body:has(#console.show)
    .aplayer.aplayer-withlist
    .aplayer-info
    .aplayer-controller
    .aplayer-time
    .aplayer-icon.aplayer-icon-menu,
  body:has(#console.show) .aplayer.aplayer-arrow .aplayer-icon-order {
    height: 40px;
    width: 33%;
    top: 80px;
    position: absolute;
  }

  body:has(#console.show) .aplayer.aplayer-arrow .aplayer-icon-loop {
    height: 40px;
    width: 33%;
    position: absolute;
    left: 50%;
    top: 80px;
    transform: translateX(-50%);
  }

  body:has(#console.show) #nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap {
    margin: 0;
    padding: 0;
  }
  body:has(#console.show) .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-time-inner {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  body:has(#console.show) .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path {
    fill: var(--anzhiyu-white);
  }
  body:has(#console.show) .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap {
    overflow: visible;
    bottom: 0px;
    left: 45px;
    right: auto;
  }
  body:has(#console.show)
    .aplayer
    .aplayer-info
    .aplayer-controller
    .aplayer-volume-wrap
    .aplayer-volume-bar-wrap
    .aplayer-volume-bar,
  body:has(#console.show)
    .aplayer
    .aplayer-info
    .aplayer-controller
    .aplayer-volume-wrap
    .aplayer-volume-bar-wrap
    .aplayer-volume-bar
    .aplayer-volume {
    width: 20px;
    border-radius: 4px;
  }
/* <<< console big-player layout */

/* 闲言碎语正文（markdown 渲染后的多段内容） */
#bber .datacont > * + * {
  margin-top: 0.55rem;
}
#bber .datacont img {
  max-width: 100%;
  border-radius: 8px;
}
#bber .datacont a {
  color: var(--anzhiyu-main);
  text-decoration: underline;
}

/* 开屏加载动画：不要头像，只留小圆点（2026-11-12 用户要求） */
#loading-box .loading-img {
  display: none !important;
}
#loading-box .loading-image-dot {
  transform: translate(-50%, -50%) !important;
}

/* 首页磁贴：去掉文字下方那条白色短横线（主题 a.categoryButton:after） */
a.categoryButton::after {
  display: none !important;
}

/* 首页「精品推荐」：去掉封面大卡 #todayCard，直接摊开 6 篇推荐文章 */
.topGroup .todayCard {
  display: none !important;
}
.topGroup .recent-post-item {
  display: flex !important;
}
