/* panlian_dark maccms adapters */
html, body { min-height: 100%; }
a { color: inherit; }
.mac-hide { display: none !important; }

/* auth pages: login / reg / findpass */
.auth-page {
  padding: 40px 0 64px;
  min-height: calc(100vh - 180px);
}

/* user center layout */
.user-page {
  padding: 28px 0 56px;
  min-height: calc(100vh - 180px);
}
.user-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.user-side-card,
.user-panel {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.user-side-card {
  padding: 16px 12px;
  position: sticky;
  top: 84px;
}
.user-side-profile {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.08), transparent 70%);
}
.user-side-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.28);
}
.user-side-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.user-side-meta strong {
  font-size: 15px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-side-meta span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.3;
}
.user-side-group {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--primary);
  font-weight: 600;
}
.user-side-points {
  color: var(--text-tertiary);
}
.user-side-nav {
  display: grid;
  gap: 6px;
}
.user-side-nav a {
  position: relative;
  display: block;
  padding: 11px 12px 11px 14px;
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.3;
  border: 1px solid transparent;
  transition: all .2s ease;
}
.user-side-nav a:hover {
  background: var(--bg-secondary);
  color: var(--primary);
  border-color: rgba(124, 58, 237, 0.12);
}
.user-side-nav a.is-active {
  background: rgba(124, 58, 237, 0.12);
  color: var(--primary);
  border-color: rgba(124, 58, 237, 0.18);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}
