/* Cinema Hub - Clean Professional Video Template */

:root {
    --clr-primary: #c0392b;
    --clr-primary-hover: #a93226;
    --clr-accent: #2c3e50;
    --clr-accent-light: #34495e;
    --clr-white: #ffffff;
    --clr-bg: #f5f5f5;
    --clr-surface: #ffffff;
    --clr-surface-alt: #fafafa;
    --clr-border: #e0e0e0;
    --clr-border-light: #eeeeee;
    --clr-text: #1a1a1a;
    --clr-text-secondary: #555555;
    --clr-text-muted: #888888;
    --clr-shadow: rgba(0, 0, 0, 0.06);
    --clr-shadow-md: rgba(0, 0, 0, 0.12);
    --clr-shadow-lg: rgba(0, 0, 0, 0.18);
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --ease: all 0.25s ease;
    --max-width: 1060px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', Georgia, sans-serif;
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.55;
    font-size: 14px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.site-header {
    background: var(--clr-white);
    border-bottom: 3px solid var(--clr-primary);
    padding: 10px 0;
    box-shadow: 0 2px 10px var(--clr-shadow-md);
}

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

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

.brand-logo:hover .brand-name {
    color: var(--clr-primary-hover);
}

.brand-name {
    font-size: 26px;
    font-weight: 700;
    color: var(--clr-primary);
    letter-spacing: -0.5px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    transition: var(--ease);
}

.brand-domain {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: 20px;
}

.brand-domain-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.brand-domain-addr {
    font-size: 16px;
    font-weight: 700;
    color: var(--clr-primary);
    font-family: 'Courier New', 'Lucida Console', monospace;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ===== LAYOUT ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 14px;
}

.content {
    padding: 10px 0;
}

/* ===== CATEGORY NAVIGATION ===== */
.cats-wrapper {
    background: var(--clr-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
    overflow: hidden;
    margin-bottom: 10px;
}

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

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

.cats-zone {
    font-size: 11px;
    font-weight: 700;
    color: var(--clr-white);
    background: var(--clr-accent);
    white-space: normal;
    word-break: break-all;
    width: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 4px;
    letter-spacing: 0.2px;
    line-height: 1.3;
}

.cats-links {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 8px 10px;
    align-items: center;
    background: var(--clr-surface-alt);
}

/* PC端：8个链接平分整行，flex均分 */
.cats-links a {
    display: block;
    color: var(--clr-text-secondary);
    text-decoration: none;
    padding: 4px 2px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--clr-border);
    background: var(--clr-white);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    transition: var(--ease);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cats-links a:hover {
    background: var(--clr-primary);
    color: var(--clr-white);
    border-color: var(--clr-primary);
    box-shadow: 0 2px 6px rgba(192, 57, 43, 0.3);
}

.cats-links a.active {
    background: var(--clr-primary);
    color: var(--clr-white);
    border-color: var(--clr-primary);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(192, 57, 43, 0.3);
}

/* ===== SEARCH BOX ===== */
.search-panel {
    background: var(--clr-surface);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
}

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

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

.search-panel input[type="text"]:focus {
    border-color: var(--clr-primary);
    background: var(--clr-white);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

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

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

.search-panel button:hover {
    background: var(--clr-primary-hover);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.35);
}

/* ===== HOT TAGS ===== */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 12px 14px;
    background: var(--clr-surface);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
}

.tag-chip {
    padding: 5px 13px;
    background: var(--clr-bg);
    border-radius: 15px;
    color: var(--clr-text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: var(--ease);
    border: 1px solid var(--clr-border);
    font-weight: 500;
}

.tag-chip:hover {
    background: var(--clr-primary);
    color: var(--clr-white);
    border-color: var(--clr-primary);
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.25);
}

/* ===== SECTION HEADINGS ===== */
.media-section {
    margin-bottom: 14px;
}

.section-head {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--clr-border-light);
    position: relative;
    display: flex;
    align-items: center;
}

