/* Rose Theme Template - Clean & Modern */

:root {
    --rose: #c8102e;
    --rose-dark: #a50d26;
    --rose-light: #f7e6e9;
    --rose-soft: #fdf0f2;
    --ink: #2c2c2c;
    --ink-soft: #555555;
    --ink-muted: #888888;
    --line: #e8e0e2;
    --line-light: #f2ecee;
    --surface: #ffffff;
    --page-bg: #f6f2f3;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 4px rgba(200,16,46,0.07);
    --shadow-md: 0 3px 12px rgba(200,16,46,0.1);
    --shadow-lg: 0 6px 20px rgba(200,16,46,0.15);
    --grad: linear-gradient(135deg, #c8102e 0%, #e8424a 100%);
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --ease: all 0.25s ease;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: var(--page-bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── Utility ── */
.clearfix::after { content: ""; display: table; clear: both; }
.hide-mob { display: block; }
.hide-pc  { display: block; }

@media (max-width: 768px) { .hide-mob { display: none !important; } }
@media (min-width: 769px) { .hide-pc  { display: none !important; } }

/* ── Layout ── */
.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 14px;
}

.sect {
    padding: 14px 0;
}

/* ── Site Header ── */
.site-header {
    background: var(--surface);
    border-bottom: 3px solid var(--rose);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.brand-logo {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand-logo::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 32px;
    background: var(--grad);
    border-radius: 2px;
}

.brand-name {
    font-size: 26px;
    font-weight: 900;
    color: var(--rose);
    letter-spacing: 1px;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border: 1.5px dashed var(--rose);
    border-radius: 20px;
    background: var(--rose-soft);
}

.domain-hint {
    font-size: 11px;
    color: var(--rose);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.domain-addr {
    font-size: 15px;
    font-weight: 800;
    color: var(--rose-dark);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* ── Category Navigation ── */
.category-nav {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.category-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--line-light);
}

.category-row:last-child {
    border-bottom: none;
}

.category-title {
    width: 10%;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--surface);
    background: var(--rose);
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
    writing-mode: horizontal-tb;
}

.category-links {
    width: 90%;
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    padding: 9px 8px;
    align-items: center;
}

.category-links a {
    display: inline-block;
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 13px;
    padding: 5px 3px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--line);
    background: var(--page-bg);
    white-space: nowrap;
    text-align: center;
    transition: var(--ease);
    /* 8 items, 7 gaps of 5px */
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.category-links a:hover {
    background: var(--rose);
    color: #fff;
    border-color: var(--rose);
    box-shadow: var(--shadow-sm);
}

.category-links a.active {
    background: var(--rose);
    color: #fff;
    border-color: var(--rose-dark);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* ── Search Bar ── */
.search-box {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 12px 14px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}

.search-box form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.search-box input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 9px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--page-bg);
    color: var(--ink);
    font-size: 14px;
    transition: var(--ease);
    outline: none;
    font-family: inherit;
}

.search-box input[type="text"]:focus {
    border-color: var(--rose);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(200,16,46,0.08);
}

.search-box input[type="text"]::placeholder {
    color: var(--ink-muted);
}

.search-box button {
    padding: 9px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--grad);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.search-box button:hover {
    box-shadow: var(--shadow-md);
    filter: brightness(1.05);
}

/* ── Hot Tag Lists ── */
.hot-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px 14px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}

.hot-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    background: var(--rose-soft);
    border: 1px solid var(--rose-light);
    color: var(--rose-dark);
    font-size: 13px;
    text-decoration: none;
    transition: var(--ease);
}

.hot-tag:hover {
    background: var(--rose);
    color: #fff;
    border-color: var(--rose);
    box-shadow: var(--shadow-sm);
}

/* ── Section Modules ── */
.module-section {
    margin-bottom: 22px;
}

.module-body {
    /* inner wrapper */
}

.module-header {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line-light);
    position: relative;
}

.module-header::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--grad);
    border-radius: 2px;
}

.module-ttl {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.3px;
    margin: 0;
    line-height: 1.3;
}

.module-ttl a {
    color: var(--ink);
    text-decoration: none;
    transition: var(--ease);
}

.module-ttl a:hover {
    color: var(--rose);
}

/* ── Media Grid ── */
.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    list-style: none;
    padding: 0;
}

.media-grid li {
    min-width: 0;
}

.media-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    aspect-ratio: 600 / 350;
    background: var(--line-light);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: var(--ease);
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.media-thumb:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--rose-light);
}

.media-thumb:hover img {
    transform: scale(1.06);
}

.media-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(200,16,46,0.55) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-thumb:hover::after {
    opacity: 1;
}

.media-caption {
    padding: 8px 2px 4px;
}

.media-caption h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
}

.media-caption h5 a {
    color: var(--ink);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--ease);
}

.media-caption h5 a:hover {
    color: var(--rose);
}

/* ── Video Player ── */
.video-container {
    width: 100%;
    height: 600px;
    max-height: 600px;
    margin-bottom: 18px;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.video-container iframe,
.video-container video,
.video-container #video-container {
    width: 100%;
    height: 100%;
    border: none;
}

.MacPlayer {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: var(--shadow-lg);
}

/* ── Torrent Preview Grid ── */
.preview-grid {
    width: 100%;
}

.preview-grid picture,
.preview-grid img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}