.user-side-badge {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.user-side-nav a.is-logout {
  margin-top: 4px;
  color: #ef4444;
}
.user-side-nav a.is-logout:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.16);
}
.user-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}
/* invite page: right panels fill up to left side height when shorter */
.user-layout--match-side {
  align-items: start;
}
.user-layout--match-side .user-side-card {
  position: relative;
  top: auto;
}
.user-layout--match-side .user-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.user-layout--match-side .user-main > .user-panel {
  display: flex;
  flex-direction: column;
}
.user-layout--match-side .user-main > .user-panel:last-child {
  flex: 1 1 auto;
}
.user-layout--match-side .user-main > .user-panel:last-child .user-table {
  flex: 1 1 auto;
}
.user-panel {
  padding: 18px 18px 16px;
}
.user-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.user-panel-head h1 {
  font-size: 20px;
  line-height: 1.3;
  margin: 0;
}
.user-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.user-tabs a,
.user-head-action,
.user-table-tools a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
}
.user-tabs a {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
}
.user-tabs a.active,
.user-tabs a:hover,
.user-head-action:hover,
.user-table-tools a:hover {
  color: var(--primary);
  border-color: rgba(124, 58, 237, 0.35);
}
.user-form,
.user-form-block {
  max-width: 560px;
}
.user-form-block {
  display: grid;
  gap: 14px;
}
.user-tip {
  color: var(--text-secondary);
  font-size: 14px;
}
.user-tip strong {
  color: var(--primary);
}
.user-help {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.5;
}
.user-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.user-home-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
}
.user-home-item-wide {
  grid-column: 1 / -1;
}
.user-home-item .label {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 6px;
}
.user-home-item .value {
  font-size: 14px;
  word-break: break-all;
}
.user-table {
  display: grid;
  gap: 8px;
}
.user-table-head,
.user-table-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 90px 120px;
  gap: 10px;
  align-items: center;
  padding: 12px 10px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
}
.user-table-head {
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
}
.user-table-row .col-name a {
  color: var(--text-primary);
  text-decoration: none;
}
.user-table-row .col-name a:hover,
.user-table-row .col-action a:hover {
  color: var(--primary);
}
.user-msg-list {
  display: grid;
  gap: 12px;
}
.user-msg-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
}
.user-msg-item-notice {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.06), var(--bg-secondary));
}
.user-msg-item-notice .user-msg-badge {
  color: var(--text-secondary);
  background: rgba(107, 114, 128, 0.12);
}
.user-msg-item.is-unread {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.08), var(--bg-secondary));
}
.user-msg-item.is-unread .user-msg-badge {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
}
.user-msg-item.is-unread .user-msg-title-row h2 a {
  font-weight: 700;
}
.user-msg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 28px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(124, 58, 237, 0.12);
  font-size: 12px;
  text-transform: uppercase;
}
.user-msg-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.user-msg-title-row h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}
.user-msg-title-row h2 a {
  color: var(--text-primary);
  text-decoration: none;
}
.user-msg-title-row h2 a:hover {
  color: var(--primary);
}
.user-msg-title-row time,
.user-msg-body p {
  color: var(--text-secondary);
  font-size: 13px;
}
.user-msg-body p {
  margin: 0;
  line-height: 1.6;
}
.user-msg-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.user-msg-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 999px;
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
}
.user-msg-action:hover {
  color: #fff;
  background: var(--primary);
}
.user-msg-action-saved,
.user-msg-action-saved:hover {
  color: var(--text-secondary);
  border-color: var(--border-color);
  background: transparent;
  cursor: default;
}
.user-msg-action-del {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
}
.user-msg-action-del:hover {
  color: #fff;
  background: #ef4444;
}
.user-msg-detail {
  padding: 18px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
}
.user-msg-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}
.user-msg-detail-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}
.user-msg-detail-head time {
  color: var(--text-secondary);
  font-size: 13px;
}
.user-msg-detail-content {
  padding: 18px 0;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.8;
  word-break: break-word;
}
.user-msg-detail-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}
.user-table-row .col-action {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  font-size: 13px;
}
.user-table-row .col-meta,
.user-table-head .col-meta {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}
.user-table-tools {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.user-upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.user-upgrade-card {
  display: grid;
  gap: 8px;
  padding: 16px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  text-decoration: none;
  color: var(--text-primary);
  transition: all .2s;
}
.user-upgrade-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.user-upgrade-card strong {
  font-size: 16px;
}
.user-upgrade-card span {
  color: var(--text-secondary);
  font-size: 13px;
}
.user-popedom-table .user-table-head,
.user-popedom-table .user-table-row {
  grid-template-columns: minmax(0, 1.4fr) repeat(5, minmax(0, 0.7fr));
}
.form-input,
.auth-field .form-input,
select.form-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  outline: none;
}
.form-input:focus,
select.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.pl-login-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pl-login-dialog {
  width: min(460px, 100%);
}
@media (max-width: 900px) {
  .user-layout {
    grid-template-columns: 1fr;
  }
  .user-side-card {
    position: static;
  }
  .user-side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .user-page {
    padding: 18px 0 36px;
  }
  .user-home-grid {
    grid-template-columns: 1fr;
  }
  .user-table-head,
  .user-table-row {
    grid-template-columns: 40px minmax(0, 1fr) 72px;
  }
  .user-table-head .col-meta,
  .user-table-row .col-meta {
    display: none;
  }
  .user-popedom-table .user-table-head,
  .user-popedom-table .user-table-row {
    grid-template-columns: minmax(0, 1fr) repeat(2, 48px);
    font-size: 12px;
  }
  .user-popedom-table .user-table-head span:nth-child(n+4),
  .user-popedom-table .user-table-row span:nth-child(n+4) {
    display: none;
  }
  .user-msg-item {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .user-msg-title-row,
  .user-msg-detail-head {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }
  .user-msg-actions {
    width: 100%;
    justify-content: stretch;
  }
  .user-msg-action {
    flex: 1;
    width: auto;
  }
}
.auth-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 28px 24px 24px;
}
.auth-card-wide {
  max-width: 760px;
}
.auth-head {
  text-align: center;
  margin-bottom: 22px;
}
.auth-head h1 {
  font-size: 24px;
  line-height: 1.3;
  margin-bottom: 8px;
}
.auth-head p {
  color: var(--text-secondary);
  font-size: 14px;
}
.auth-form {
  display: grid;
  gap: 14px;
}
.auth-field {
  display: grid;
  gap: 8px;
}
.auth-field > span {
  font-size: 13px;
  color: var(--text-secondary);
}
.auth-field .form-input {
  width: 100%;
}
.auth-verify-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.auth-verify-row .form-input {
  flex: 1;
}
.auth-verify-row img,
.auth-verify-row .btn {
  flex: 0 0 auto;
  height: 44px;
}
.auth-verify-row img {
  width: 110px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  cursor: pointer;
}
.auth-submit {
  width: 100%;
  height: 44px;
  margin-top: 4px;
}
.auth-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-secondary);
}
.auth-links a:hover {
  color: var(--primary);
}
.auth-oauth {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}
.auth-oauth p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 12px;
}
.auth-oauth-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.user-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.user-home-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
}
.user-home-item .label {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 6px;
}
.user-home-item .value {
  font-size: 14px;
  word-break: break-all;
}
@media (max-width: 768px) {
  .auth-page {
    padding: 24px 0 40px;
  }
  .auth-card {
    padding: 22px 16px 18px;
    border-radius: 14px;
  }
  .user-home-grid {
    grid-template-columns: 1fr;
  }
}

