@charset "utf-8";
/* ==========================================================================
   tpl018 重排版样式  ——  主题「橙焰流光」
   配色：石墨炭黑底 + 橙焰渐变强调 + 暖白文字
   特征：16:9 横版封面 + 底部渐变遮罩压标题、卡片 10px 圆角、
         抽屉式侧栏（沿用 main5.js 的 .wrapped/.hamb-menu 机制）
   注意：以下类名是 main5.js / main2.min.js 的钩子，只可改样式不可改名：
         .header .search .btn-search .hamb-menu .wrapped .sidebar
         .mobile-menu .list-link .lazyload
   ========================================================================== */

:root {
    --t18-bg: #15151a;
    --t18-bg2: #1d1d24;
    --t18-card: #23232c;
    --t18-line: #33333f;
    --t18-tx: #ecebf0;
    --t18-tx2: #a6a4b4;
    --t18-tx3: #74727f;
    --t18-fire: #ff7a18;
    --t18-fire2: #ffb347;
    --t18-grad: linear-gradient(135deg, #ff7a18 0%, #ffb347 100%);
    --t18-r: 10px;
}

/* ---------- 基础 ---------- */
body {
    margin: 0;
    background: var(--t18-bg);
    color: var(--t18-tx);
    font-size: 15px;
    line-height: 1.6;
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { border: 0; }

.wrap {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 18px;
    box-sizing: border-box;
}

/* ---------- 报头 ---------- */
.header {
    position: relative;
    z-index: 60;
    background: var(--t18-bg2);
    border-bottom: 1px solid var(--t18-line);
}

.header .madou { padding: 0; }

.header .flex {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 62px;
}

.left-block {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.logo { display: block; line-height: 0; }

.logo img {
    display: block;
    height: 40px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
}

/* 汉堡键：桌面隐藏，窄屏出现 */
.icon-hamb {
    display: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--t18-card);
    border: 1px solid var(--t18-line);
    cursor: pointer;
    position: relative;
    flex: 0 0 auto;
}

.icon-hamb::before,
.icon-hamb::after,
.icon-hamb > span {
    content: "";
    position: absolute;
    left: 9px;
    right: 9px;
    height: 2px;
    background: var(--t18-tx);
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

.icon-hamb::before { top: 11px; }
.icon-hamb::after { bottom: 11px; }
.icon-hamb > span { top: 16px; }

.hamb-menu.active::before { transform: translateY(5px) rotate(45deg); }
.hamb-menu.active::after { transform: translateY(-5px) rotate(-45deg); }
.hamb-menu.active > span { opacity: 0; }

/* ---------- 主导航 ---------- */
.nav { flex: 1 1 auto; min-width: 0; }

.nav .menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav .menu li { list-style: none; }

.nav .menu li a {
    display: block;
    padding: 8px 13px !important;
    font-size: 14px;
    color: var(--t18-tx2);
    border-radius: 8px;
    white-space: nowrap;
}

.nav .menu li a:hover {
    color: var(--t18-tx);
    background: var(--t18-card);
}

.nav .menu li a.active {
    color: #2a1704;
    background: var(--t18-grad);
    font-weight: 700;
}

.right-block {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 搜索开关 */
.btn-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--t18-card);
    border: 1px solid var(--t18-line);
    cursor: pointer;
}

.btn-search:hover { border-color: var(--t18-fire); }
.btn-search .icon-close { display: none; }
.btn-search.active .icon-search { display: none; }
.btn-search.active .icon-close { display: block; }

.icon-search,
.icon-close {
    position: relative;
    width: 16px;
    height: 16px;
}

.icon-search::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 11px;
    height: 11px;
    border: 2px solid var(--t18-tx);
    border-radius: 50%;
    box-sizing: border-box;
}

.icon-search::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 6px;
    height: 2px;
    background: var(--t18-tx);
    transform: rotate(45deg);
}

.icon-close::before,
.icon-close::after {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 16px;
    height: 2px;
    background: var(--t18-tx);
}

.icon-close::before { transform: rotate(45deg); }
.icon-close::after { transform: rotate(-45deg); }

/* ---------- 搜索抽屉：由 .header.search-active 展开 ---------- */
.header .search {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .25s ease, opacity .2s ease;
}

.header.search-active .search {
    max-height: 120px;
    opacity: 1;
}

