/* ==========================================================================
   components.css —— 业务组件：栏目 / 作品卡片 / 侧栏短评 / 分页 / 详情页组件
   ========================================================================== */

/* ---------- 栏目标题 ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 34px 0 18px;
}

.section-head:first-child {
  margin-top: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: #222b2e;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--color-accent);
}

.section-more {
  font-size: 13px;
  color: var(--color-muted);
  transition: color 0.2s;
}

.section-more:hover {
  color: var(--color-green);
}

.section-more::after {
  content: "›";
  margin-left: 4px;
}

/* ---------- 作品栅格 ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.work-grid--wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

/* ---------- 作品卡片 ---------- */
.work-card {
  display: block;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(31, 45, 50, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.work-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(31, 45, 50, 0.1);
}

.work-card__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #dfe5e8;
}

.work-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 类型角标 */
.work-card__type {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 12px;
  border-radius: 9px 0 8px 0;
  font-size: 12px;
  color: #fff;
}

.work-card__type--movie { background: var(--color-badge-movie); }
.work-card__type--series { background: var(--color-badge-series); }
.work-card__type--variety { background: var(--color-badge-variety); }
.work-card__type--anime { background: var(--color-badge-anime); }

/* 评分角标 */
.work-card__score {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 9px;
  border-radius: 5px;
  background: rgba(13, 18, 22, 0.72);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.work-card__score .star {
  margin-right: 3px;
  color: var(--color-star);
}

.work-card__score.is-none {
  font-weight: 400;
  font-size: 12px;
}

.work-card__body {
  padding: 12px 14px 14px;
}

.work-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #222b2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-card__meta {
  margin-top: 5px;
  font-size: 12px;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 侧栏：最新短评 ---------- */
.side-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(31, 45, 50, 0.04);
}

.side-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.side-card__title {
  font-size: 18px;
  font-weight: 700;
  color: #222b2e;
}

.side-card__extra {
  font-size: 12px;
  color: var(--color-muted);
}

.review-item {
  margin-top: 18px;
}

.review-item__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-item__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e4ede6;
  color: #6a8f7b;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.review-item__name {
  font-size: 13px;
  color: #4a5457;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-item__score {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-star);
}

.review-item__text {
  margin: 8px 0 10px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--color-text-sub);
}

.review-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.review-item__work {
  font-size: 12.5px;
  color: #8fae9c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-item__work:hover {
  color: var(--color-green);
}

.review-item__tag {
  font-size: 11px;
  color: var(--color-faint);
  flex-shrink: 0;
}

/* ---------- 分类页标题 ---------- */
.category-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 6px 0 20px;
}

.category-head h1 {
  font-size: 30px;
  font-weight: 700;
  color: #222b2e;
}

.category-head .tip {
  padding: 5px 12px;
  border-radius: 4px;
  background: #f6ecd4;
  color: #a8821c;
  font-size: 12px;
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 36px 0 8px;
}

.pagination button {
  min-width: 64px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-card);
  font-size: 13px;
  color: #556165;
  transition: color 0.2s, border-color 0.2s;
}

.pagination button:hover:not(:disabled):not(.active) {
  color: var(--color-green);
  border-color: #bcd3c6;
}

.pagination button.active {
  background: var(--color-green-deep);
  border-color: var(--color-green-deep);
  color: #fff;
  font-weight: 600;
}

.pagination button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- 详情页：作品信息卡 ---------- */
.detail-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 26px;
  box-shadow: 0 1px 2px rgba(31, 45, 50, 0.04);
}

.detail-card + .detail-card,
.detail-card + .section-head,
.section-head + .detail-card {
  margin-top: 24px;
}

.hero {
  display: flex;
  gap: 30px;
}

.hero__poster {
  width: 200px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #dfe5e8;
}

.hero__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__info {
  flex: 1;
  min-width: 0;
  padding-top: 6px;
}

.hero__title {
  font-size: 30px;
  font-weight: 700;
  color: #222b2e;
}

.hero__meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-muted);
}

.hero__crew {
  margin-top: 16px;
  font-size: 14px;
  color: var(--color-text-sub);
}

.hero__crew + .hero__crew {
  margin-top: 8px;
}

.hero__rating {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.hero__score {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: #d9971e;
}

.hero__stars-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero__count {
  font-size: 12px;
  color: var(--color-muted);
}

/* 星级（支持小数填充） */
.stars {
  position: relative;
  display: inline-block;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 2px;
  color: #d8dde0;
}

.stars::before {
  content: "★★★★★";
}

.stars__fill {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--color-star);
}

.stars__fill::before {
  content: "★★★★★";
}

/* ---------- 详情页：通用区块标题 ---------- */
.block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #222b2e;
}