/* 收紧板块间距：避免分类之间出现大片留白 */
.video-section {
  padding: 18px 0 !important;
}
.video-section .section-header {
  margin-bottom: 14px !important;
}
.video-section .section-title {
  margin: 0 !important;
  font-size: 22px;
  line-height: 1.2;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 0 !important;
}
/* spacers default hidden */
.mobile-top-spacer,
.mobile-bottom-spacer {
  display: none !important;
  width: 100%;
  height: 0 !important;
  min-height: 0 !important;
  pointer-events: none;
}

@media (max-width: 768px) {
  /* 移动端：隐藏桌面导航，顶栏 fixed + 实体占位，避免标题/海报被切 */
  .navbar {
    display: none !important;
  }
  .mobile-search-container {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 400 !important;
    padding: 10px 0 !important;
    background: #eef2f7 !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  }
  [data-theme="dark"] .mobile-search-container {
    background: #111827 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
  .mobile-top-spacer {
    display: block !important;
    height: 64px !important;
    min-height: 64px !important;
  }
  .mobile-search-container .container {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }
  .mobile-home-logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: #fff;
    color: var(--primary, #7c3aed);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  }
  .mobile-search-box {
    flex: 1 1 auto;
    min-width: 0;
  }
  .mobile-search-wrapper {
    width: 100%;
    background: #fff !important;
  }
  .main,
  .premium-layout {
    padding-top: 12px !important;
  }
  .video-section {
    padding: 14px 0 !important;
  }
  .video-section:first-of-type {
    padding-top: 14px !important;
  }
  .video-section .section-header {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    min-height: 28px !important;
  }
  .video-section .section-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
  }
  [data-theme="dark"] .video-section .section-title {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
  }
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  body.video-page .premium-layout {
    padding-top: 12px !important;
  }
  body.video-page .mobile-search-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
  }
}

/* 空分类整块隐藏，避免只剩标题/空白占位 */
.video-section.is-empty {
  display: none !important;
}

.video-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.video-info {
  padding: 8px 10px 10px !important;
}
.video-title {
  color: var(--text-primary);
  margin-bottom: 4px !important;
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  -webkit-line-clamp: unset !important;
}
.video-meta {
  line-height: 1.2;
}

.page-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

/* 详情页高级布局增强 */
.premium-layout {
  padding-top: 72px !important;
  padding-bottom: 40px !important;
}

/* 桌面端：信息框与海报同高，但海报不被简介拉高 */
@media (min-width: 769px) {
  .detail-header-premium {
    align-items: start !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
  }
  .detail-poster-wrapper {
    width: 280px;
    max-width: 280px;
  }
  .premium-poster {
    width: 100%;
    height: auto !important;
    aspect-ratio: 2 / 3;
  }
  .premium-poster img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2 / 3 !important;
    object-fit: cover !important;
    display: block;
  }
  .detail-info-premium {
    /* 与 280x(2:3) 海报同高：280 * 3/2 = 420 */
    height: calc(280px * 3 / 2) !important;
    max-height: calc(280px * 3 / 2) !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box;
    overflow: hidden;
  }
  .premium-title-wrapper {
    margin-bottom: 12px !important;
    flex: 0 0 auto;
  }
  .premium-meta-grid {
    margin-bottom: 10px !important;
    flex: 0 0 auto;
  }
  .premium-plot {
    margin-top: 0 !important;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }
  .premium-plot h3 {
    flex: 0 0 auto;
  }
  .premium-plot .detail-desc-text {
    flex: 1 1 auto;
    min-height: 0;
  }
  .premium-plot .detail-desc-text.is-collapsed {
    -webkit-line-clamp: 4 !important;
    max-height: 7.2em !important;
    overflow: hidden !important;
  }
  .premium-plot .detail-desc-text.is-expanded {
    overflow: auto !important;
    max-height: none;
  }
  .premium-plot .detail-desc-toggle {
    flex: 0 0 auto;
  }
}
.premium-title {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}
.premium-meta-grid {
  margin-bottom: 18px !important;
}
.premium-plot {
  margin-top: 8px !important;
}
.premium-plot h3 {
  margin: 0 0 10px !important;
}
.detail-desc-text {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.8;
  word-break: break-word;
}
.detail-desc-text.is-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  max-height: 7.2em;
}
.detail-desc-text.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  max-height: none;
  overflow: visible;
}
.detail-desc-toggle {
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: #a78bfa;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.detail-desc-toggle:hover {
  opacity: 0.85;
}

