/* ============================================================
   成语故事频道 story.css v1.0.0
   依赖 style.css 的 :root 设计变量（蓝白配色）
   ============================================================ */

/* ---------- 列表页 ---------- */
.story-hero {
    background: linear-gradient(135deg, var(--blue-bg), var(--white));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 32px;
    margin-top: 10px;
}
.sh-title { font-size: 26px; color: var(--text); }
.sh-sub { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.sh-stat {
    margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px 22px;
    color: var(--text-2); font-size: 14px;
}
.sh-stat b { color: var(--blue); font-size: 17px; }

.story-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 4px;
}
.story-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform .22s var(--ease), box-shadow .22s var(--ease);
    display: flex; flex-direction: column;
}
.story-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.sc-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--blue-light), var(--blue-bg));
    overflow: hidden;
}
.sc-cover img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.sc-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; font-weight: 700; letter-spacing: 6px;
    color: var(--blue-mid); opacity: .55;
}
.sc-badge {
    position: absolute; left: 10px; bottom: 10px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
    backdrop-filter: blur(4px);
}
.sc-badge-video { background: rgba(30, 64, 175, .82); color: var(--on-accent); }
.sc-badge-text  { background: rgba(255, 255, 255, .88); color: var(--blue-dark); border: 1px solid var(--blue-light); }

.sc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.sc-title {
    font-size: 17px; color: var(--text); line-height: 1.4;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sc-summary {
    margin-top: 7px; color: var(--text-2); font-size: 13px; line-height: 1.65;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; flex: 1;
}
.sc-meta {
    margin-top: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.sc-tag {
    padding: 2px 9px; border-radius: 999px;
    background: var(--blue-bg); color: var(--blue-mid);
    font-size: 12px; border: 1px solid var(--blue-light);
}
.sc-tag-cy { background: var(--blue); color: var(--on-accent); border-color: var(--blue); }
.sc-views { margin-left: auto; color: var(--text-3); font-size: 12px; }

.empty-tip {
    padding: 46px 0; text-align: center; color: var(--text-3); font-size: 15px;
}

/* ---------- 详情页 ---------- */
.story-detail {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 32px;
    margin-top: 10px;
}
.sd-title { font-size: 25px; color: var(--text); line-height: 1.35; }
.sd-meta {
    margin-top: 13px; display: flex; flex-wrap: wrap; gap: 8px;
}
.sd-chip {
    padding: 3px 11px; border-radius: 999px;
    background: var(--blue-bg); border: 1px solid var(--blue-light);
    color: var(--text-2); font-size: 13px;
}
.sd-chip-cy { color: var(--blue-mid); font-weight: 600; text-decoration: none; }
a.sd-chip-cy:hover { background: var(--blue-light); }
.sd-summary {
    margin-top: 15px; padding: 11px 15px;
    background: var(--blue-bg); border-left: 3px solid var(--blue);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-2); font-size: 14.5px; line-height: 1.7;
}

/* 操作区（分享等） */
.sd-actions {
    margin-top: 16px; padding-top: 14px;
    border-top: 1px dashed var(--border);
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.sd-act-btn {
    border: 1px solid var(--blue-light);
    background: var(--blue-bg); color: var(--blue-mid);
    border-radius: 999px; padding: 7px 16px;
    font-size: 13.5px; font-weight: 600; cursor: pointer;
    transition: all .18s var(--ease);
}
.sd-act-btn:hover {
    background: var(--blue); border-color: var(--blue); color: var(--on-accent);
    box-shadow: 0 6px 16px rgba(37, 99, 235, .25);
    transform: translateY(-1px);
}
.sd-act-tip { color: var(--text-3); font-size: 12.5px; }

/* 播放区：16:9 自适应，iframe 与 video 通用 */
.sd-video {
    position: relative;
    margin-top: 22px;
    width: 100%;
    padding-top: 56.25%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--ink);
}
.sd-video iframe,
.sd-video video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0; display: block;
}
.sd-video-tip {
    margin-top: 9px; color: var(--text-3); font-size: 13px;
}
.sd-video-tip a { color: var(--blue); text-decoration: none; }
.sd-video-tip a:hover { text-decoration: underline; }

.sd-content { margin-top: 26px; }
.sd-sec-title {
    font-size: 18px; color: var(--text);
    padding-bottom: 10px; margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.sd-p {
    margin: 0 0 16px;
    font-size: 16px; line-height: 2; color: var(--text);
    text-indent: 2em;
}
.sd-p-empty { color: var(--text-3); text-indent: 0; }

/* 相关推荐 */
.sd-related { margin-top: 26px; }
.sd-related .sd-sec-title { margin-bottom: 14px; }
.sd-rel-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.rel-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.rel-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.rel-type {
    flex: none; width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; font-size: 17px;
    background: var(--blue-bg); border: 1px solid var(--blue-light);
}
.rel-info { display: flex; flex-direction: column; min-width: 0; }
.rel-title {
    color: var(--text); font-size: 15px; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rel-views { color: var(--text-3); font-size: 12px; margin-top: 3px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .story-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .story-grid { grid-template-columns: 1fr; }
    .story-hero, .story-detail { padding: 22px 18px; }
    .sd-rel-grid { grid-template-columns: 1fr; }
    .sd-title { font-size: 21px; }
    .sd-p { font-size: 15px; line-height: 1.9; }
}
