/* Video Portal Template - Warm Commerce Style */

:root {
    --brand: #ff4400;
    --brand-deep: #e63600;
    --brand-light: #ff6633;
    --accent-gold: #ffaa00;
    --accent-warm: #fff3ee;
    --text-main: #333333;
    --text-sub: #666666;
    --text-muted: #999999;
    --bg-base: #f5f5f5;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --divider: #e8e8e8;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-hover: 0 8px 24px rgba(255,68,0,0.18);
    --gradient-brand: linear-gradient(135deg, #ff4400 0%, #ff8800 100%);
    --gradient-warm: linear-gradient(135deg, #ff6633 0%, #ffaa00 100%);
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --ease: all 0.25s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

/* ===== HEADER ===== */
.tb-header {
    background: var(--bg-white);
    border-bottom: 2px solid var(--brand);
    padding: 0.7rem 0;
    box-shadow: var(--shadow-sm);
}

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

.tb-logo-wrap {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--ease);
}

.tb-logo-wrap:hover {
    opacity: 0.88;
}

.tb-site-title {
    font-size: 30px;
    font-weight: 900;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.tb-domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-warm);
    border: 1.5px solid var(--brand);
    border-radius: 20px;
    padding: 5px 14px;
}

.tb-domain-badge .lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand);
    white-space: nowrap;
}

.tb-domain-badge .url {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.5px;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.content {
    padding: 14px 0;
}

/* ===== NAV ===== */
.nav-wrapper {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid var(--divider);
    box-shadow: var(--shadow-sm);
}

.nav-section-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--divider);
}

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

.nav-zone-tag {
    font-size: 13px;
    font-weight: 700;
    color: var(--bg-white);
    background: var(--gradient-brand);
    white-space: nowrap;
    width: 10%;
    min-width: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    flex-shrink: 0;
    text-align: center;
    letter-spacing: 0.5px;
}

.nav-zone-links {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 10px;
    align-items: center;
    background: var(--bg-white);
}

.nav-zone-links a {
    display: inline-block;
    color: var(--text-sub);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--radius-xs);
    transition: var(--ease);
    background: var(--bg-base);
    border: 1px solid var(--divider);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    width: calc((100% - 42px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.nav-zone-links a:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    box-shadow: 0 3px 8px rgba(255,68,0,0.25);
}

.nav-zone-links a.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(255,68,0,0.3);
}

/* ===== SEARCH ===== */
.search-panel {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--divider);
    box-shadow: var(--shadow-sm);
}

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

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

.search-panel input[type="text"]:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,68,0,0.1);
}

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

.search-panel button {
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gradient-brand);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.search-panel button:hover {
    box-shadow: 0 4px 14px rgba(255,68,0,0.35);
    transform: translateY(-1px);
}

.search-panel button:active {
    transform: translateY(0);
}

/* ===== HOT TAGS ===== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 12px 14px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    border: 1px solid var(--divider);
    box-shadow: var(--shadow-sm);
}

.tag-item {
    padding: 5px 13px;
    background: var(--accent-warm);
    border-radius: 14px;
    color: var(--brand);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--ease);
    border: 1px solid rgba(255,68,0,0.2);
}

.tag-item:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    box-shadow: 0 3px 10px rgba(255,68,0,0.2);
}

/* ===== SECTION BLOCK ===== */
.sect-block {
    margin-bottom: 18px;
}

.sect-inner {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--divider);
    padding: 14px;
}

.sect-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--divider);
    position: relative;
}

.sect-head::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gradient-brand);
    border-radius: 2px;
}

.sect-heading {
    font-size: 19px;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
    letter-spacing: -0.2px;
}

.sect-heading a {
    color: var(--text-main);
    text-decoration: none;
    transition: var(--ease);
}

.sect-heading a:hover {
    color: var(--brand);
}

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

.card-grid li {
    position: relative;
    animation: cardFadeUp 0.5s ease backwards;
}

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

@keyframes cardFadeUp {
    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(--bg-base);
    border: 1px solid var(--divider);
}

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

.card-thumb:hover {
    box-shadow: var(--shadow-hover);
}

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

.card-thumb::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    width: 44px;
    height: 44px;
    background: rgba(255,68,0,0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    z-index: 2;
    opacity: 0;
    transition: var(--ease);
    line-height: 44px;
    text-align: center;
}

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

.card-info {
    padding: 8px 2px 4px;
}

.card-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text-sub);
}

.card-info h5 a {
    color: var(--text-sub);
    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(--brand);
}

/* ===== VIDEO PLAYER ===== */
.player-wrap {
    width: 100%;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 14px;
}

/* ===== TORRENT DETAIL ===== */
.torrent-detail-box {
    font-size: 15px;
    line-height: 1.9;
    padding: 20px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--divider);
    margin: 14px 0;
    box-shadow: var(--shadow-sm);
}