.section-head::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--clr-primary);
}

.section-heading {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.2px;
    color: var(--clr-accent);
}

.section-heading a {
    color: var(--clr-accent);
    text-decoration: none;
    transition: var(--ease);
}

.section-heading a:hover {
    color: var(--clr-primary);
}

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

.media-grid li {
    animation: riseUp 0.5s ease backwards;
}

.media-grid li:nth-child(1) { animation-delay: 0.04s; }
.media-grid li:nth-child(2) { animation-delay: 0.08s; }
.media-grid li:nth-child(3) { animation-delay: 0.12s; }
.media-grid li:nth-child(4) { animation-delay: 0.16s; }
.media-grid li:nth-child(5) { animation-delay: 0.20s; }
.media-grid li:nth-child(6) { animation-delay: 0.24s; }
.media-grid li:nth-child(7) { animation-delay: 0.28s; }
.media-grid li:nth-child(8) { animation-delay: 0.32s; }

@keyframes riseUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    aspect-ratio: 600 / 350;
    background: var(--clr-border-light);
    box-shadow: 0 2px 6px var(--clr-shadow);
    border: 1px solid var(--clr-border-light);
}

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

.card-thumb:hover {
    box-shadow: 0 6px 18px var(--clr-shadow-lg);
}

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

.card-thumb::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(192, 57, 43, 0.85);
    color: white;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 38px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2;
}

.card-thumb:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-info {
    padding: 7px 0 4px;
}

.card-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

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

.card-info h5 a:hover {
    color: var(--clr-primary);
}

/* ===== VIDEO PLAYER ===== */
.MacPlayer {
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 4px 20px var(--clr-shadow-lg);
}

.video-player-wrap {
    width: 100%;
    height: 580px;
    max-height: 580px;
    margin-bottom: 14px;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 16px var(--clr-shadow-lg);
    position: relative;
}

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

/* ===== TORRENT SCREENSHOT ===== */
.capture-display {
    width: 100%;
}

.capture-display img,
.capture-display .img_item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
    border: 1px solid var(--clr-border);
}

.capture-display .img_item {
    width: 100%;
}

/* ===== DOWNLOAD BUTTONS ===== */
.action-btns {
    text-align: center;
    padding: 16px;
    background: var(--clr-surface);
    border-radius: var(--radius-md);
    margin: 14px 0;
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
}

.btn-action {
    display: inline-block;
    padding: 10px 22px;
    background: var(--clr-primary);
    color: var(--clr-white);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: var(--ease);
    border: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}

.btn-action:hover {
    background: var(--clr-primary-hover);
    box-shadow: 0 4px 14px rgba(192, 57, 43, 0.4);
}

/* ===== SHARE SECTION ===== */
.link-share {
    background: var(--clr-surface);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 14px 0;
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
    display: flex;
    align-items: center;
    gap: 12px;
}