/* ── Action Buttons (Download etc.) ── */
.action-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 16px;
    margin: 16px 0;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.act-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--grad);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    font-family: inherit;
}

.act-btn:hover {
    box-shadow: var(--shadow-md);
    filter: brightness(1.08);
}

/* ── Share Bar ── */
.share-bar {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin: 16px 0;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-link-display {
    background: var(--page-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.share-hint {
    font-weight: 700;
    font-size: 12px;
    color: var(--rose);
    white-space: nowrap;
    flex-shrink: 0;
}

.share-link-text {
    font-size: 12px;
    color: var(--ink-soft);
    font-family: 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-copy {
    padding: 10px 20px;
    background: var(--grad);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.share-copy:hover {
    box-shadow: var(--shadow-md);
    filter: brightness(1.08);
}

.share-ico {
    font-size: 15px;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 20px 0;
}

.page-btn,
.page-current {
    display: inline-block;
    padding: 7px 14px;
    border-radius: var(--radius-xs);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
}

.page-btn {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
}

.page-btn:hover {
    background: var(--rose);
    color: #fff;
    border-color: var(--rose);
    box-shadow: var(--shadow-sm);
}

.page-current {
    background: var(--grad);
    color: #fff;
    border: 1px solid var(--rose-dark);
    cursor: default;
}

/* ── Friend Links ── */
.friend-links-list {
    padding: 12px 14px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.friend-links-list dl {
    margin: 0;
}

.friend-links-list dd {
    display: inline-block;
    margin: 3px 5px;
}

.friend-links-list a {
    color: var(--rose-dark);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
}

.friend-links-list a:hover {
    color: var(--rose);
    text-decoration: underline;
}

/* ── Footer ── */
.site-footer {
    padding: 22px 0;
    text-align: center;
    border-top: 1px solid var(--line);
    margin-top: 28px;
    background: var(--surface);
}

.site-copyright p {
    margin: 6px 0;
    color: var(--ink-muted);
    font-size: 13px;
}

.site-copyright a {
    color: var(--ink-muted);
    text-decoration: none;
    transition: var(--ease);
}

.site-copyright a:hover {
    color: var(--rose);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .wrap {
        padding: 0 8px;
    }

    .site-header {
        padding: 8px 0;
    }

    .brand-name {
        font-size: 21px;
    }

    .domain-badge {
        padding: 4px 10px;
        gap: 5px;
    }

    .domain-hint {
        font-size: 10px;
    }

    .domain-addr {
        font-size: 13px;
    }

    .sect {
        padding: 8px 0;
    }

    /* Mobile nav: label stays left, links become 2 rows of 4 */
    .category-row {
        align-items: stretch;
    }

    .category-title {
        width: 12%;
        font-size: 12px;
        padding: 8px 2px;
    }

    .category-links {
        width: 88%;
        flex-wrap: wrap;
        gap: 5px;
        padding: 8px 5px;
        font-size: 14px;
    }

    .category-links a {
        font-size: 14px;
        padding: 7px 3px;
        /* 4 per row, 3 gaps of 5px */
        width: calc((100% - 15px) / 4);
    }

    .search-box {
        padding: 9px 10px;
    }

    .search-box form {
        gap: 5px;
    }

    .search-box input[type="text"] {
        min-width: 90px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .search-box button {
        padding: 8px 9px;
        font-size: 12px;
    }

    /* 2 per row on mobile */
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .media-caption h5 {
        font-size: 12px;
    }

    .module-ttl {
        font-size: 16px;
    }

    .action-btns {
        padding: 12px 8px;
        gap: 8px;
    }

    .act-btn {
        padding: 9px 14px;
        font-size: 13px;
    }

    .share-bar {
        padding: 12px;
        gap: 8px;
    }

    .share-link-display {
        padding: 9px 10px;
    }

    .share-hint {
        font-size: 11px;
    }

    .share-link-text {
        font-size: 11px;
    }

    .share-copy {
        padding: 9px 12px;
        font-size: 12px;
    }

    .video-container {
        height: 56.25vw;
        max-height: 380px;
        margin-bottom: 12px;
    }

    .site-footer {
        padding: 16px 0;
        margin-top: 18px;
    }

    .hot-tags {
        padding: 10px;
        gap: 6px;
    }

    .hot-tag {
        font-size: 12px;
        padding: 3px 10px;
    }
}

@media (max-width: 480px) {
    .brand-name {
        font-size: 18px;
    }

    .domain-addr {
        font-size: 12px;
    }

    .category-title {
        width: 13%;
        font-size: 11px;
        padding: 6px 2px;
    }

    .category-links {
        width: 87%;
        gap: 4px;
        padding: 6px 4px;
    }

    .category-links a {
        font-size: 13px;
        padding: 6px 2px;
        width: calc((100% - 12px) / 4);
    }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .media-caption h5 {
        font-size: 11px;
    }

    .module-ttl {
        font-size: 15px;
    }

    .act-btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .action-btns {
        gap: 6px;
    }

    .share-bar {
        padding: 10px;
        gap: 6px;
    }

    .share-copy {
        padding: 8px 10px;
        font-size: 11px;
    }

    .video-container {
        height: 56.25vw;
        max-height: 280px;
    }

    .page-btn,
    .page-current {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 30px;
    }
}

/* ── Lazy load bg ── */
img[data-original] {
    background: var(--rose-soft);
}