/* ===========================================================================
   tpl006 重排版样式 —— 设计主题：暖阳纸刊 (Warm Paper Magazine)
   浅米纸底 + 暖橙红点缀 + 16:9 横版卡片 + 大圆角浮起卡 + 通栏 sticky 顶栏

   约定：
   - 本文件在 style.css / fonts.css 之后加载，只负责新版式，不改旧样式表。
   - 所有新类名统一 t6- 前缀，与旧主题类名（wrap/flex/block/item-post...）隔离。
   - 播放器由程序输出（#video-container），此处只控制外层容器宽度与圆角。
   - 懒加载钩子 img.lazy-load + data-original 由 main.min.js 驱动，勿改。
   - 写 CSS 时左花括号后必须换行/空格，避免出现会被模板正则误吃的字符序列。
   =========================================================================== */

.t6-scope,
.t6-scope * {
    box-sizing: border-box;
}

:root {
    --t6-paper: #f5f1e9;
    --t6-paper2: #fffdf8;
    --t6-ink: #262019;
    --t6-ink2: #6c6157;
    --t6-line: #e3dbcd;
    --t6-accent: #e2622a;
    --t6-accent2: #c8102e;
    --t6-radius: 16px;
    --t6-shadow: 0 10px 26px rgba(80, 60, 35, .10);
    --t6-shadow-hi: 0 16px 34px rgba(80, 60, 35, .18);
    --t6-max: 1280px;
}

/* --------------------------------------------------------------- 基础层 */
html {
    height: auto;
}

body.t6-body {
    min-height: 100%;
    height: auto;
    margin: 0;
    background: var(--t6-paper);
    color: var(--t6-ink);
    font: 400 14px/1.7 "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.t6-scope {
    position: relative;
}

.t6-scope-top {
    z-index: 900;
}

.t6-wrap {
    max-width: var(--t6-max);
    margin: 0 auto;
    padding: 0 18px;
}

.t6-scope a {
    color: inherit;
    text-decoration: none;
}

.t6-scope img {
    display: block;
    max-width: 100%;
    border: 0;
}

.t6-scope h1,
.t6-scope h2,
.t6-scope h3,
.t6-scope p {
    margin: 0;
    font-weight: inherit;
}

.t6-scope ul,
.t6-scope li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* --------------------------------------------------------------- 顶栏 */
.t6-top {
    position: sticky;
    top: 0;
    z-index: 950;
    background: rgba(255, 253, 248, .94);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--t6-line);
}

.t6-top-in {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 64px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.t6-logo img {
    height: 34px;
    width: auto;
}

.t6-search {
    display: flex;
    flex: 1 1 auto;
    max-width: 520px;
    margin-left: auto;
    background: var(--t6-paper);
    border: 1px solid var(--t6-line);
    border-radius: 999px;
    overflow: hidden;
}

.t6-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 0 8px 0 18px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--t6-ink);
    font-size: 14px;
}

.t6-search input::-webkit-input-placeholder {
    color: #a89b8c;
}

.t6-search button {
    flex: 0 0 auto;
    height: 40px;
    padding: 0 22px;
    border: 0;
    cursor: pointer;
    background: linear-gradient(135deg, var(--t6-accent), var(--t6-accent2));
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* --------------------------------------------------------------- 导航 */
.t6-navbar {
    border-top: 1px solid var(--t6-line);
    background: var(--t6-paper2);
}

.t6-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.t6-nav::-webkit-scrollbar {
    display: none;
}

.t6-nav a {
    flex: 0 0 auto;
    padding: 7px 16px;
    border: 1px solid var(--t6-line);
    border-radius: 999px;
    background: #fff;
    color: var(--t6-ink2);
    font-size: 14px;
    white-space: nowrap;
    transition: .18s;
}

.t6-nav a:hover {
    border-color: var(--t6-accent);
    color: var(--t6-accent);
}

.t6-nav a.t6-nav-home {
    background: var(--t6-ink);
    border-color: var(--t6-ink);
    color: #fff;
}

/* --------------------------------------------------------------- 广告位 */
/* 外层容器写在广告标签外，广告位为空时容器不占死高度 */
.t6-ad-banner:empty,
.t6-ad-icons:empty,
.t6-tags:empty {
    display: none;
}

.t6-ad-banner {
    margin: 16px auto 0;
}

.t6-ad-banner a {
    display: block;
    margin-bottom: 8px;
    border-radius: 12px;
    overflow: hidden;
}

.t6-ad-banner img {
    width: 100%;
    object-fit: cover;
}

.t6-ad-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.t6-ad-icons a {
    display: block;
    padding: 10px 4px;
    text-align: center;
    border-radius: 14px;
    background: var(--t6-paper2);
    border: 1px solid var(--t6-line);
}

.t6-ad-icons a:hover {
    border-color: var(--t6-accent);
}

.t6-ad-icons img {
    width: 52px;
    height: 52px;
    margin: 0 auto 6px;
    border-radius: 14px;
    object-fit: cover;
}

.t6-ad-icons p {
    font-size: 12px;
    line-height: 1.4;
    color: var(--t6-accent2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------------------- 标签云 */
.t6-panel {
    margin-top: 20px;
    padding: 16px 18px;
    background: var(--t6-paper2);
    border: 1px solid var(--t6-line);
    border-radius: var(--t6-radius);
}

.t6-panel-t {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--t6-ink);
}

.t6-panel-t::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--t6-accent), var(--t6-accent2));
}

.t6-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.t6-tags a {
    padding: 5px 13px;
    border-radius: 8px;
    background: #f0e8db;
    color: #7a4a2c;
    font-size: 13px;
    transition: .18s;
}

