/* ===========================================================
   星光导航网 · v10
   1) 首页站点卡片：一行两个，左右等宽、间距一致
   2) 首页分类二级标签栏（毛玻璃胶囊，可横向滑动）
   3) 悬浮音乐播放器（毛玻璃，可收缩，歌词滚动）
   =========================================================== */

/* ---------------- 1 · 首页卡片：一行两个 ---------------- */
.home-container .content-card{
  --xg-gap: 16px;   /* 左右留白 = 两卡中间间距,三处完全一致 */
}
.home-container .content-card .row[class*="row-col-"]{
  justify-content: space-between !important;
  padding-left: var(--xg-gap) !important;
  padding-right: var(--xg-gap) !important;
}
.home-container .content-card .row[class*="row-col-"]> * {
  -webkit-box-flex: 0 !important;
  -ms-flex: 0 0 calc(50% - var(--xg-gap) / 2) !important;
  flex: 0 0 calc(50% - var(--xg-gap) / 2) !important;
  max-width: calc(50% - var(--xg-gap) / 2) !important;
  width: calc(50% - var(--xg-gap) / 2) !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: var(--xg-gap) !important;
}
@media (max-width: 767px){
  .home-container .content-card{ --xg-gap: 12px; }
}
/* 卡片内容跟着放大一点，两个一行时留白更匀 */
.home-container .content-card .posts-item.sites-item {
  padding: 12px 14px !important;
  border-radius: 14px !important;
}
.home-container .content-card .posts-item.sites-item .sites-body {
  gap: 12px !important;
  align-items: center !important;
}
.home-container .content-card .posts-item.sites-item .item-media,
.home-container .content-card .posts-item.sites-item .item-header {
  -webkit-box-flex: 0 !important;
  -ms-flex: 0 0 44px !important;
  flex: 0 0 44px !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
}
.home-container .content-card .posts-item.sites-item .item-image,
.home-container .content-card .posts-item.sites-item .item-image img {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
}
.home-container .content-card .posts-item.sites-item .item-title b {
  font-size: 14.5px !important;
}
.home-container .content-card .posts-item.sites-item .item-body .text-muted {
  font-size: 12px !important;
  margin-top: 2px;
  opacity: .78;
}
.home-container .content-card .posts-item.sites-item:hover {
  background: rgba(124, 58, 237, .07) !important;
}
html.io-black-mode .home-container .content-card .posts-item.sites-item:hover {
  background: rgba(255, 255, 255, .06) !important;
}

@media (max-width: 575px) {
  .home-container .content-card .posts-item.sites-item {
    padding: 9px 10px !important;
  }
  .home-container .content-card .posts-item.sites-item .item-media,
  .home-container .content-card .posts-item.sites-item .item-header,
  .home-container .content-card .posts-item.sites-item .item-image,
  .home-container .content-card .posts-item.sites-item .item-image img {
    -ms-flex: 0 0 38px !important;
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
  }
  .home-container .content-card .posts-item.sites-item .item-title b {
    font-size: 13.5px !important;
  }
  .home-container .content-card .posts-item.sites-item .sites-tags .togo {
    display: none !important;
  }
}

