/* ============================================================
   t28 合家欢电视 Family TV — theme.css
   象牙白 / 晴空蓝 / 柔和橙 | 大图大字 | 客厅大屏与手机共用
   断点: base(375) → 768 → 1366(三列大卡) → 1920(四列+更大字号)
   ============================================================ */

:root {
    --ft-bg: #fdfaf3;
    --ft-paper: #ffffff;
    --ft-ink: #2c4a5e;
    --ft-ink-soft: #5b7488;
    --ft-blue: #4a90c4;
    --ft-blue-deep: #35709e;
    --ft-orange: #f5a65b;
    --ft-orange-deep: #d97f2e;
    --ft-line: #e6ddcb;
    --ft-radius: 18px;
    --ft-focus: 0 0 0 4px rgba(245, 166, 91, .85);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--ft-bg);
    color: var(--ft-ink);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    font-size: 17px;
    line-height: 1.75;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ft-blue-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ft-orange-deep); }

/* 遥控器 / 键盘焦点必须清晰可见 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: none;
    box-shadow: var(--ft-focus);
    border-radius: 8px;
}

.wrap, .ft-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 顶栏 ---------- */
.ft-topbar {
    background: var(--ft-paper);
    border-bottom: 3px solid var(--ft-blue);
    position: sticky;
    top: 0;
    z-index: 40;
}
.ft-topbar__in {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 0;
}
.ft-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--ft-ink);
    text-decoration: none;
    letter-spacing: .02em;
}
.ft-logo:hover { color: var(--ft-blue-deep); }
.ft-logo img { max-height: 48px; width: auto; }
.ft-nav { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-left: auto; }
.ft-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 600;
    color: var(--ft-ink);
    text-decoration: none;
    background: #f2f7fb;
}
.ft-nav a:hover { background: var(--ft-blue); color: #fff; }
.ft-search { width: 100%; }
.ft-search input[type="search"] {
    width: 100%;
    min-height: 48px;
    padding: 10px 16px;
    font-size: 17px;
    border: 2px solid var(--ft-line);
    border-radius: 999px;
    background: #fff;
    color: var(--ft-ink);
}
.ft-search button, .ft-searchform button {
    min-height: 48px;
    padding: 0 22px;
    margin-left: 8px;
    border: 0;
    border-radius: 999px;
    background: var(--ft-blue);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}
.ft-search button:hover { background: var(--ft-blue-deep); }

/* ---------- 首页 ---------- */
.ft-mast {
    background: linear-gradient(135deg, #eaf4fb 0%, #fdfaf3 70%);
    border-bottom: 1px solid var(--ft-line);
    padding: 40px 0 32px;
}
.ft-mast__title {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.35;
    letter-spacing: .01em;
}
.ft-mast__lede {
    margin: 0;
    max-width: 46em;
    font-size: 18px;
    color: var(--ft-ink-soft);
}
.ft-mast__note {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #fff3e2;
    color: var(--ft-orange-deep);
    font-size: 15px;
    font-weight: 600;
}

.ft-section { padding: 36px 0 8px; }
.ft-section__head { margin-bottom: 18px; }
.ft-section__title {
    margin: 0 0 6px;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ft-section__title::before {
    content: "";
    width: 10px;
    height: 26px;
    border-radius: 5px;
    background: var(--ft-orange);
    flex: none;
}
.ft-section__lede { margin: 0; color: var(--ft-ink-soft); font-size: 16px; max-width: 46em; }
.ft-section__more {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    margin-top: 10px;
    font-weight: 700;
}

/* ---------- 大卡网格(大图大字) ---------- */
.ft-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    padding-bottom: 28px;
}

.ft-card {
    background: var(--ft-paper);
    border: 1px solid var(--ft-line);
    border-radius: var(--ft-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(44, 74, 94, .06);
}
.ft-card:hover { box-shadow: 0 8px 24px rgba(44, 74, 94, .14); }
.ft-card__poster, .ft-card__posterwrap { position: relative; display: block; }
.ft-card__poster img, .ft-card__posterwrap img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.ft-card__badge, .ft-card__rating {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(44, 74, 94, .92);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}
.ft-card__badge--all, .ft-card__rating--all { background: var(--ft-blue); }
.ft-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ft-card__title {
    margin: 0;
    font-size: 20px;
    line-height: 1.45;
}
.ft-card__title a { color: var(--ft-ink); text-decoration: none; }
.ft-card__title a:hover { color: var(--ft-blue-deep); }
.ft-card__meta {
    margin: 0;
    font-size: 15px;
    color: var(--ft-ink-soft);
}
.ft-card__cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 20px;
    border-radius: 12px;
    background: var(--ft-orange);
    color: #4a2c08;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
}
.ft-card__cta:hover { background: var(--ft-orange-deep); color: #fff; }

/* ---------- 归档头 / 搜索 ---------- */
.ft-archhead { padding: 30px 0 20px; border-bottom: 1px solid var(--ft-line); margin-bottom: 24px; }
.ft-archhead__kicker {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--ft-orange-deep);
    text-transform: uppercase;
}
.ft-archhead__title { margin: 0 0 8px; font-size: 28px; }
.ft-archhead__desc { margin: 0 0 14px; color: var(--ft-ink-soft); font-size: 16px; max-width: 46em; }
.ft-archhead .ft-searchform, .ft-archhead form { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ft-archhead input[type="search"] {
    flex: 1;
    min-width: 200px;
    min-height: 48px;
    padding: 10px 16px;
    font-size: 17px;
    border: 2px solid var(--ft-line);
    border-radius: 999px;
}
.ft-noresult { padding: 30px 0; font-size: 17px; }

/* ---------- 详情页 ---------- */
.ft-drama { padding: 28px 0; }
.ft-drama__grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
.ft-drama__poster img { width: 100%; max-width: 340px; border-radius: var(--ft-radius); aspect-ratio: 3/4; object-fit: cover; }
.ft-drama__title { margin: 0 0 6px; font-size: 30px; line-height: 1.35; }
.ft-drama__orig { margin: 0 0 14px; color: var(--ft-ink-soft); font-size: 16px; }

.ft-access {
    background: #eaf4fb;
    border: 2px solid var(--ft-blue);
    border-radius: var(--ft-radius);
    padding: 18px 20px;
    margin: 18px 0;
    display: grid;
    gap: 10px;
}
.ft-access__row { display: flex; gap: 12px; align-items: baseline; font-size: 17px; }
.ft-access__label {
    flex: none;
    min-width: 5.5em;
    font-weight: 800;
    color: var(--ft-blue-deep);
}
.ft-access__value { margin: 0; }

.ft-facts {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.ft-facts li {
    padding: 8px 14px;
    background: var(--ft-paper);
    border: 1px solid var(--ft-line);
    border-radius: 999px;
    font-size: 15px;
}
.ft-synopsis { font-size: 17px; max-width: 46em; }
.ft-block { padding: 24px 0 8px; }
.ft-block__title { margin: 0 0 14px; font-size: 22px; }

/* ---------- 选集列表(共享 stx_episode_list 'rows') ---------- */
.ft-eplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ft-eplist__item a,
.ft-eplist__row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 12px 16px;
    background: var(--ft-paper);
    border: 1px solid var(--ft-line);
    border-radius: 14px;
    color: var(--ft-ink);
    text-decoration: none;
    font-size: 17px;
}
.ft-eplist__item a:hover { border-color: var(--ft-blue); background: #f2f7fb; }
.ft-eplist__num {
    flex: none;
    min-width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--ft-blue);
    color: #fff;
    font-weight: 800;
    font-size: 18px;
}
.ft-eplist__item.is-current a,
.ft-eplist__row.is-current {
    border-color: var(--ft-orange);
    background: #fff7ec;
}
.ft-eplist__item.is-current .ft-eplist__num { background: var(--ft-orange); color: #4a2c08; }
.ft-eplist__state { margin-left: auto; font-size: 14px; color: var(--ft-ink-soft); flex: none; }

/* ---------- 观看页 ---------- */
.ft-watch { padding: 24px 0; }
.ft-watch__title { margin: 0 0 4px; font-size: 26px; line-height: 1.4; }
.ft-watch__parent { margin: 0 0 16px; font-size: 16px; color: var(--ft-ink-soft); }
.ft-player, .stx-player, .ft-watch__player {
    background: #10212f;
    border-radius: var(--ft-radius);
    overflow: hidden;
    margin-bottom: 18px;
}
.ft-player video, .stx-player video, .ft-watch__player video { width: 100%; display: block; }
.ft-watch__note {
    padding: 12px 18px;
    background: #fff3e2;
    border-radius: 12px;
    color: var(--ft-orange-deep);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 18px;
}
.ft-watch__layout { display: grid; grid-template-columns: 1fr; gap: 26px; }
.ft-watch__side .ft-block__title { font-size: 19px; }

/* ---------- 分页 / 面包屑 / chips ---------- */
.ft-pagination, .stx-pagination { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 0 30px; }
.ft-pagination a, .ft-pagination span,
.stx-pagination a, .stx-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid var(--ft-line);
    background: var(--ft-paper);
    color: var(--ft-ink);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}
.ft-pagination .current, .stx-pagination .current {
    background: var(--ft-blue);
    border-color: var(--ft-blue);
    color: #fff;
}

.ft-breadcrumb, .stx-breadcrumb { font-size: 15px; color: var(--ft-ink-soft); padding: 14px 0 0; }
.ft-breadcrumb a, .stx-breadcrumb a { color: var(--ft-blue-deep); }

.ft-chips, .stx-chips { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px 0; }
.ft-chips a, .stx-chips a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--ft-paper);
    border: 1px solid var(--ft-line);
    color: var(--ft-ink);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}
.ft-chips a:hover, .stx-chips a:hover { border-color: var(--ft-orange); background: #fff7ec; }

/* ---------- 空态 / 页脚 ---------- */
.ft-empty, .stx-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--ft-ink-soft);
    background: var(--ft-paper);
    border: 1px dashed var(--ft-line);
    border-radius: var(--ft-radius);
    font-size: 17px;
}