.detail-panel {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  margin: 18px 0;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.detail-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.detail-panel-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.detail-panel-body {
  padding: 16px 20px 20px;
}
.pan-group {
  margin-bottom: 14px;
}
.pan-group:last-child {
  margin-bottom: 0;
}
.pan-group-title {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 10px;
}
.pan-link-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pan-link-item.is-hidden {
  display: none !important;
}
.pan-more-toggle {
  display: none;
  margin-top: 12px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}
.pan-more-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}
[data-theme="light"] .pan-more-toggle {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}
[data-theme="light"] .pan-more-toggle:hover {
  border-color: #4f46e5;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.06);
}
.pan-link-item {
  gap: 12px;
}
.pan-link-meta {
  display: block !important;
  word-break: break-all;
  white-space: normal !important;
}
.pan-link-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.play-list {
  margin-bottom: 12px;
}
.play-list:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .premium-layout {
    padding-top: 12px !important;
    /* 底部避让交给统一的 mobile-bottom-spacer / 110+ 规则，这里不再压成 24px */
    padding-bottom: 0 !important;
  }
  .detail-panel {
    margin: 12px 0;
    border-radius: 12px;
  }
  .detail-panel-head,
  .detail-panel-body {
    padding-left: 14px;
    padding-right: 14px;
  }
  .detail-panel-head {
    padding-top: 14px;
    padding-bottom: 12px;
  }
  .detail-panel-body {
    padding-top: 12px;
    padding-bottom: 14px;
  }
  .pan-link-item {
    flex-direction: column;
    align-items: stretch !important;
  }
  .pan-link-actions {
    margin-left: 0;
    width: 100%;
  }
  .pan-link-btn {
    flex: 1;
    text-align: center;
  }
}
.down-group-title {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 12px;
}

/* 分页栏 */
.pagination,
.mac-pagination {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 24px 0 8px !important;
  padding: 0 4px !important;
}
.pagination .page-btn,
.mac-pagination .page-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 40px !important;
  height: 36px !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
  border: 1px solid var(--border-color) !important;
  background: var(--bg-primary) !important;
  color: var(--text-secondary) !important;
  font-size: 13px !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all .2s ease !important;
}
.pagination .page-btn:hover,
.mac-pagination .page-btn:hover {
  color: #fff !important;
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}
.pagination .page-btn.active,
.mac-pagination .page-btn.active {
  color: #fff !important;
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  font-weight: 600 !important;
  cursor: default !important;
}
.pagination .page-btn.disabled,
.mac-pagination .page-btn.disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background: var(--bg-tertiary) !important;
  color: var(--text-tertiary) !important;
}
@media (max-width: 768px) {
  .pagination,
  .mac-pagination {
    gap: 6px !important;
    margin-top: 18px !important;
  }
  .pagination .page-btn,
  .mac-pagination .page-btn {
    min-width: 34px !important;
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }
}