/* ---------------- 2 · 二级分类标签栏 ---------------- */
.xg-subcats {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 2px 12px;
  margin: -2px 0 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  z-index: 2;
}
.xg-subcats::-webkit-scrollbar {
  display: none;
  height: 0;
}
.xg-chip {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(21, 16, 43, .08);
  background: rgba(255, 255, 255, .74);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  backdrop-filter: saturate(170%) blur(14px);
  color: var(--xq-ink-2, #3d3560);
  font-size: 12.5px;
  line-height: 1;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, color .18s, border-color .18s, background .18s;
  box-shadow: 0 1px 3px rgba(21, 16, 43, .05), inset 0 1px 0 rgba(255, 255, 255, .7);
  font-family: inherit;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.xg-chip:hover {
  color: var(--xq-violet, #7c3aed);
  border-color: rgba(124, 58, 237, .35);
  transform: translateY(-1px);
}
.xg-chip .xg-chip-n {
  font-size: 10.5px;
  opacity: .55;
  font-weight: 400;
}
.xg-chip.active {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 52%, #db2777 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px -8px rgba(124, 58, 237, .9), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.xg-chip.active .xg-chip-n {
  opacity: .8;
}
html.io-black-mode .xg-chip {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .76);
  box-shadow: none;
}
html.io-black-mode .xg-chip:hover {
  color: #fff;
  border-color: rgba(167, 139, 250, .5);
}
html.io-black-mode .xg-chip.active {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 52%, #db2777 100%);
  color: #fff;
}
.xg-empty-tip {
  padding: 14px 4px 4px;
  font-size: 12.5px;
  color: var(--xq-muted, #8a85a3);
}
@media (max-width: 575px) {
  .xg-subcats {
    gap: 7px;
    padding-bottom: 10px;
  }
  .xg-chip {
    font-size: 12px;
    padding: 7px 12px;
  }
}

/* ---------------- 3 · 悬浮音乐播放器 ---------------- */
.xg-pl {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 9990;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.xg-pl-mini {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  background: linear-gradient(145deg, rgba(124, 58, 237, .82), rgba(59, 7, 100, .88));
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 12px 28px -10px rgba(76, 29, 149, .95), inset 0 1px 0 rgba(255, 255, 255, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.xg-pl-mini:hover {
  transform: scale(1.06);
  box-shadow: 0 16px 34px -12px rgba(76, 29, 149, 1), inset 0 1px 0 rgba(255, 255, 255, .34);
}
.xg-pl-mini img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  opacity: .92;
}
.xg-pl-mini .xg-pl-mini-ic {
  position: absolute;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4));
  pointer-events: none;
}
.xg-pl-mini.spinning::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(255, 255, 255, .85);
  border-right-color: rgba(255, 255, 255, .3);
  animation: xg-pl-spin 3.6s linear infinite;
}
@keyframes xg-pl-spin {
  to {
    transform: rotate(360deg);
  }
}

.xg-pl-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 322px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(160deg, rgba(30, 20, 62, .84) 0%, rgba(16, 10, 36, .9) 100%);
  -webkit-backdrop-filter: saturate(185%) blur(26px);
  backdrop-filter: saturate(185%) blur(26px);
  box-shadow: 0 24px 60px -22px rgba(8, 4, 24, .95), inset 0 1px 0 rgba(255, 255, 255, .13);
  color: #fff;
  overflow: hidden;
  transform-origin: bottom right;
  animation: xg-pl-pop .26s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes xg-pl-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.xg-pl.hide {
  display: none !important;
}
.xg-pl.collapsed .xg-pl-panel {
  display: none;
}
.xg-pl:not(.collapsed) .xg-pl-mini {
  display: none;
}

.xg-pl-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 13px 10px;
}
.xg-pl-cover {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .8);
}
.xg-pl-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.xg-pl-meta {
  flex: 1 1 auto;
  min-width: 0;
}
.xg-pl-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xg-pl-artist {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .58);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xg-pl-close {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s, transform .18s;
}
.xg-pl-close:hover {
  background: rgba(255, 255, 255, .2);
  transform: rotate(90deg);
}