.ft-footer {
    margin-top: 40px;
    background: var(--ft-ink);
    color: #d7e4ee;
    padding: 34px 0 46px;
}
.ft-footer a { color: #ffffff; }
.ft-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; }
.ft-footer__nav a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    font-size: 16px;
    font-weight: 600;
}
.ft-footer__note { margin: 0; font-size: 14px; color: #a9bfd0; max-width: 60em; }

/* ---------- 768: 两列 ---------- */
@media (min-width: 768px) {
    .ft-grid { grid-template-columns: repeat(2, 1fr); }
    .ft-search { width: auto; margin-left: auto; }
    .ft-search input[type="search"] { width: 240px; }
    .ft-drama__grid { grid-template-columns: 300px 1fr; }
    .ft-watch__layout { grid-template-columns: minmax(0, 1fr) 320px; }
    .ft-mast__title { font-size: 36px; }
}

/* ---------- 1366: 笔记本三列大卡 ---------- */
@media (min-width: 1366px) {
    body { font-size: 18px; }
    .wrap, .ft-wrap { max-width: 1280px; }
    .ft-grid { grid-template-columns: repeat(3, 1fr); gap: 26px; }
    .ft-card__title { font-size: 21px; }
    .ft-mast { padding: 54px 0 44px; }
    .ft-mast__title { font-size: 42px; }
}

/* ---------- 1920: 客厅大屏 ---------- */
@media (min-width: 1920px) {
    body { font-size: 20px; }
    .wrap, .ft-wrap { max-width: 1560px; }
    .ft-grid { grid-template-columns: repeat(4, 1fr); gap: 30px; }
    .ft-logo { font-size: 28px; }
    .ft-nav a { font-size: 19px; padding: 10px 22px; }
    .ft-mast__title { font-size: 48px; }
    .ft-mast__lede { font-size: 21px; }
    .ft-section__title { font-size: 28px; }
    .ft-card__title { font-size: 23px; }
    .ft-card__meta { font-size: 17px; }
    .ft-card__cta { min-height: 56px; font-size: 19px; }
    .ft-drama__title { font-size: 38px; }
    .ft-eplist__item a, .ft-eplist__row { min-height: 64px; font-size: 19px; }
    .ft-footer__nav a { min-height: 56px; }
}