.header .search .form {
    max-width: 1320px;
    margin: 0 auto;
    padding: 12px 18px;
    box-sizing: border-box;
}

.header .search .wrap-input {
    display: flex;
    align-items: stretch;
    background: var(--t18-bg);
    border: 1px solid var(--t18-line);
    border-radius: 10px;
    overflow: hidden;
}

.header .search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: var(--t18-tx);
    font-size: 15px;
    outline: 0;
    -webkit-appearance: none;
    appearance: none;
}

.header .search input::placeholder { color: var(--t18-tx3); }

.header .search .search-btn {
    flex: 0 0 auto;
    width: 58px;
    border: 0;
    cursor: pointer;
    background: var(--t18-grad);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header .search .search-btn .icon-search::before { border-color: #2a1704; }
.header .search .search-btn .icon-search::after { background: #2a1704; }

/* ---------- 顶部广告 / 快捷链接 ---------- */
.t18-ad {
    margin-top: 14px;
    line-height: 0;
}

.t18-ad img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--t18-r);
}

.t18-ad > div { margin-bottom: 8px; }

.t18-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.t18-quick a {
    padding: 6px 14px;
    font-size: 13px;
    color: var(--t18-fire2);
    background: var(--t18-card);
    border: 1px solid var(--t18-line);
    border-radius: 999px;
}

.t18-quick a:hover {
    background: var(--t18-grad);
    color: #2a1704;
    border-color: transparent;
}

.t18-quick:empty { display: none; }

/* ---------- 抽屉侧栏 ---------- */
.wrapped { position: relative; }

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 120;
    width: 268px;
    max-width: 82vw;
    background: var(--t18-bg2);
    border-right: 1px solid var(--t18-line);
    padding: 18px 0;
    box-sizing: border-box;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .26s ease;
}

.wrapped.open .sidebar { transform: translateX(0); }

.mobile-menu { padding: 0 14px; }

.list-link {
    margin: 0;
    padding: 0;
    list-style: none;
}

.list-link li { list-style: none; }

.list-link li a {
    display: block;
    padding: 11px 14px;
    margin-bottom: 4px;
    font-size: 15px;
    color: var(--t18-tx2);
    border-radius: 9px;
    border-left: 3px solid transparent;
}

.list-link li a:hover {
    color: var(--t18-tx);
    background: var(--t18-card);
    border-left-color: var(--t18-fire);
}

.list-link li a.active {
    color: #2a1704;
    background: var(--t18-grad);
    font-weight: 700;
}

/* 抽屉遮罩 */
.shadow {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s ease, visibility .24s ease;
}

.wrapped.open .shadow {
    opacity: 1;
    visibility: visible;
}

/* ---------- 主体 ---------- */
.content { padding: 6px 0 30px; }

.section { margin-top: 26px; }

.heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--t18-line);
}

.heading .title { min-width: 0; }

.heading .title h1,
.heading .title h2,
.heading .title a {
    margin: 0;
    font-size: 19px !important;
    font-weight: 700 !important;
    color: var(--t18-tx) !important;
    letter-spacing: .5px;
    position: relative;
    padding-left: 13px;
    display: block;
}

.heading .title h1::before,
.heading .title h2::before,
.heading .title a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: var(--t18-grad);
}

.heading .sort { flex: 0 0 auto; }

.heading .sort a,
.heading .sort a font {
    font-size: 13px !important;
    color: var(--t18-fire2) !important;
}

.heading .sort a:hover font { color: var(--t18-fire) !important; }

/* ---------- 封面卡片：16:9 + 渐变压标题 ---------- */
.block-post {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.block-post .item {
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
}

.block-post .item > a { display: block; }

.block-post .item .img {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--t18-r);
    background: var(--t18-card);
}

.block-post .item .img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.block-post .item:hover .img img { transform: scale(1.06); }

.block-post .item .img::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 58%;
    background: linear-gradient(to top, rgba(10, 10, 14, .92) 0%, rgba(10, 10, 14, .55) 45%, transparent 100%);
    opacity: 0;
    transition: opacity .25s ease;
}

.block-post .item:hover .img::after { opacity: 1; }

/* 播放角标 */
.block-post .item .img::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    background: var(--t18-grad) padding-box;
    opacity: 0;
    transform: scale(.7);
    transition: opacity .25s ease, transform .25s ease;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.block-post .item:hover .img::before { opacity: .95; transform: scale(1); }