.link-display-box {
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.link-label-txt {
    font-weight: 700;
    font-size: 12px;
    color: var(--clr-primary);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.link-value-txt {
    font-size: 12px;
    color: var(--clr-text-secondary);
    font-family: 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-copy-link {
    padding: 10px 20px;
    background: var(--clr-accent);
    color: var(--clr-white);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.btn-copy-link:hover {
    background: var(--clr-accent-light);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

.icon-share {
    font-size: 16px;
}

/* ===== FRIEND LINKS ===== */
.friend-links-list {
    padding: 10px 12px;
    background: var(--clr-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--clr-border);
}

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

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

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

.friend-links-list a:hover {
    color: var(--clr-primary);
}

/* ===== PAGINATION ===== */
.page-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 20px 0;
}

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

.pg-link {
    background: var(--clr-surface);
    color: var(--clr-text);
    border: 1px solid var(--clr-border);
}

.pg-link:hover {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: var(--clr-white);
}

.pg-current {
    background: var(--clr-primary);
    color: var(--clr-white);
    border: 1px solid var(--clr-primary);
    cursor: default;
}

/* ===== FOOTER ===== */
.site-footer {
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--clr-border);
    margin-top: 24px;
    background: var(--clr-surface);
}

.site-footer p {
    margin: 6px 0;
    color: var(--clr-text-muted);
    font-size: 12px;
}

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

.site-footer a:hover {
    color: var(--clr-primary);
}

/* ===== UTILITIES ===== */
.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

img[data-original] {
    background: var(--clr-bg);
}

.hide-mobile {
    display: block;
}

.hide-pc {
    display: block;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 8px;
    }

    .content {
        padding: 6px 0;
    }

    .brand-wrapper {
        gap: 10px;
    }

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

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

    .brand-domain-tag {
        font-size: 10px;
    }

    .brand-domain-addr {
        font-size: 14px;
    }

    /* Mobile Nav: 分区名15%，4个汉字全部显示；链接区85%，每行4个共2行 */
    .cats-row {
        display: flex;
        align-items: stretch;
    }

    .cats-zone {
        width: 15%;
        flex-shrink: 0;
        flex: none;
        font-size: 10px;
        padding: 5px 2px;
        white-space: normal;
        word-break: break-all;
        line-height: 1.4;
        /* 强制写4个字：每行2字，共2行 */
        letter-spacing: 0;
    }

    .cats-links {
        width: 85%;
        flex: none;
        flex-wrap: wrap;
        gap: 3px;
        padding: 5px 4px;
        align-items: flex-start;
        align-content: flex-start;
    }

    /* 移动端每行4个链接，共2行显示8个 */
    .cats-links a {
        flex: none;
        font-size: 12px;
        padding: 4px 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: calc(25% - 3px);
        text-align: center;
    }

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

    .card-info h5 {
        font-size: 12px;
    }

    .section-heading {
        font-size: 16px;
    }

    .media-section {
        margin-bottom: 10px;
    }

    .search-panel {
        padding: 10px;
    }

    .search-panel form {
        gap: 6px;
    }

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

    .search-panel button {
        padding: 8px 10px;
        font-size: 12px;
    }

    .tags-cloud {
        padding: 10px;
        gap: 5px;
    }

    .tag-chip {
        font-size: 11px;
        padding: 4px 10px;
    }

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

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

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

    .link-display-box {
        padding: 8px 10px;
    }

    .link-label-txt {
        font-size: 11px;
    }

    .link-value-txt {
        font-size: 11px;
    }

    .btn-copy-link {
        padding: 8px 12px;
        font-size: 12px;
    }

    .video-player-wrap {
        height: 56.25vw;
        max-height: 400px;
    }

    .cats-wrapper {
        margin-bottom: 8px;
    }
}

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

    .brand-domain-tag {
        font-size: 9px;
    }

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

    .cats-zone {
        width: 15%;
        font-size: 10px;
        padding: 4px 1px;
        white-space: normal;
        word-break: break-all;
    }

    .cats-links {
        width: 85%;
        gap: 2px;
        padding: 4px 3px;
    }

    .cats-links a {
        font-size: 12px;
        padding: 3px 1px;
        width: calc(25% - 2px);
    }

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

    .card-info h5 {
        font-size: 11px;
    }

    .action-btns {
        padding: 10px 4px;
        gap: 5px;
    }

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

    .link-share {
        padding: 8px;
        gap: 5px;
    }

    .btn-copy-link {
        padding: 8px 8px;
        font-size: 11px;
    }

    .video-player-wrap {
        height: 56.25vw;
        max-height: 300px;
    }
}

/* 大屏手机(481-768)：栏目链接字体14px，分区名10px */
@media (min-width: 481px) and (max-width: 768px) {
    .cats-links a {
        font-size: 14px;
    }

    .cats-zone {
        font-size: 10px;
    }
}