.xg-pl-lyric {
  height: 108px;
  overflow: hidden;
  position: relative;
  padding: 0 16px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
.xg-pl-lyric-inner {
  transition: transform .42s cubic-bezier(.22, .8, .3, 1);
  padding: 42px 0;
}
.xg-pl-line {
  font-size: 12.5px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .42);
  text-align: center;
  transition: color .3s, transform .3s, opacity .3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xg-pl-line.active {
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  transform: scale(1.02);
  text-shadow: 0 0 18px rgba(167, 139, 250, .7);
}
.xg-pl-line.nolyric {
  color: rgba(255, 255, 255, .38);
  font-size: 12px;
}

.xg-pl-progress {
  padding: 6px 14px 0;
  cursor: pointer;
}
.xg-pl-bar {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .16);
  position: relative;
  overflow: hidden;
}
.xg-pl-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #a78bfa, #db2777);
  transition: width .12s linear;
}
.xg-pl-time {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: rgba(255, 255, 255, .45);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.xg-pl-ctl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 4px 14px 14px;
}
.xg-pl-btn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .8);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .18s, background .18s, transform .18s;
  -webkit-tap-highlight-color: transparent;
}
.xg-pl-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}
.xg-pl-btn svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: currentColor;
}
.xg-pl-play {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(124, 58, 237, .95);
}
.xg-pl-play:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #8b46f5, #e2337f);
}
.xg-pl-play svg {
  width: 18px;
  height: 18px;
}

.xg-pl-list {
  border-top: 1px solid rgba(255, 255, 255, .09);
  max-height: 0;
  overflow-y: auto;
  transition: max-height .3s ease;
  scrollbar-width: thin;
}
.xg-pl-list.open {
  max-height: 168px;
}
.xg-pl-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .7);
  cursor: pointer;
  transition: background .16s, color .16s;
}
.xg-pl-item:hover {
  background: rgba(255, 255, 255, .07);
  color: #fff;
}
.xg-pl-item.cur {
  color: #fff;
  background: rgba(124, 58, 237, .28);
}
.xg-pl-item .n {
  width: 16px;
  text-align: right;
  color: rgba(255, 255, 255, .35);
  font-size: 11px;
  flex: 0 0 16px;
}
.xg-pl-item .t {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xg-pl-item .a {
  flex: 0 0 auto;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, .4);
  font-size: 11px;
}

@media (max-width: 575px) {
  .xg-pl {
    right: 14px;
    bottom: 20px;
  }
  .xg-pl-mini {
    margin-right: 54px;
  }
  .xg-pl-panel {
    width: calc(100vw - 28px);
    max-width: 330px;
    right: 0;
    bottom: 0;
  }
  .xg-pl-mini {
    width: 50px;
    height: 50px;
  }
  .xg-pl-lyric {
    height: 92px;
  }
}

/* ===========================================================
   v10 补丁 · 播放器质感打磨
   =========================================================== */