.t6-tags a:hover {
    background: var(--t6-accent);
    color: #fff;
}

/* --------------------------------------------------------------- 区块标题 */
.t6-sec {
    margin-top: 30px;
}

.t6-sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--t6-line);
}

.t6-sec-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .5px;
}

.t6-sec-title::before {
    content: "";
    width: 8px;
    height: 22px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--t6-accent), var(--t6-accent2));
}

.t6-sec-more {
    font-size: 13px;
    color: var(--t6-ink2);
}

.t6-sec-more:hover {
    color: var(--t6-accent);
}

/* --------------------------------------------------------------- 卡片网格 */
.t6-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.t6-card {
    background: var(--t6-paper2);
    border: 1px solid var(--t6-line);
    border-radius: var(--t6-radius);
    box-shadow: var(--t6-shadow);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

.t6-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--t6-shadow-hi);
}

.t6-card > a {
    display: block;
}

.t6-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #ece3d5;
    overflow: hidden;
}

.t6-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s;
}

.t6-card:hover .t6-thumb img {
    transform: scale(1.05);
}

.t6-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.2em;
    padding: 10px 12px 14px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--t6-ink);
}

.t6-card:hover .t6-name {
    color: var(--t6-accent2);
}

/* --------------------------------------------------------------- 分页 */
.t6-page {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 28px 0 6px;
}

.t6-page a,
.t6-page span {
    display: block;
    min-width: 40px;
    padding: 8px 14px;
    text-align: center;
    border: 1px solid var(--t6-line);
    border-radius: 10px;
    background: var(--t6-paper2);
    color: var(--t6-ink2);
    font-size: 14px;
}

.t6-page a:hover {
    border-color: var(--t6-accent);
    color: var(--t6-accent);
}

.t6-page span.t6-page-cur {
    background: linear-gradient(135deg, var(--t6-accent), var(--t6-accent2));
    border-color: transparent;
    color: #fff;
    font-weight: 700;
}

/* --------------------------------------------------------------- 详情页 */
.t6-detail {
    margin-top: 24px;
    padding: 18px;
    background: var(--t6-paper2);
    border: 1px solid var(--t6-line);
    border-radius: var(--t6-radius);
    box-shadow: var(--t6-shadow);
}

.t6-title {
    margin-bottom: 14px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--t6-ink);
}

.t6-player {
    border-radius: 12px;
    overflow: hidden;
    background: #16120e;
}

.t6-player video,
.t6-player iframe,
.t6-player > div {
    width: 100%;
    max-width: 100%;
}

.t6-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 4px 0 16px;
}

.t6-meta div {
    padding: 10px 14px;
    border-radius: 10px;
    background: #f3ece0;
    font-size: 14px;
    color: var(--t6-ink2);
}

.t6-meta strong {
    color: var(--t6-ink);
    font-weight: 700;
}

/* 预览图：{@torrent_capture} 输出固定 class="img_item"，只能在此处限定作用域 */
.t6-shots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin: 10px 0 18px;
}

.t6-shots .img_item {
    float: none !important;
    width: auto !important;
    padding: 0 !important;
    border-radius: 10px;
    overflow: hidden;
    background: #ece3d5;
}

.t6-shots .img_item img {
    width: 100% !important;
    margin: 0 !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.t6-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 6px 0 14px;
}

.t6-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--t6-accent), var(--t6-accent2));
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: 0;
}

.t6-btn:hover {
    filter: brightness(1.08);
}

.t6-btn-ghost {
    background: transparent;
    border: 1px solid var(--t6-accent);
    color: var(--t6-accent);
}

.t6-tip a {
    font-size: 14px;
    color: var(--t6-accent2);
    text-decoration: underline;
}

/* --------------------------------------------------------------- 页脚 */
.t6-foot {
    margin-top: 36px;
    padding: 28px 0 34px;
    background: var(--t6-ink);
    color: #cfc4b6;
}

.t6-foot-in {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.t6-foot-logo img {
    height: 32px;
    width: auto;
    opacity: .9;
}

.t6-foot-contact {
    font-size: 14px;
    color: #e6dccd;
}

.t6-foot-copy {
    font-size: 12px;
    color: #9b8f80;
}

/* --------------------------------------------------------------- 响应式 */
/* 全站原本没有定义过这两个类，PC/手机两套区块会同时渲染，这里补上 */
}
}

/* 平板 */
@media (max-width: 1024px) {
    .t6-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
        gap: 16px;
    }

    .t6-sec-title {
        font-size: 18px;
    }
}

/* 手机 */
@media (max-width: 640px) {
    .t6-wrap {
        padding: 0 12px;
    }

    .t6-top-in {
        flex-wrap: wrap;
        gap: 10px;
        min-height: 0;
    }

    .t6-logo img {
        height: 28px;
    }

    .t6-search {
        order: 3;
        max-width: none;
        width: 100%;
        margin-left: 0;
    }

    .t6-search input {
        height: 36px;
        padding-left: 14px;
    }

    .t6-search button {
        height: 36px;
        padding: 0 16px;
    }

    .t6-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .t6-name {
        min-height: 2.9em;
        padding: 8px 10px 12px;
        font-size: 13px;
    }

    .t6-sec {
        margin-top: 22px;
    }

    .t6-sec-title {
        font-size: 17px;
    }

    .t6-detail {
        padding: 12px;
    }

    .t6-title {
        font-size: 17px;
    }

    .t6-ad-icons {
        grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    }

    .t6-shots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .t6-btn {
        flex: 1 1 auto;
        text-align: center;
        padding: 10px 12px;
        font-size: 14px;
    }
}