.block-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--color-accent);
}

.block-title .sub {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-muted);
}

/* ---------- 详情页：作品简介 ---------- */
.summary-text {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--color-text-sub);
}

/* ---------- 详情页：你的评分 ---------- */
.rate-hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-muted);
}

.rate-buttons {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.rate-buttons button {
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #f4f6f7;
  font-size: 14px;
  color: #556165;
  transition: all 0.15s;
}

.rate-buttons button:hover {
  border-color: #bcd3c6;
  color: var(--color-green);
}

.rate-buttons button.selected {
  background: var(--color-green-deep);
  border-color: var(--color-green-deep);
  color: #fff;
  font-weight: 600;
}

.rate-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.rate-status {
  font-size: 13px;
  color: var(--color-muted);
}

.btn {
  padding: 10px 24px;
  border-radius: 6px;
  background: var(--color-green-btn);
  color: #fff;
  font-size: 14px;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--color-green-btn-hover);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.rate-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--color-faint);
}

/* ---------- 详情页：短评 ---------- */
.form-label {
  display: block;
  margin: 16px 0 8px;
  font-size: 13px;
  color: #4a5457;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #f7f8f9;
  font-size: 13px;
  color: #3a4548;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-faint);
}

.form-input:focus,
.form-textarea:focus {
  border-color: #bcd3c6;
  background: #fff;
}

.form-input--nick {
  max-width: 260px;
}

.form-textarea {
  min-height: 96px;
  resize: vertical;
}

.review-form__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

.review-form__counter {
  font-size: 12px;
  color: var(--color-muted);
}

.review-form__note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--color-faint);
}

.review-list {
  margin-top: 22px;
  border-top: 1px solid #edf0f1;
}

.review-list__item {
  padding: 18px 0;
  border-bottom: 1px solid #edf0f1;
}

.review-list__item:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.review-list__head {
  font-size: 14px;
  font-weight: 700;
  color: #333d40;
}

.review-list__head .tag {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-muted);
}

.review-list__text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-sub);
}

/* ---------- 详情页：侧栏提示卡 ---------- */
.aside-note {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-text-sub);
}

/* ---------- 空状态 ---------- */
.empty {
  padding: 60px 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 14px;
}

/* 类型角标：库里的分类不止四大类（午夜影院、VIP蓝光影院、短剧等） */
.work-card__type--other { background: #7a8a90; }
/* ---------- 页头登录区 ---------- */
.header-user {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  font-size: 14px;
}

.header-user__name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #3a4548;
}

button.header-user__link {
  padding: 0;
  border: none;
  background: none;
  font-size: 14px;
  color: #3a4548;
  cursor: pointer;
}

.header-user__link:hover {
  color: var(--color-green);
}

.header-user__link--primary {
  padding: 7px 16px;
  border-radius: 17px;
  background: var(--color-green-btn);
  color: #fff;
}

.header-user__link--primary:hover {
  color: #fff;
  background: var(--color-green-btn-hover);
}

/* ---------- 登录 / 注册 / 找回密码 ---------- */
.auth-page {
  display: flex;
  justify-content: center;
  padding: 48px 0 64px;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 32px 28px 26px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(31, 45, 50, 0.04);
}

.auth-title {
  margin: 0 0 6px;
  font-size: 22px;
}

.auth-tip {
  margin: 0 0 20px;
  font-size: 13px;
  color: #909399;
}

.auth-card .form-input {
  width: 100%;
  height: 40px;
}

.auth-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.auth-row .form-input {
  flex: 1;
  min-width: 0;
}

.captcha-img {
  flex: none;
  width: 110px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fafafa;
  cursor: pointer;
  object-fit: contain;
}

.auth-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: #a8b1b6;
}

.auth-error {
  min-height: 18px;
  margin: 12px 0 4px;
  font-size: 13px;
  color: #d9534f;
}

.auth-submit {
  width: 100%;
  height: 42px;
}

.auth-code-btn {
  width: 100%;
  height: 40px;
  margin-top: 10px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 13px;
  color: #6b767a;
}

.auth-links a {
  color: var(--color-green);
}
/* ---------- 轻提示（评分、短评等操作反馈） ---------- */
.toast-box {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  max-width: 78vw;
  padding: 11px 20px;
  border-radius: 8px;
  background: rgba(23, 32, 36, 0.92);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-show {
  opacity: 1;
  transform: translateY(0);
}

.toast--success { background: rgba(46, 125, 91, 0.95); }
.toast--error { background: rgba(176, 58, 58, 0.95); }

/* 仅给搜索引擎与读屏使用的标题 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 海报图加载失败时保留一块底色，不至于出现空白 */
.work-card__poster,
.hero__poster {
  background: #e9eef0;
}