:root {
    color-scheme: dark;
    --bg: #0b0b0c;
    --panel: #111114;
    --panel-2: #17171b;
    --line: #29292f;
    --line-soft: #202025;
    --text: #f3f3f4;
    --muted: #a2a2aa;
    --muted-2: #71717a;
    --red: #e31b2d;
    --red-dark: #b81020;
    --shell: 1500px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
body, input, button { font-size: 14px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 11, 12, .97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}
.site-header__bar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.brand { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.brand__mark,
.brand__name {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -.8px;
    line-height: 1;
}
.brand__mark { color: var(--red); }
.brand__age {
    margin-left: 5px;
    padding: 3px 5px;
    border: 1px solid rgba(227, 27, 45, .75);
    border-radius: 4px;
    color: #ff5867;
    font-size: 10px;
    font-weight: 800;
}
.site-search {
    width: min(660px, 62vw);
    height: 42px;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto auto;
    overflow: hidden;
    border: 1px solid #3a3a42;
    border-radius: 6px;
    background: #141417;
}
.site-search input {
    min-width: 0;
    padding: 0 16px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}
.site-search input::placeholder { color: #73737d; }
.site-search button {
    min-width: 82px;
    border: 0;
    background: var(--red);
    color: #fff;
    font-weight: 700;
}
.site-search button:hover { background: #f12739; }
.site-search .site-search__bt { border-left: 1px solid #ff4d5c; background: #26262c; }
.site-search .site-search__bt:hover { background: #34343b; }
.primary-nav { border-top: 1px solid var(--line-soft); }
.primary-nav__inner {
    height: 44px;
    display: flex;
    align-items: stretch;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}
.primary-nav__inner::-webkit-scrollbar { display: none; }
.primary-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 0 18px;
    color: #c8c8ce;
    white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav a.is-active { color: #fff; }
.primary-nav a.is-active::after,
.primary-nav a:hover::after {
    content: "";
    position: absolute;
    right: 16px;
    bottom: -1px;
    left: 16px;
    height: 2px;
    background: var(--red);
}

.fine-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}
#fine-category-nav { scroll-margin-top: 16px; }
.fine-nav a,
.quick-search__links a,
.torrent-hot a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid #303037;
    border-radius: 4px;
    background: #151518;
    color: #c2c2c9;
    line-height: 1.2;
}
.fine-nav a:hover,
.fine-nav a.is-active,
.quick-search__links a:hover,
.torrent-hot a:hover {
    border-color: var(--red);
    background: rgba(227, 27, 45, .12);
    color: #fff;
}

.quick-search {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    background: #101012;
}
.quick-search__row { display: flex; align-items: flex-start; gap: 18px; }
.quick-search__row + .quick-search__row { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.quick-search__row strong { flex: 0 0 64px; padding-top: 7px; color: #fff; font-size: 13px; }
.quick-search__row strong::before { content: ""; display: inline-block; width: 3px; height: 13px; margin-right: 8px; background: var(--red); vertical-align: -2px; }
.quick-search__links { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-search__links a { min-height: 28px; padding: 4px 10px; font-size: 12px; }

.main-content { padding-top: 30px; padding-bottom: 54px; }
.home-kicker { margin-bottom: 18px; color: #ff5968; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.site-profile {
    margin: 0 0 34px;
    padding: 22px 24px;
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--red);
    background: linear-gradient(110deg, rgba(255, 43, 61, .08), rgba(255, 255, 255, .015) 48%);
}
.site-profile h1 { margin: 0 0 10px; color: #f4f4f5; font-size: clamp(20px, 2.2vw, 30px); line-height: 1.25; }
.site-profile p { max-width: 980px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.content-section + .content-section { margin-top: 46px; }
.section-heading {
    min-height: 45px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--line);
}
.section-heading h1,
.section-heading h2 {
    position: relative;
    margin: 0;
    padding: 0 0 14px 14px;
    font-size: 20px;
    line-height: 1.2;
}
.section-heading h1::before,
.section-heading h2::before {
    content: "";
    position: absolute;
    top: 1px;
    bottom: 14px;
    left: 0;
    width: 4px;
    border-radius: 2px;
    background: var(--red);
}
.section-more { padding-top: 2px; color: var(--muted); font-size: 13px; }
.section-more:hover { color: #fff; }

.media-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 25px 18px;
}
.media-card { min-width: 0; }
.media-card__cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    background: var(--panel-2);
}
.media-card__cover::after {
    content: "";
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, .62));
    pointer-events: none;
}
.media-card__cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .3s ease, opacity .25s ease;
}
.media-card__cover:hover img:not(.is-placeholder) { transform: scale(1.035); }
.media-card__cover img.is-placeholder { object-fit: contain; padding: 25%; opacity: .32; }
.media-card__age {
    position: absolute;
    z-index: 2;
    left: 7px;
    bottom: 7px;
    padding: 3px 5px;
    border-radius: 2px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}
.media-card__play {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 50%;
    background: rgba(0,0,0,.48);
    opacity: 0;
    transform: translate(-50%, -45%);
    transition: .2s ease;
}
.media-card__play::after {
    content: "";
    position: absolute;
    top: 11px;
    left: 15px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid #fff;
}
.media-card__cover:hover .media-card__play { opacity: 1; transform: translate(-50%, -50%); }
.media-card h2,
.media-card h3 {
    min-height: 42px;
    margin: 10px 0 4px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #eeeeef;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}
.media-card h2 a:hover,
.media-card h3 a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.media-card__meta { color: #ec3343; font-size: 11px; }

.listing-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.listing-heading__eyebrow { color: var(--red); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.listing-heading h1 { margin: 3px 0 0; font-size: 24px; }
.listing-heading__count { color: var(--muted); font-size: 12px; }
.torrent-hot { display: flex; flex-wrap: wrap; gap: 7px; margin: -4px 0 22px; }
.torrent-hot a { min-height: 28px; padding: 4px 10px; font-size: 12px; }

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-top: 38px;
}
.pagination a,
.pagination span {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid #33333a;
    border-radius: 4px;
    background: #141417;
    color: #c9c9cf;
}
.pagination a:hover,
.pagination .is-current { border-color: var(--red); background: var(--red); color: #fff; }
.breadcrumb { display: flex; gap: 8px; margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.breadcrumb a:hover { color: #fff; }
.detail-panel { padding: 22px; border: 1px solid var(--line); background: #101012; }
.detail-heading { margin-bottom: 18px; }
.detail-heading__tag { color: var(--red); font-size: 11px; font-weight: 800; }
.detail-heading h1 { margin: 7px 0 0; font-size: clamp(19px, 2vw, 28px); line-height: 1.45; }
.player-shell {
    position: relative;
    width: 100%;
    min-height: min(70vh, 760px);
    overflow: hidden;
    background: #000;
}
.player-shell iframe,
.player-shell video,
.player-shell > div { max-width: 100%; }
.player-shell iframe,
.player-shell video { width: 100% !important; min-height: min(70vh, 760px); }
.player-error {
    position: absolute;
    z-index: 6;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, .86);
    color: #fff;
}
.player-error span { color: var(--muted); }
.player-error button {
    min-height: 38px;
    margin-top: 6px;
    padding: 0 18px;
    border: 1px solid var(--red);
    border-radius: 4px;
    background: var(--red);
    color: #fff;
    font-weight: 700;
}
.detail-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 15px;
    color: var(--muted);
}
.detail-actions button,
.download-actions button {
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid var(--red);
    border-radius: 4px;
    background: var(--red);
    color: #fff;
    font-weight: 700;
}
.detail-actions__url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recommendations { margin-top: 38px !important; }

.torrent-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 0 0 24px;
    background: var(--line);
    border: 1px solid var(--line);
}
.torrent-meta > div { padding: 15px; background: #151518; }
.torrent-meta dt { margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.torrent-meta dd { margin: 0; color: #fff; font-weight: 700; }
.torrent-captures { margin: 0; }
.torrent-captures figcaption { margin-bottom: 12px; color: var(--muted); }
.torrent-captures > div { display: grid; gap: 10px; }
.torrent-captures img { width: 100%; height: auto; display: block; }
.download-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.download-actions button:hover { background: #f32739; }
.download-actions .button-ghost { border-color: #3a3a42; background: #1b1b20; }
.client-links { display: flex; gap: 18px; margin-top: 16px; }
.client-links a { color: #ff4e5d; font-size: 12px; }
.hide-desktop { display: none; }

.ad-slot { overflow: hidden; }
.ad-slot--banner { margin-top: 16px; margin-bottom: 16px; }
.ad-slot img { width: 100%; height: auto; display: block; }

.site-footer { border-top: 1px solid var(--line); background: #09090a; }
.friend-links {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line-soft);
    color: var(--muted);
}
.friend-links:not(:has(a)) { display: none; }
.friend-links strong { color: #e6e6e8; white-space: nowrap; }
.friend-links__items { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.friend-links a:hover { color: #fff; }
.site-footer__bottom {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted-2);
    font-size: 12px;
}
.site-footer__bottom p { margin: 0; }

.toast {
    position: fixed;
    z-index: 9999;
    right: 20px;
    bottom: 20px;
    max-width: calc(100% - 40px);
    padding: 12px 16px;
    border: 1px solid #474750;
    border-radius: 4px;
    background: #202026;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

@media (max-width: 1240px) {
    .media-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .primary-nav a { padding-inline: 14px; }
}

@media (max-width: 800px) {
    .shell { width: min(calc(100% - 24px), var(--shell)); }
    .site-header { position: relative; }
    .site-header__bar { min-height: 64px; gap: 14px; }
    .brand__mark, .brand__name { font-size: 20px; }
    .brand__age { display: none; }
    .site-search { width: min(68vw, 520px); height: 38px; }
    .site-search button { min-width: 62px; font-size: 12px; }
    .site-search input { padding-inline: 11px; font-size: 12px; }
    .primary-nav__inner { width: 100%; padding-inline: 12px; }
    .fine-nav { gap: 6px; padding: 12px 0; }
    .fine-nav a { min-height: 30px; padding: 5px 9px; font-size: 12px; }
    .quick-search { width: 100%; margin-top: 8px; border-right: 0; border-left: 0; }
    .main-content { padding-top: 22px; }
    .media-grid { gap: 20px 12px; }
    .detail-panel { padding: 14px; }
    .player-shell, .player-shell iframe, .player-shell video { min-height: 56vw; }
    .torrent-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .site-header__bar { min-height: 106px; flex-wrap: wrap; align-content: center; padding-block: 10px; }
    .brand { width: 100%; justify-content: center; }
    .site-search { width: 100%; }
    .primary-nav a { padding-inline: 12px; font-size: 13px; }
    .quick-search__row { gap: 8px; }
    .quick-search__row strong { flex-basis: 58px; font-size: 12px; }
    .quick-search__links { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
    .quick-search__links::-webkit-scrollbar { display: none; }
    .quick-search__links a { flex: 0 0 auto; }
    .home-kicker { margin-bottom: 14px; }
    .site-profile { margin-bottom: 26px; padding: 18px; }
    .site-profile p { font-size: 13px; line-height: 1.75; }
    .content-section + .content-section { margin-top: 34px; }
    .section-heading { min-height: 39px; margin-bottom: 12px; }
    .section-heading h1, .section-heading h2 { padding-bottom: 11px; font-size: 17px; }
    .section-heading h1::before, .section-heading h2::before { bottom: 11px; }
    .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
    .media-card h2, .media-card h3 { min-height: 39px; margin-top: 8px; font-size: 13px; }
    .media-card__play { display: none; }
    .listing-heading h1 { font-size: 21px; }
    .pagination { gap: 5px; }
    .pagination a, .pagination span { min-width: 34px; height: 36px; padding: 0 9px; font-size: 12px; }
    .detail-actions { align-items: flex-start; flex-direction: column; }
    .detail-actions__url { width: 100%; }
    .torrent-meta { grid-template-columns: 1fr 1fr; }
    .download-actions button { flex: 1 1 calc(50% - 5px); padding-inline: 10px; }
    .hide-mobile { display: none !important; }
    .hide-desktop { display: inline !important; }
    .site-footer__bottom { min-height: 88px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 8px; padding-block: 18px; }
}