.block-post .info-post { padding: 9px 2px 0; }

.block-post .title-post {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--t18-tx);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.block-post .item:hover .title-post { color: var(--t18-fire2); }

/* ---------- 分页 ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.pagination .item { display: block; }

.pagination .item a {
    display: block;
    min-width: 42px;
    padding: 9px 14px;
    text-align: center;
    font-size: 14px;
    color: var(--t18-tx2);
    background: var(--t18-card);
    border: 1px solid var(--t18-line);
    border-radius: 9px;
}

.pagination .item a:hover {
    color: var(--t18-tx);
    border-color: var(--t18-fire);
}

.pagination .item.active a {
    color: #2a1704;
    background: var(--t18-grad);
    border-color: transparent;
    font-weight: 700;
    cursor: default;
}

.t18-count {
    font-size: 13px;
    color: var(--t18-tx3);
    flex: 0 0 auto;
}

.t18-count b { color: var(--t18-fire2); }

/* ---------- 详情页 ---------- */
.player-trailer {
    display: block;
    background: var(--t18-bg2);
    border: 1px solid var(--t18-line);
    border-radius: 14px;
    padding: 16px;
    box-sizing: border-box;
}

.player-trailer .l-block { width: 100%; }

.player-trailer .main-img { text-align: initial !important; }

.player {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 660px;
    background: #000;
    border-radius: var(--t18-r);
    overflow: hidden;
}

.player video,
.player iframe,
.player embed,
.player object {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 磁力信息 */
.t18-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 0 0 16px;
}

.t18-meta-row {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    font-size: 14px;
    background: var(--t18-card);
    border: 1px solid var(--t18-line);
    border-radius: 9px;
    min-width: 0;
}

.t18-meta-k { flex: 0 0 auto; color: var(--t18-tx3); }
.t18-meta-v { flex: 1 1 auto; min-width: 0; word-break: break-all; color: var(--t18-tx); }

.t18-sub {
    margin: 18px 0 10px;
    font-size: 15px;
    font-weight: 700;
    padding-left: 11px;
    border-left: 4px solid var(--t18-fire);
}

/* 截图：{@torrent_capture} 的 img 自带内联宽度，这里只描边 */
.t18-caps { line-height: 0; }

.t18-caps img,
.t18-caps .img_item {
    display: inline-block;
    box-sizing: border-box;
    border: 1px solid var(--t18-line);
    border-radius: 8px;
    background: var(--t18-card);
    vertical-align: top;
}

/* 下载按钮 */
.download {
    display: flex !important;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px !important;
}

.downbtn {
    display: inline-block;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border-radius: 0 !important;
}

.downbtn a {
    display: inline-block;
    padding: 11px 26px;
    background: var(--t18-grad) !important;
    color: #2a1704 !important;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    width: auto !important;
    cursor: pointer;
}

.downbtn a:hover { filter: brightness(1.08); }

.t18-client {
    margin-top: 14px;
    text-align: center;
    font-size: 14px;
}

.t18-client a { color: var(--t18-fire2) !important; text-decoration: underline; }

/* ---------- 页脚 ---------- */
.footer {
    margin-top: 34px;
    background: var(--t18-bg2);
    border-top: 1px solid var(--t18-line);
}

.block-footer { padding: 22px 0 26px; }

.footer .copyright p {
    margin: 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.9;
    color: var(--t18-tx3);
}

/* 回顶按钮（#myBtn 是页脚脚本的钩子） */
#myBtn {
    background: var(--t18-grad) !important;
    color: #2a1704 !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 13px;
    font-weight: 700;
}

#myBtn:hover { filter: brightness(1.08); background: var(--t18-grad) !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 1300px) {
    .icon-hamb { display: block; }
    .nav { display: none; }
}

@media (max-width: 1100px) {
    .block-post { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 750px) {
    .wrap { padding: 0 12px; }
    .header .flex { min-height: 54px; gap: 10px; }
    .logo img { height: 32px; max-width: 140px; }
    .block-post { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .heading .title h1,
    .heading .title h2,
    .heading .title a { font-size: 16px !important; }
    .block-post .title-post { font-size: 13px; }
    .t18-meta { grid-template-columns: minmax(0, 1fr); }
    .player-trailer { padding: 10px; border-radius: 10px; }
    .downbtn a { padding: 10px 18px; font-size: 14px; }
    .header .search .form { padding: 10px 12px; }
}