.torrent-title-row {
    line-height: 1.8;
    text-align: center;
    padding: 16px 20px;
    font-size: 17px;
    margin: 14px 0;
    word-break: break-all;
    background: var(--accent-warm);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--brand);
}

.torrent-title-row a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
}

.capture-display {
    margin-top: 12px;
}

.capture-display picture {
    display: block;
    width: 100%;
}

.capture-display picture img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* ===== DOWNLOAD BUTTONS ===== */
.dl-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
    margin: 14px 0;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--divider);
    box-shadow: var(--shadow-sm);
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: var(--ease);
    background: var(--gradient-brand);
    color: #fff;
    border: none;
    font-family: inherit;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.dl-btn:hover {
    box-shadow: 0 6px 18px rgba(255,68,0,0.35);
    transform: translateY(-2px);
}

/* ===== SHARE SECTION ===== */
.share-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    margin: 14px 0;
    border: 1px solid var(--divider);
    box-shadow: var(--shadow-sm);
}

.share-url-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    background: var(--bg-base);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    border: 1px solid var(--divider);
    overflow: hidden;
}

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

.share-url {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    font-family: 'Courier New', monospace;
}

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

.share-copy-btn:hover {
    box-shadow: 0 4px 14px rgba(255,68,0,0.3);
    transform: translateY(-1px);
}

.share-icon {
    font-size: 15px;
    line-height: 1;
}

/* ===== PAGINATION ===== */
.pager-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 18px 0;
}

.pg-link, .pg-cur {
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    transition: var(--ease);
    min-width: 38px;
    text-align: center;
    font-family: inherit;
}

.pg-link {
    background: var(--bg-white);
    color: var(--text-main);
    text-decoration: none;
    border: 1px solid var(--divider);
}

.pg-link:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 3px 10px rgba(255,68,0,0.2);
}

.pg-cur {
    background: var(--gradient-brand);
    color: #fff;
    border: 1px solid var(--brand);
    cursor: default;
    font-weight: 700;
}

/* ===== FOOTER ===== */
.site-footer {
    padding: 22px 0;
    text-align: center;
    border-top: 2px solid var(--divider);
    margin-top: 28px;
    background: var(--bg-white);
}

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

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

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

/* ===== FRIEND LINKS ===== */
.friend-links-wrap {
    padding: 12px 14px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--divider);
}

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

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

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

.friend-links-wrap a:hover {
    color: var(--brand);
}

/* ===== HIDE UTILITIES ===== */
.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; }
}

/* ===== CLEARFIX ===== */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

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

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

    .tb-header { padding: 0.5rem 0; }

    .tb-site-title { font-size: 22px; }

    .tb-domain-badge { padding: 4px 10px; }
    .tb-domain-badge .lbl { font-size: 10px; }
    .tb-domain-badge .url { font-size: 13px; }

    .content { padding: 10px 0; }

    /* Nav mobile: 缩小左侧区域标签，增大右侧链接区域和字号 */
    .nav-zone-tag {
        width: 12%;
        min-width: 36px;
        font-size: 11px;
        padding: 8px 2px;
        letter-spacing: 0;
    }

    .nav-zone-links {
        width: 88%;
        gap: 5px;
        padding: 8px 6px;
        font-size: 15px;
    }

    .nav-zone-links a {
        font-size: 15px;
        padding: 7px 2px;
        width: calc((100% - 15px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    .search-panel { padding: 10px 10px; }
    .search-panel input[type="text"] { min-width: 100px; font-size: 13px; padding: 9px 10px; }
    .search-panel button { padding: 9px 10px; font-size: 12px; }

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

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

    .dl-actions { gap: 8px; padding: 12px; }
    .dl-btn { padding: 10px 16px; font-size: 13px; }

    .share-section { padding: 10px; gap: 8px; }
    .share-label { font-size: 11px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 9px 12px; font-size: 12px; }

    .pager-bar { gap: 5px; padding: 14px 0; }
    .pg-link, .pg-cur { padding: 7px 11px; font-size: 12px; min-width: 34px; }

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

@media (max-width: 480px) {
    .tb-header-inner { gap: 10px; }
    .tb-site-title { font-size: 20px; }

    .nav-zone-tag { width: 12%; min-width: 32px; font-size: 10px; padding: 6px 1px; letter-spacing: 0; }
    .nav-zone-links { width: 88%; gap: 4px; padding: 6px 4px; }
    .nav-zone-links a {
        font-size: 14px;
        padding: 6px 2px;
        width: calc((100% - 12px) / 4);
    }

    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .card-info h5 { font-size: 11px; }

    .dl-btn { padding: 9px 12px; font-size: 12px; }
}

@media (min-width: 769px) {
    .card-grid { grid-template-columns: repeat(4, 1fr); }
}