/* 探索周榜 + 登录弹窗 + 详情页 */

body.has-scroll {
  overflow: auto;
}

body.is-explore,
body.is-detail {
  overflow: auto;
  background: #f5f5f6;
}

body.is-explore .app,
body.is-detail .app {
  display: none;
}

/* —— 共用顶栏（探索/详情） —— */
.site-shell {
  display: none;
  min-height: 100vh;
  background: #f5f5f6;
  color: #222;
}

.site-shell.is-on {
  display: block;
}

.site-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid #ebebeb;
}

.site-top-left,
.site-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-logo {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(145deg, #ff5a88, #f93865);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  font-family: Arial, sans-serif;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #666;
  font-size: 0.9rem;
}

.site-nav a:hover,
.site-nav a.is-on {
  color: #f93865;
  background: #ffe8ef;
}

.site-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f3f3f3;
  border-radius: 999px;
  padding: 7px 12px;
  min-width: 200px;
  color: #999;
}

.site-search input {
  border: none;
  outline: none;
  background: transparent;
  width: 140px;
  font-size: 0.85rem;
}

.site-icon-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #888;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.site-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #333;
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  font-size: 0.85rem;
  cursor: pointer;
}

.site-login-btn:hover {
  border-color: #f93865;
  color: #f93865;
}

.site-user {
  display: none;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.site-user.is-on {
  display: inline-flex;
}

.site-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #222;
  max-width: 7em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-user .user-face,
.site-user .ph-avatar {
  width: 32px;
  height: 32px;
}

/* —— 探索页 —— */
.explore-page {
  display: none;
  padding-bottom: 48px;
}

.explore-page.is-on {
  display: block;
}

.explore-banner {
  margin: 12px 20px 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

.explore-banner.is-sync {
  background: #eef6ff;
  color: #2563eb;
}

.explore-banner.is-banned {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.explore-banner.is-toss {
  background: #fff0f4;
  color: #f93865;
  border: 1px solid #ffd0e4;
}

.explore-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  align-items: center;
  padding: 14px 20px 6px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.explore-tabs button {
  border: none;
  background: transparent;
  color: #666;
  font-size: 0.95rem;
  padding: 6px 2px 10px;
  cursor: pointer;
  position: relative;
}

.explore-tabs button.is-on {
  color: #111;
  font-weight: 700;
}

.explore-tabs button.is-on::after {
  display: none;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px 16px;
  background: #fff;
  margin-bottom: 12px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: #f5f5f5;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  color: #555;
  cursor: pointer;
}

.tag-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  padding: 0 20px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 10px;
  }

  .site-nav {
    display: none;
  }
}

.work-card {
  background: transparent;
  border-radius: 0;
  overflow: visible;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  box-shadow: none;
  transition: transform 0.15s ease;
  display: flex;
  flex-direction: column;
  font: inherit;
  width: 100%;
}

.work-card:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

.card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #e8e8e8;
  overflow: hidden;
  border-radius: 16px;
}

.card-body {
  padding: 10px 2px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 0.78rem;
  color: #999;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.card-foot .name {
  font-size: 0.78rem;
  color: #666;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-foot .time {
  font-size: 0.72rem;
  color: #bbb;
}

.card-likes {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  color: #999;
  flex-shrink: 0;
}

.card-likes svg {
  width: 14px;
  height: 14px;
}

.card-views {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 0.72rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  z-index: 2;
}

.card-badge-game {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  padding: 2px 7px;
}