/* 移动端底栏：补全样式 + 页面底部避让，避免首页/详情被裁切 */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(15, 23, 42, 0.96);
  border-top-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.28);
}
.mobile-bottom-nav .mobile-bottom-tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  color: #64748b;
  text-decoration: none;
  font-size: 11px;
  line-height: 1.1;
}
.mobile-bottom-nav .mobile-bottom-tab i {
  font-size: 16px;
  line-height: 1;
}
.mobile-bottom-nav .mobile-bottom-tab.active,
.mobile-bottom-nav .mobile-bottom-tab:hover {
  color: var(--primary, #4f46e5);
}

/* 底栏占位条：比 padding 更稳，避免最后一排被挡 */
.mobile-bottom-spacer {
  display: none;
  width: 100%;
  height: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex !important;
    align-items: stretch;
    justify-content: space-around;
    height: auto !important;
    min-height: 56px;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .mobile-bottom-spacer {
    display: block !important;
    height: calc(120px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(120px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html,
  body,
  body.video-page {
    padding-bottom: 0 !important;
  }
  /* 内容区再补一点底边距 */
  .main,
  .premium-layout {
    padding-bottom: 24px !important;
  }
  .footer {
    display: none !important; /* 移动端底栏已承担导航，页脚不再占高度干扰 */
  }
  .video-section:last-of-type {
    margin-bottom: 0 !important;
    padding-bottom: 8px !important;
  }
  .video-grid {
    margin-bottom: 0 !important;
    padding-bottom: 8px !important;
  }

  /* 详情页移动端独立标题 */
  .mobile-detail-title {
    display: block !important;
    margin: 4px 0 12px !important;
    padding: 0 2px !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    background: none !important;
    word-break: break-word !important;
    position: relative !important;
    z-index: 5 !important;
  }
  [data-theme="dark"] .mobile-detail-title {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
  }
  .desktop-detail-title {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .mobile-detail-title {
    display: none !important;
  }
  .desktop-detail-title {
    display: block !important;
  }
}

@media (max-width: 768px) {
  /* keep following detail layout rules in same breakpoint */

  /* 详情页移动端：取消 video.css 的 display:contents 拆布局，保证标题可见 */
  .detail-header-premium {
    display: grid !important;
    grid-template-columns: 118px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
    margin-bottom: 14px !important;
  }
  .detail-poster-wrapper {
    grid-column: auto !important;
    grid-row: auto !important;
    width: 118px !important;
    max-width: 118px !important;
  }
  .premium-poster {
    width: 118px !important;
    max-width: 118px !important;
  }
  .detail-info-premium,
  .premium-title-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .premium-title-wrapper {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }
  .premium-title {
    display: block !important;
    grid-column: auto !important;
    grid-row: auto !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word !important;
    /* 强制可见：避免透明填充字在浅色下“消失” */
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: #0f172a !important;
    color: #0f172a !important;
    text-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  [data-theme="dark"] .premium-title {
    -webkit-text-fill-color: #f8fafc !important;
    color: #f8fafc !important;
  }
  .premium-tags-top {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 0 !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .premium-meta-grid {
    display: grid !important;
    grid-column: auto !important;
    grid-row: auto !important;
    margin: 0 0 10px !important;
    min-width: 0 !important;
  }
  .premium-plot {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    margin-top: 4px !important;
  }
  .meta-item,
  .m-val {
    min-width: 0 !important;
  }
  .m-val {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .detail-panel {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .container {
    overflow: visible !important;
  }
}

@media (min-width: 769px) {
  body { padding-bottom: 0 !important; }
  .mobile-bottom-nav { display: none !important; }
}


/* light theme detail polish */
/* 浅色详情：整页同一底色；背景 fixed 铺满视口，滚到底也不会露另一截 */
[data-theme="light"] html,
[data-theme="light"] body,
[data-theme="light"] body.video-page,
[data-theme="light"] .premium-layout,
[data-theme="light"] .main,
[data-theme="light"] .footer,
[data-theme="light"] .site-footer {
  background-color: #eef2f7 !important;
  background-image: none !important;
}
[data-theme="light"] body.video-page {
  min-height: 100vh !important;
}
[data-theme="light"] .premium-layout {
  position: relative;
  overflow: visible;
  min-height: 100vh;
  background: transparent !important;
}
/* 固定铺满整个视口，内容再长也不会在底部断开 */
[data-theme="light"] .detail-backdrop {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100vh !important;
  max-height: none !important;
  filter: blur(48px) brightness(1.05) saturate(1.05) !important;
  opacity: 0.5 !important;
  transform: scale(1.08) !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
  z-index: 0 !important;
  pointer-events: none !important;
}
[data-theme="light"] .detail-backdrop-overlay {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100vh !important;
  max-height: none !important;
  /* 统一叠同色底，顶部略透海报，底部完全同色，不再出现第二截 */
  background: linear-gradient(
    to bottom,
    rgba(238, 242, 247, 0.42) 0%,
    rgba(238, 242, 247, 0.68) 35%,
    rgba(238, 242, 247, 0.88) 65%,
    #eef2f7 100%
  ) !important;
  z-index: 1 !important;
  pointer-events: none !important;
}
[data-theme="light"] .relative-z,
[data-theme="light"] .footer {
  position: relative;
  z-index: 2;
}
/* 不要把 navbar / mobile-search / bottom-nav 强制 relative，避免破坏 fixed/sticky */
[data-theme="light"] .navbar {
  z-index: 200;
}
[data-theme="light"] .mobile-search-container {
  z-index: 200;
}
[data-theme="light"] .mobile-bottom-nav {
  position: fixed !important;
  z-index: 300 !important;
}
[data-theme="light"] .footer {
  border-top-color: rgba(15, 23, 42, 0.06) !important;
  margin-top: 0 !important;
}
/* 文字区加半透明底，保证背景更浓时仍可读 */
[data-theme="light"] .detail-info-premium {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 18px 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}
[data-theme="dark"] .detail-info-premium {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
@media (max-width: 768px) {
  .detail-info-premium {
    height: auto !important;
    min-height: 0 !important;
  }
  [data-theme="light"] .detail-info-premium,
  [data-theme="dark"] .detail-info-premium {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
[data-theme="light"] .premium-title,
[data-theme="light"] h1.premium-title,
html[data-theme="light"] .premium-title {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #0f172a !important;
  color: #0f172a !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
[data-theme="light"] .premium-meta-grid .meta-item {
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}
[data-theme="light"] .m-label {
  color: #64748b !important;
}
[data-theme="light"] .m-val {
  color: #0f172a !important;
  font-weight: 500 !important;
}
[data-theme="light"] .premium-plot h3 {
  color: #0f172a !important;
}
[data-theme="light"] .detail-desc-text,
[data-theme="light"] .premium-plot p {
  color: #334155 !important;
}
[data-theme="light"] .detail-desc-toggle {
  color: #4f46e5 !important;
}
[data-theme="light"] .p-tag {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #334155 !important;
}
[data-theme="light"] .p-tag.score {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #b45309 !important;
}
/* 网盘/推荐面板与影片信息框同透明度 */
[data-theme="light"] .detail-panel {
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
[data-theme="dark"] .detail-panel {
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
[data-theme="light"] .detail-panel-head {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .detail-panel-head h2,
[data-theme="light"] .pan-group-title {
  color: #0f172a !important;
}
[data-theme="light"] .pan-link-title {
  color: #0f172a !important;
}
[data-theme="light"] .pan-link-meta {
  color: #64748b !important;
}
[data-theme="light"] .mobile-search-wrapper {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--border-color);
}
[data-theme="light"] .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border-color);
}

/* FINAL title visibility fix */
/* 桌面标题：实色 */
.premium-title:not(.desktop-detail-title),
h1.premium-title:not(.desktop-detail-title),
.mobile-detail-title {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #0f172a !important;
  color: #0f172a !important;
  text-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}
[data-theme="dark"] .premium-title:not(.desktop-detail-title),
[data-theme="dark"] .mobile-detail-title {
  -webkit-text-fill-color: #f8fafc !important;
  color: #f8fafc !important;
}
@media (max-width: 768px) {
  .premium-layout {
    overflow: visible !important;
  }
  .detail-info-premium,
  .premium-title-wrapper {
    display: flex !important;
    flex-direction: column !important;
  }
  /* 移动端只用顶部独立标题，隐藏侧栏旧标题，避免半透明残影 */
  .desktop-detail-title,
  h1.premium-title.desktop-detail-title,
  .premium-title-wrapper .premium-title {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
  }
  .mobile-detail-title {
    display: block !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 20 !important;
    margin: 8px 0 14px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
    white-space: normal !important;
    word-break: break-word !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
  }
  [data-theme="dark"] .mobile-detail-title {
    background: rgba(15, 23, 42, 0.88) !important;
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
  }
  /* 底栏占位再加大，覆盖网盘资源区 */
  .mobile-bottom-spacer {
    display: block !important;
    height: calc(120px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(120px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .detail-panel:last-of-type {
    margin-bottom: 16px !important;
  }
}

/* ULTRA bottom clear */
@media (max-width: 768px) {
  html {
    scroll-padding-bottom: 180px !important;
  }
  body,
  body.video-page {
    padding-bottom: 180px !important;
    box-sizing: border-box !important;
  }
  .main,
  .premium-layout {
    padding-bottom: 48px !important;
    margin-bottom: 0 !important;
  }
  .mobile-bottom-spacer {
    display: block !important;
    width: 100% !important;
    height: 160px !important;
    min-height: 160px !important;
    max-height: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none !important;
    flex-shrink: 0 !important;
  }
  .mobile-bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 999 !important;
  }
  /* 详情网盘/相关推荐最后一块额外留白 */
  .detail-panel,
  .detail-panel:last-of-type,
  .video-section:last-of-type {
    margin-bottom: 24px !important;
  }
}

/* ULTRA top clear */
@media (max-width: 768px) {
  .mobile-search-container {
    position: fixed !important;
    top: 0 !important;
    z-index: 400 !important;
  }
  .mobile-top-spacer {
    display: block !important;
    height: 64px !important;
    min-height: 64px !important;
  }
  .video-section .section-title,
  h2.section-title {
    display: block !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* DESKTOP bottom/top clear reset */
@media (min-width: 769px) {
  .mobile-bottom-spacer,
  .mobile-top-spacer {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  .mobile-bottom-nav {
    display: none !important;
  }
  html,
  body,
  body.video-page {
    padding-bottom: 0 !important;
    scroll-padding-bottom: 0 !important;
  }
  .main,
  .premium-layout {
    padding-bottom: 24px !important;
    margin-bottom: 0 !important;
    min-height: auto !important;
  }
  .footer {
    display: block !important;
    padding: 28px 0 32px !important;
    margin: 0 !important;
  }
  .video-section:last-of-type {
    margin-bottom: 0 !important;
    padding-bottom: 12px !important;
  }
  .video-grid {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* FOOTER polish */
.footer.site-footer,
.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding: 36px 0 40px !important;
  text-align: center;
  background: transparent !important;
}
.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.22);
}
.footer-brand-text {
  text-align: left;
}
.footer-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
}
.footer-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
  letter-spacing: 0.2px;
}
.footer-mid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  width: 100%;
}
.footer-copy {
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 600;
  color: #334155 !important;
}
.footer-mid .footer-contact {
  margin-top: 0;
}
.footer-desc {
  margin: 0 !important;
  max-width: 640px;
  font-size: 12.5px !important;
  line-height: 1.7 !important;
  color: #64748b !important;
}
.footer-contact {
  margin-top: 0;
}
.footer-tg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.14);
  color: #4f46e5 !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.footer-tg:hover {
  background: rgba(79, 70, 229, 0.14);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.12);
  transform: translateY(-1px);
}
.footer-tg i {
  font-size: 15px;
}
.footer-icp {
  margin: 4px 0 0 !important;
  font-size: 12px !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .footer.site-footer,
[data-theme="dark"] .site-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .footer-title {
  color: #f8fafc;
}
[data-theme="dark"] .footer-subtitle,
[data-theme="dark"] .footer-desc {
  color: #94a3b8 !important;
}
[data-theme="dark"] .footer-copy {
  color: #e2e8f0 !important;
}
[data-theme="dark"] .footer-tg {
  background: rgba(129, 140, 248, 0.12);
  border-color: rgba(129, 140, 248, 0.22);
  color: #a5b4fc !important;
}
[data-theme="dark"] .footer-icp {
  color: #64748b !important;
}

@media (max-width: 768px) {
  /* 移动端仍隐藏页脚，避免和底栏抢空间 */
  .footer.site-footer,
  .site-footer {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .footer.site-footer,
  .site-footer {
    display: block !important;
  }
}

/* LOGO redesign */
.site-logo.logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
}
.logo-mark,
.footer-logo-img {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.18);
  background: #fff;
}
.logo-wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.1;
}
.logo-text-cn {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #0f172a !important;
  color: #0f172a !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px;
}
.logo-text-sub {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.3px;
}
[data-theme="dark"] .logo-text-cn {
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}
[data-theme="dark"] .logo-text-sub {
  color: #94a3b8;
}

.mobile-home-logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 40px !important;
  padding: 4px 10px 4px 4px !important;
  border-radius: 14px !important;
  background: #fff !important;
  color: #4f46e5 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}
.mobile-home-logo .logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: none;
  background: transparent;
}
.mobile-home-logo-text {
  padding-right: 4px;
  white-space: nowrap;
}
[data-theme="dark"] .mobile-home-logo {
  background: rgba(30, 41, 59, 0.95) !important;
  color: #c7d2fe !important;
}

.footer-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}
.footer-logo {
  display: none !important; /* 旧文字徽标下线 */
}


/* footer two-line restore */
.footer-mid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  width: 100%;
}
.footer-copy {
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #334155 !important;
}
.footer-desc {
  display: block !important;
  margin: 0 auto !important;
  max-width: none;
  font-size: 12.5px !important;
  line-height: 1.5 !important;
  color: #64748b !important;
  text-align: center;
  white-space: nowrap;
}
[data-theme="dark"] .footer-copy {
  color: #e2e8f0 !important;
}
[data-theme="dark"] .footer-desc {
  color: #94a3b8 !important;
}

/* footer desc one line */
.footer-desc {
  display: block !important;
  margin: 0 auto !important;
  max-width: none !important;
  width: 100% !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  color: #64748b !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
/* 宽屏完整一行显示，不截断 */
@media (min-width: 900px) {
  .footer-desc {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: unset !important;
    font-size: 12.5px !important;
  }
  .footer-inner {
    max-width: 1100px !important;
  }
}
[data-theme="dark"] .footer-desc {
  color: #94a3b8 !important;
}


/* member level lock on pan links */
.detail-panel-tag {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}
.pan-lock-box {
  position: relative;
  border: 1px dashed rgba(124, 58, 237, 0.35);
  border-radius: 14px;
  padding: 22px 18px 16px;
  background: rgba(124, 58, 237, 0.06);
  text-align: center;
}
.pan-lock-icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.pan-lock-title {
  margin: 0 0 8px;
  font-size: 18px;
}
.pan-lock-desc {
  margin: 0 auto 14px;
  max-width: 520px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}
.pan-lock-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.pan-lock-preview {
  filter: blur(2px);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
  text-align: left;
}
.pan-link-item.is-locked .pan-link-btn.is-disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.user-level-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.user-level-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}
.user-level-card strong {
  font-size: 15px;
}
.user-level-card span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
}
.user-level-card.is-vip {
  border-color: rgba(124, 58, 237, 0.45);
  background: rgba(124, 58, 237, 0.08);
}
@media (max-width: 768px) {
  .user-level-grid {
    grid-template-columns: 1fr;
  }
}


/* invite center */
.invite-card {
  display: grid;
  gap: 16px;
}
.invite-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-secondary);
}
.invite-code-box .label {
  color: var(--text-secondary);
  font-size: 14px;
}
.invite-code-box strong {
  font-size: 28px;
  letter-spacing: 4px;
  color: var(--text-primary);
}
.invite-field {
  display: grid;
  gap: 8px;
}
.invite-field-label {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.invite-used-notice {
  margin: -4px 0 0;
  color: #ef4444;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}
.invite-link-row,
.invite-buy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.invite-link-row .form-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  box-sizing: border-box;
}
.invite-buy-row {
  justify-content: space-between;
  padding: 12px 12px 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-secondary);
  box-sizing: border-box;
}
.invite-buy-row .invite-buy-info {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}
.invite-link-row .btn,
.invite-buy-row .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 112px;
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  line-height: 1;
  white-space: nowrap;
}
.invite-sub-row {
  opacity: 0.8;
  background: rgba(255,255,255,0.02);
}
@media (max-width: 768px) {
  .invite-link-row,
  .invite-buy-row {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .invite-link-row .btn,
  .invite-buy-row .btn {
    width: 100%;
    min-width: 0;
  }
  .invite-code-box {
    align-items: flex-start;
    flex-direction: column;
  }
}
