/* Video Site — CleanBrowsing Orange & Light Grey Theme */

:root {
    --bg:        #f0f4f5;
    --bg2:       #e8ecee;
    --bg3:       #f7f9fa;
    --white:     #ffffff;
    --orange:    #d4622a;
    --orange-dk: #b8511f;
    --orange-lt: #fdf1eb;
    --orange-mid: rgba(212, 98, 42, 0.12);
    --ink:       #111827;
    --ink-sub:   #4b5563;
    --ink-dim:   #9ca3af;
    --border:    #dde3e6;
    --border-lt: #e8ecee;
    --shadow:    rgba(17, 24, 39, 0.06);
    --shadow-lg: rgba(17, 24, 39, 0.12);
    --shadow-xl: rgba(17, 24, 39, 0.18);
    --r-xl:      16px;
    --r:         8px;
    --r-sm:      6px;
    --r-xs:      4px;
    --ease:      all 0.2s cubic-bezier(.4,0,.2,1);
}

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

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

/* ── Header ── */
.top-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0.55rem 0;
    box-shadow: 0 1px 8px var(--shadow);
}

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

.brand-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

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

.brand-name {
    font-size: 26px;
    font-weight: 900;
    color: var(--ink);
    letter-spacing: -0.4px;
    line-height: 1;
    transition: var(--ease);
}

.brand-href:hover .brand-name { color: var(--orange); }

.domain-flag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px 5px 8px;
    background: var(--orange);
    border-radius: var(--r-sm);
    flex-shrink: 0;
}

.df-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,.8);
    letter-spacing: .5px;
    white-space: nowrap;
    background: rgba(0,0,0,.15);
    padding: 1px 6px;
    border-radius: var(--r-xs);
}

.df-url {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    letter-spacing: -.1px;
}

/* ── Layout ── */
.page-body {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.seg { padding: 8px 0; }

/* ── Navigation ── */
.nav-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 1px 6px var(--shadow);
}

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

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

.tier-label {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--orange);
    width: 10%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 5px;
    flex-shrink: 0;
    white-space: nowrap;
}

.tier-links {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 10px;
    align-items: center;
    background: var(--bg3);
}

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

.tier-links a:hover {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange-dk);
    box-shadow: 0 2px 8px var(--shadow-lg);
}

.tier-links a.active {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange-dk);
    font-weight: 600;
    box-shadow: 0 2px 8px var(--shadow-lg);
}

/* ── Search ── */
.search-wrap {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 6px var(--shadow);
}

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

.search-wrap input[type="text"] {
    flex: 1;
    min-width: 140px;
    padding: 9px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--bg3);
    color: var(--ink);
    font-size: 13px;
    outline: none;
    transition: var(--ease);
}

.search-wrap input[type="text"]:focus {
    border-color: var(--orange);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--orange-mid);
}

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

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

.search-wrap button:hover {
    background: var(--orange-dk);
    box-shadow: 0 3px 10px var(--shadow-lg);
}

/* ── Keyword Tags ── */
.hot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 10px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 8px;
    box-shadow: 0 1px 6px var(--shadow);
}

.ht-item {
    padding: 4px 12px;
    background: var(--bg3);
    border-radius: var(--r-xs);
    color: var(--ink-sub);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: var(--ease);
    border: 1px solid var(--border);
}

.ht-item:hover {
    background: var(--orange-lt);
    color: var(--orange);
    border-color: var(--orange);
}

/* ── Content Section ── */
.content-seg { margin-bottom: 12px; }

.seg-head {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.seg-head::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 40px; height: 2px;
    background: var(--orange);
}

.seg-ttl {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    color: var(--ink);
    letter-spacing: -.2px;
}

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

.seg-ttl a:hover { color: var(--orange); }

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

.media-grid li { position: relative; }

.media-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--r);
    aspect-ratio: 600 / 350;
    background: var(--bg2);
    border: 1px solid var(--border);
    transition: var(--ease);
}

.media-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .38s ease;
}

.media-item:hover {
    border-color: var(--orange);
    box-shadow: 0 6px 20px var(--shadow-xl);
    transform: translateY(-2px);
}

.media-item:hover img { transform: scale(1.07); }

.media-item::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(17,24,39,.55) 0%, transparent 60%);
    opacity: 0;
    transition: opacity .3s ease;
}

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

.media-caption { padding: 7px 0; }

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

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

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

/* ── Video Player ── */
.video-container {
    width: 100%; height: 620px; max-height: 620px;
    margin-bottom: 14px;
    background: #000;
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: 0 6px 28px var(--shadow-xl);
    position: relative;
    border: 1px solid var(--border);
}

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

.MacPlayer {
    background: #000;
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 24px var(--shadow-xl);
}

/* ── Torrent Capture ── */
.torrent-capture-grid {}

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

.torrent-capture-grid img:hover,
.torrent-capture-grid .img_item img:hover {
    box-shadow: none; transform: none;
}

.torrent-capture-grid .img_item { width: 100%; }

/* ── Download Buttons ── */
.action-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 14px 12px;
    background: var(--white);
    border-radius: var(--r);
    margin: 10px 0;
    border: 1px solid var(--border);
    box-shadow: 0 1px 6px var(--shadow);
}

