/* plot_detail.css — 分集劇情詳細頁 */
.plot-main {
    padding: 24px 20px 60px;
}
.plot-container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 16px;
}
.plot-container .breadcrumb { margin: 0 0 16px; }
/* ===== 主内容 ===== */
.plot-content {
    min-width: 0;
}
/* 片頭 */
.plot-hero {
    display: flex;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}
.plot-hero-thumb {
    width: 80px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: url("../img/load.gif") no-repeat center/cover;
}
.plot-hero-thumb img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}
.plot-hero-info {
    flex: 1;
    min-width: 0;
}
.plot-hero-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.plot-hero-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.plot-badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-elevated);
    color: var(--text-2);
    border: 1px solid var(--border-2);
}
.plot-badge--type {
    background: var(--accent-light);
    color: var(--accent);
    border-color: transparent;
}
.plot-badge--type:hover { text-decoration: underline; }
.plot-badge--score { background: var(--score-hi); color: #fff; border-color: transparent; }
.plot-hero-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-1);
    margin: 0;
}
.plot-hero-title a { color: var(--text-1); }
.plot-hero-title a:hover { color: var(--accent); }
.plot-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
    color: var(--text-3);
}
.plot-sep {
    color: var(--border-2);
}
.plot-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.plot-play-btn:hover {
    background: var(--accent-hover);
}
/* ===== 全部分集（正文流内）：折叠用双类选择器 .plot-ep-grid.plot-ep-collapsed，折叠高度按行算（--ep-row = 一行高度 + gap，放 10 行） ===== */
.plot-ep-nav {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}
.plot-ep-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.plot-ep-nav-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-1);
}
.plot-ep-grid {
    --ep-row: 36px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.plot-ep-grid.plot-ep-collapsed {
    max-height: calc(10 * var(--ep-row));
    overflow: hidden;
}
.plot-ep-btn {
    display: block;
    padding: 5px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-2);
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-2);
    transition: all .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
.plot-ep-btn:hover { border-color: var(--accent); color: var(--accent); }
.plot-ep-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.plot-ep-more {
    display: none;            /* 由 plot.js 按是否真的溢出来放出 */
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 16px;
    padding: 8px 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
    transition: all .15s;
}
.plot-ep-more:hover { border-color: var(--accent); color: var(--accent); }
/* ===== 空态（分集数据常缺） ===== */
.plot-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    margin-bottom: 24px;
    color: var(--text-3);
    font-size: 14px;
}
.plot-empty .mac-icon { width: 28px; height: 28px; }
.plot-empty p { margin: 0; }
.plot-empty-link { color: var(--accent); font-size: 13px; }
/* 正文 */
.plot-article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}
.plot-article-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.plot-article-body {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.9;
}
/* 上下集導航 */
.plot-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
.plot-nav-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}
.plot-nav-item--next {
    text-align: right;
}
.plot-nav-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 4px;
}
.plot-nav-item--next .plot-nav-label {
    justify-content: flex-end;
}
.plot-nav-link {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.plot-nav-link:hover {
    text-decoration: underline;
}
.plot-nav-none {
    font-size: 13px;
    color: var(--text-3);
}
/* 相關推薦：网格用 main.css 的 .detail-vod-grid（6/4/3 列） */
.plot-related { margin-bottom: 24px; }
.plot-section-hd {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 16px;
}
/* ===== RWD ===== */
@media (max-width: 600px) {
  .plot-main {
        padding-bottom: 80px;
  }
  .plot-hero {
        flex-direction: column;
  }
  .plot-hero-thumb {
        width: 100px;
  }
  .plot-ep-nav { padding: 16px; }
  /* 窄屏一行 2 个，按钮更紧凑；折叠仍是 10 行 */
  .plot-ep-grid {
        --ep-row: 34px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plot-nav {
        grid-template-columns: 1fr;
  }
}