.xg-pl-panel {
  background: linear-gradient(158deg, rgba(38, 24, 74, .78) 0%, rgba(15, 9, 33, .88) 100%);
  -webkit-backdrop-filter: saturate(200%) blur(34px);
  backdrop-filter: saturate(200%) blur(34px);
  isolation: isolate;
}
.xg-pl-panel::before {
  content: "";
  position: absolute;
  inset: -50% -30% auto -30%;
  height: 180px;
  background:
    radial-gradient(60% 100% at 20% 0%, rgba(124, 58, 237, .55), transparent 70%),
    radial-gradient(50% 100% at 85% 10%, rgba(219, 39, 119, .38), transparent 72%);
  filter: blur(6px);
  opacity: .85;
  pointer-events: none;
  z-index: -1;
}
.xg-pl-cover {
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .06);
  background: linear-gradient(145deg, rgba(124, 58, 237, .5), rgba(219, 39, 119, .35));
}
.xg-pl-line.active {
  background: linear-gradient(90deg, #e9d5ff, #ffffff 45%, #fbcfe8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 12px rgba(167, 139, 250, .55));
}
.xg-pl-mini {
  position: relative;
}
.xg-pl-mini::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, .55), transparent 68%);
  opacity: .9;
  z-index: 0;
  filter: blur(4px);
  pointer-events: none;
}
.xg-pl-mini img,
.xg-pl-mini .xg-pl-mini-ic {
  position: relative;
  z-index: 1;
}
.xg-pl-list {
  max-height: 0;
  overflow: auto;
  transition: max-height .28s ease;
  border-top: 1px solid rgba(255, 255, 255, 0);
}
.xg-pl-list.open {
  max-height: 168px;
  border-top-color: rgba(255, 255, 255, .08);
}
.xg-pl-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, .7);
  cursor: pointer;
  transition: background .16s, color .16s;
}
.xg-pl-item:hover {
  background: rgba(255, 255, 255, .07);
  color: #fff;
}
.xg-pl-item.cur {
  color: #fff;
  background: rgba(124, 58, 237, .22);
}
.xg-pl-item .n {
  width: 14px;
  flex: 0 0 14px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, .45);
  font-variant-numeric: tabular-nums;
}
.xg-pl-item .t {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xg-pl-item .a {
  flex: 0 0 auto;
  font-size: 10.5px;
  color: rgba(255, 255, 255, .4);
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 手机端：两列卡片里的描述允许折两行，避免「长文本理…」这种硬截断 */
@media (max-width: 575px) {
  .home-container .posts-item .text-muted,
  .home-container .posts-item .item-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    font-size: 10.5px;
    line-height: 1.32;
    margin-top: 2px;
  }
  .home-container .posts-item {
    align-items: flex-start;
  }
  .home-container .posts-item .item-title,
  .home-container .posts-item .text-truncate {
    font-size: 13.5px;
  }
}

/* 两侧浮动工具按钮(展开侧栏 / 回顶部 / 夜间模式):统一成毛玻璃圆钮 */
.io-footer-tools .btn-tools{
  width: 42px; height: 42px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 10px 26px -14px rgba(76,29,149,.6), inset 0 1px 0 rgba(255,255,255,.9);
  color: #6d28d9;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.io-footer-tools .btn-tools:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.82);
  color: #7c3aed;
}
.io-footer-tools .btn-tools .iconfont{ font-size: 16px; line-height: 1; }
html.dark .io-footer-tools .btn-tools{
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 10px 26px -14px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.14);
  color: #e9d5ff;
}
html.dark .io-footer-tools .btn-tools:hover{ background: rgba(255,255,255,.16); color:#f5f3ff; }
@media (max-width: 575px){
  .io-footer-tools .btn-tools{ width: 38px; height: 38px; border-radius: 13px; }
  .io-footer-tools .btn-tools .iconfont{ font-size: 15px; }
}

/* 手机端两列:标题缩小避免「DeepS…」这种半截词,描述保持两行 */
@media (max-width: 575px){
  .home-container .content-card .posts-item .item-title,
  .home-container .content-card .posts-item .item-title b{
    font-size: 13px !important;
    letter-spacing: -.2px;
  }
  .home-container .content-card .posts-item .item-title i{ font-size: 11px !important; }
  .home-container .content-card .posts-item{ padding-left: 10px !important; padding-right: 10px !important; }
  .home-container .content-card .posts-item .item-media,
  .home-container .content-card .posts-item .item-header{ flex: 0 0 40px !important; width: 40px !important; height: 40px !important; }
}

/* 卡片内层 body 的重复内边距去掉,把宽度让给文字(修「DeepS…」截断) */
.home-container .content-card .posts-item.sites-item > .sites-body{
  padding-left: 0 !important;
  padding-right: 0 !important;
  gap: 8px;
}
@media (max-width: 575px){
  .home-container .content-card .posts-item.sites-item > .sites-body{ gap: 7px; }
  .home-container .content-card .posts-item.sites-item > .sites-body .item-body{ min-width: 0; }
}

/* 左右留白与卡片中缝对齐(桌面:16/16/16;手机:12/12/12) */
@media (min-width: 768px){
  .home-container .content-card .row[class*="row-col-"]{
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
}
@media (max-width: 767px){
  .home-container .content-card .row[class*="row-col-"]{
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
}