.btn-action {
    display: inline-block;
    padding: 10px 22px;
    background: var(--orange);
    color: #fff;
    text-decoration: none;
    border-radius: var(--r-sm);
    font-weight: 700;
    font-size: 14px;
    transition: var(--ease);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px var(--shadow-lg);
}

.btn-action:hover {
    background: var(--orange-dk);
    box-shadow: 0 5px 16px var(--shadow-xl);
    transform: translateY(-1px);
}

/* ── Share Panel ── */
.link-row {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 12px 14px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 6px var(--shadow);
}

.share-url-display {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.share-label {
    font-weight: 700;
    font-size: 11px;
    color: var(--orange);
    white-space: nowrap;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding-right: 8px;
}

.share-url {
    font-size: 12px;
    color: var(--ink-sub);
    word-break: break-all;
    flex: 1;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-copy-btn {
    padding: 10px 18px;
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px var(--shadow-lg);
}

.share-copy-btn:hover {
    background: var(--orange-dk);
    box-shadow: 0 4px 14px var(--shadow-xl);
    transform: translateY(-1px);
}

.share-copy-btn:active { transform: scale(.97); }
.share-icon { font-size: 15px; }

/* ── Pagination ── */
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 14px 0;
}

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

.pager-lnk {
    background: var(--white);
    color: var(--ink-sub);
    border: 1px solid var(--border);
}

.pager-lnk:hover {
    background: var(--orange-lt);
    border-color: var(--orange);
    color: var(--orange);
}

.pager-now {
    background: var(--orange);
    color: #fff;
    border: 1px solid var(--orange-dk);
    cursor: default;
    box-shadow: 0 2px 8px var(--shadow-lg);
}

/* ── Footer ── */
.foot-bar {
    padding: 18px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 16px;
    background: var(--white);
}

.foot-bar p { margin: 5px 0; color: var(--ink-dim); font-size: 12px; }

.foot-bar a {
    color: var(--ink-dim);
    text-decoration: none;
    transition: var(--ease);
}

.foot-bar a:hover { color: var(--orange); }

/* ── Friend Links ── */
.flinks {
    padding: 10px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: 0 1px 6px var(--shadow);
}

.flinks dl { margin: 0; }
.flinks dd { display: inline-block; margin: 3px 5px; }

.flinks a {
    color: var(--ink-sub);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--ease);
}

.flinks a:hover { color: var(--orange); }

/* ── Utilities ── */
.clearfix::after { content: ""; display: table; clear: both; }

.m-hide { display: block; }
.d-hide { display: block; }

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

/* ── Responsive ── */
@media (max-width: 768px) {
    .page-body { padding: 0 8px; }
    .top-bar { padding: .45rem 0; }
    .brand-group { gap: 10px; flex-wrap: nowrap; }
    .brand-name { font-size: 20px; }
    .domain-flag { padding: 4px 10px 4px 7px; gap: 5px; }
    .df-label { font-size: 9px; }
    .df-url { font-size: 14px; }
    .seg { padding: 6px 0; }

    /* nav: label 15% / links 85%, 2 rows of 4 */
    .nav-tier { display: flex; align-items: stretch; }
    .tier-label { width: 15%; font-size: 10px; padding: 6px 2px; word-break: keep-all; }
    .tier-links { width: 85%; gap: 3px; padding: 5px 4px; }
    .tier-links a {
        font-size: 12px; padding: 4px 2px;
        width: calc((100% - 9px) / 4);
        flex-shrink: 0; flex-grow: 0;
    }

    .media-grid { grid-template-columns: repeat(2,1fr); gap: 9px; }
    .seg-ttl { font-size: 16px; }
    .media-caption h5 { font-size: 12px; }

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

    .hot-tags { padding: 8px 10px; gap: 5px; }
    .ht-item { padding: 3px 10px; font-size: 11px; }

    .btn-action { padding: 9px 15px; font-size: 12px; }
    .action-strip { padding: 10px 8px; gap: 7px; }

    .link-row { padding: 9px 10px; gap: 7px; flex-wrap: nowrap; }
    .share-url-display { padding: 7px 10px; gap: 6px; flex: 1; min-width: 0; }
    .share-label { font-size: 10px; padding-right: 6px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 8px 10px; font-size: 11px; flex-shrink: 0; }

    .pager { padding: 10px 0; gap: 4px; }
    .pager-lnk, .pager-now { padding: 5px 11px; font-size: 12px; min-width: 32px; }

    .content-seg { margin-bottom: 8px; }
}

@media (max-width: 480px) {
    .brand-name { font-size: 18px; }
    .df-label { font-size: 9px; }
    .df-url { font-size: 13px; }
    .tier-label { width: 15%; font-size: 10px; padding: 5px 1px; }
    .tier-links { width: 85%; gap: 3px; padding: 4px 3px; }
    .tier-links a { font-size: 12px; padding: 3px 1px; width: calc((100% - 9px) / 4); }
    .media-grid { grid-template-columns: repeat(2,1fr); gap: 8px; }
    .video-container { height: 56.25vw; max-height: 280px; margin-bottom: 8px; }
    .search-wrap input[type="text"] { min-width: 70px; padding: 7px 10px; font-size: 12px; }
    .search-wrap button { padding: 7px 10px; font-size: 11px; }
    .action-strip { padding: 8px 5px; gap: 5px; }
    .btn-action { padding: 8px 11px; font-size: 11px; }
    .link-row { padding: 7px 8px; gap: 5px; }
}

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