/* 破图占位 */
.ph-img {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background:
    linear-gradient(45deg, #ddd 25%, transparent 25%) -8px 0 / 16px 16px,
    linear-gradient(-45deg, #ddd 25%, transparent 25%) -8px 0 / 16px 16px,
    #ebebeb;
  color: #999;
  font-size: 0.75rem;
  text-align: center;
  padding: 12px;
}

.ph-img.sensitive {
  background: linear-gradient(160deg, #c4c4c8, #9a9aa3);
  filter: none;
  color: #fff;
}

.ph-img.sensitive svg {
  display: none;
}

.ph-img.sensitive::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(40, 40, 45, 0.45);
  backdrop-filter: blur(10px);
}

.ph-img {
  position: relative;
}

.ph-img svg {
  opacity: 0.55;
  position: relative;
  z-index: 1;
}

.ph-img.sensitive .ph-blur-msg {
  display: block;
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.45;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.ph-blur-msg {
  display: none;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #777;
}

.ph-view-btn {
  margin-top: 4px;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.75rem;
  color: #333;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.ph-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    linear-gradient(#ccc, #ccc),
    repeating-linear-gradient(45deg, #bbb 0 2px, #ddd 2px 4px);
  background-blend-mode: multiply;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.ph-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(transparent 46%, #999 46% 54%, transparent 54%),
    linear-gradient(90deg, transparent 46%, #999 46% 54%, transparent 54%);
  opacity: 0.35;
}

/* —— 登录弹窗 —— */
.login-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  padding: 16px;
}

.login-layer.is-on {
  display: flex;
}

.login-modal {
  width: min(92vw, 380px);
  background: #fff;
  border-radius: 18px;
  padding: 28px 28px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  animation: land-in 0.35s var(--ease) both;
}

.login-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 0.98rem;
  font-weight: 600;
  color: #333;
}

.login-head .mini-logo {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #f93865;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-family: Arial, sans-serif;
}

.login-field {
  width: 100%;
  border: none;
  outline: none;
  background: #edf2f9;
  border-radius: 12px;
  padding: 14px 14px;
  font-size: 0.92rem;
  margin-bottom: 12px;
  color: #333;
  box-sizing: border-box;
}

.login-pass-wrap {
  position: relative;
  margin-bottom: 12px;
}

.login-pass-wrap .login-field {
  margin-bottom: 0;
  padding-right: 42px;
}

.pass-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}

.login-submit {
  width: 100%;
  border: none;
  border-radius: 12px;
  background: #f93865;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 13px;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 8px 20px rgba(255, 77, 143, 0.3);
}

.login-submit:hover {
  filter: brightness(1.05);
}

.login-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: #bbb;
  font-size: 0.85rem;
}

.login-or::before,
.login-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e8e8e8;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.social-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #e5e5e5;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #666;
  font-size: 0.85rem;
  font-weight: 700;
}

.social-btn:hover {
  border-color: #f93865;
  color: #f93865;
}

.guest-link {
  display: block;
  text-align: center;
  border: none;
  background: #f3f3f3;
  border-radius: 999px;
  padding: 10px;
  width: 100%;
  color: #888;
  font-size: 0.88rem;
  cursor: pointer;
  margin-bottom: 14px;
}

.login-foot {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 0.82rem;
  color: #999;
}

.login-foot button {
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
  padding: 0;
}

.login-foot button:hover {
  color: #f93865;
}

.login-foot .sep {
  color: #ddd;
}

/* —— 详情页 —— */
.detail-page {
  display: none;
  padding: 16px 20px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.detail-page.is-on {
  display: block;
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

@media (max-width: 720px) {
  .detail-hero {
    grid-template-columns: 1fr;
  }
}

.detail-cover {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: #e8e8e8;
  position: relative;
}

.detail-cover .card-views {
  z-index: 1;
}

.detail-info h1 {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  line-height: 1.35;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.82rem;
  color: #999;
  margin-bottom: 14px;
}

.detail-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.detail-author .ph-avatar {
  width: 40px;
  height: 40px;
}

.detail-author .who strong {
  display: block;
  font-size: 0.95rem;
}

.detail-author .who span {
  font-size: 0.78rem;
  color: #999;
}

.badge-admin {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.68rem;
  color: #fff;
  background: #f93865;
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  font-weight: 600;
}

.follow-btn {
  margin-left: auto;
  border: 1px solid #f93865;
  background: #fff;
  color: #f93865;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  cursor: pointer;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag-list span {
  background: #f3f3f3;
  color: #777;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
}

.play-btn {
  width: 100%;
  max-width: 360px;
  border: none;
  border-radius: 12px;
  background: #f93865;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.detail-block {
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 14px;
}

.block-title::before {
  content: "";
  width: 4px;
  height: 1em;
  background: #f93865;
  border-radius: 2px;
}

.detail-html {
  font-size: 0.92rem;
  line-height: 1.75;
  color: #333;
}

.detail-html p {
  margin: 0 0 0.85em;
}

.detail-html ul,
.detail-html ol {
  margin: 0 0 0.85em;
  padding-left: 1.2em;
}

.detail-html .hl {
  color: #f93865;
  font-weight: 600;
}

.vip-gate {
  background: #f5f5f5;
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  margin-bottom: 18px;
}

.vip-gate p {
  margin: 0 0 14px;
  color: #666;
  font-size: 0.95rem;
}

.vip-btn {
  border: none;
  background: #f93865;
  color: #fff;
  border-radius: 999px;
  padding: 10px 28px;
  font-weight: 700;
  cursor: pointer;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.comment {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: start;
}

.comment.is-roast .text {
  color: #333;
}

.comment.is-defend .user {
  color: #f93865;
}

.comment.is-defend .text {
  color: #555;
}

.comment .ph-avatar {
  width: 40px;
  height: 40px;
}

.comment-main .user {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.comment-main .text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #333;
  margin-bottom: 6px;
}

.comment-main .when {
  font-size: 0.75rem;
  color: #bbb;
  margin-bottom: 6px;
}

.comment-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 0.78rem;
  color: #999;
}

.comment-actions button {
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}

.comment-more {
  border: none;
  background: transparent;
  color: #ccc;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 4px;
}

.expand-replies {
  margin-top: 8px;
  border: none;
  background: transparent;
  color: #f93865;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
}

.back-explore {
  border: none;
  background: transparent;
  color: #888;
  cursor: pointer;
  font-size: 0.85rem;
  margin-bottom: 12px;
  padding: 0;
}

.back-explore:hover {
  color: #f93865;
}

.badge-page .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
