/* Video Site Template - Petit Futé Style: White + Teal + Coral-Red */

:root {
    --teal:       #1ab5b0;
    --teal-d:     #149e99;
    --teal-light: #e8f9f8;
    --coral:      #e8273a;
    --coral-h:    #c41e2f;
    --coral-soft: #fff0f1;
    --gold:       #f5a623;
    --bg:         #ffffff;
    --bg-page:    #f7f7f7;
    --bg-card:    #ffffff;
    --bg-muted:   #f2f2f2;
    --border:     #e0e0e0;
    --border-lt:  #efefef;
    --txt:        #222222;
    --txt-sub:    #555555;
    --txt-dim:    #999999;
    --txt-white:  #ffffff;
    --shadow-xs:  0 1px 3px rgba(0,0,0,0.07);
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.1);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.13);
    --r-xs:       4px;
    --r-sm:       8px;
    --r-md:       12px;
    --r-lg:       18px;
    --r-pill:     999px;
    --ease:       all 0.2s ease;
    --max-w:      1080px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }

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

/* ===================== HEADER ===================== */
.ft-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    box-shadow: var(--shadow-xs);
}

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

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

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

.ft-sitename {
    font-size: 22px;
    font-weight: 900;
    color: var(--coral);
    letter-spacing: -0.3px;
    line-height: 1;
}

.ft-domain {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: var(--teal-light);
    border: 1px solid var(--teal);
    border-radius: var(--r-pill);
}

.ft-domain-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--teal-d);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.ft-domain-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--teal-d);
    font-family: 'Courier New', monospace;
}

/* ===================== LAYOUT ===================== */
.ft-wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 12px;
}

.ft-row {
    padding: 7px 0;
}

/* ===================== NAV BLOCK ===================== */
.ft-navbox {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 7px;
    box-shadow: var(--shadow-xs);
}

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

.ft-navline:last-child {
    border-bottom: none;
}

.ft-navzone {
    font-size: 13px;
    font-weight: 700;
    color: var(--txt-white);
    white-space: nowrap;
    width: 10%;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 4px;
    flex-shrink: 0;
    background: var(--teal);
    letter-spacing: 0.1px;
}

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

.ft-navcats a {
    display: inline-block;
    color: var(--txt-sub);
    text-decoration: none;
    padding: 4px 4px;
    border-radius: var(--r-xs);
    transition: var(--ease);
    background: var(--bg-muted);
    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;
}

.ft-navcats a:hover {
    background: var(--teal);
    color: var(--txt-white);
    border-color: var(--teal);
    box-shadow: 0 2px 6px rgba(26,181,176,0.3);
}

.ft-navcats a.active {
    background: var(--coral);
    color: var(--txt-white);
    border-color: var(--coral);
    font-weight: 700;
}

/* ===================== SEARCH ===================== */
.ft-search {
    background: var(--teal);
    border-radius: var(--r-md);
    padding: 10px 12px;
    margin-bottom: 7px;
    box-shadow: var(--shadow-sm);
}

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

.ft-search input[type="text"] {
    flex: 1;
    min-width: 100px;
    padding: 8px 14px;
    border: none;
    border-radius: var(--r-pill);
    background: var(--bg);
    color: var(--txt);
    font-size: 13px;
    transition: var(--ease);
    outline: none;
    font-family: inherit;
}

.ft-search input[type="text"]:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.4);
}

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

.ft-search button {
    padding: 8px 16px;
    border: 2px solid var(--txt-white);
    border-radius: var(--r-pill);
    background: transparent;
    color: var(--txt-white);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.ft-search button:hover {
    background: var(--txt-white);
    color: var(--teal-d);
}

/* ===================== TAG CLOUD ===================== */
.ft-tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 9px 10px;
    background: var(--bg);
    border-radius: var(--r-md);
    margin-bottom: 7px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.ft-tag {
    padding: 4px 12px;
    background: var(--bg-muted);
    border-radius: var(--r-pill);
    color: var(--teal-d);
    text-decoration: none;
    font-size: 12px;
    transition: var(--ease);
    border: 1px solid var(--border);
    font-weight: 500;
}

.ft-tag:hover {
    background: var(--teal);
    color: var(--txt-white);
    border-color: var(--teal);
}

/* ===================== SECTION BLOCKS ===================== */
.ft-section {
    margin-bottom: 14px;
}

.ft-sec-hd {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-lt);
    position: relative;
}

.ft-sec-hd::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 44px;
    height: 2px;
    background: var(--teal);
    border-radius: 2px;
}

.ft-sec-ttl {
    font-size: 17px;
    font-weight: 800;
    margin: 0;
    color: var(--txt);
    letter-spacing: -0.2px;
}

.ft-sec-ttl a {
    color: var(--txt);
    text-decoration: none;
    transition: var(--ease);
}

.ft-sec-ttl a:hover {
    color: var(--coral);
}

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

.ft-grid li {
    animation: ftFadeUp 0.4s ease backwards;
}

.ft-grid li:nth-child(1) { animation-delay: 0.03s; }
.ft-grid li:nth-child(2) { animation-delay: 0.06s; }
.ft-grid li:nth-child(3) { animation-delay: 0.09s; }
.ft-grid li:nth-child(4) { animation-delay: 0.12s; }
.ft-grid li:nth-child(5) { animation-delay: 0.15s; }
.ft-grid li:nth-child(6) { animation-delay: 0.18s; }
.ft-grid li:nth-child(7) { animation-delay: 0.21s; }
.ft-grid li:nth-child(8) { animation-delay: 0.24s; }

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

.ft-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--r-md);
    aspect-ratio: 600 / 350;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

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

.ft-thumb:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--teal);
}

.ft-thumb:hover img {
    transform: scale(1.07);
}

.ft-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

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

.ft-caption {
    padding: 6px 0 2px;
}

.ft-caption h5 {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ft-caption h5 a {
    color: var(--txt-sub);
    text-decoration: none;
    transition: var(--ease);
}

.ft-caption h5 a:hover {
    color: var(--coral);
}

/* ===================== VIDEO PLAYER ===================== */
.ft-player {
    background: var(--bg);
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    box-shadow: var(--shadow-xs);
}

.video-container {
    position: relative;
    width: 100%;
    height: 480px;
    background: #000;
    overflow: hidden;
}

.video-container iframe,
.video-container video,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* ===================== DETAIL INFO ===================== */
.ft-detail-ttl {
    line-height: 1.8;
    text-align: center;
    padding: 15px 18px;
    font-size: 16px;
    margin: 10px 0;
    word-break: break-all;
    background: var(--coral-soft);
    border-radius: var(--r-md);
    border: 1px solid rgba(232,39,58,0.15);
}

.ft-detail-ttl a {
    color: var(--coral);
    text-decoration: none;
    font-weight: 700;
    margin-right: 6px;
}

.ft-detail-ttl a:hover { text-decoration: underline; }

.ft-detail-meta {
    font-size: 14px;
    line-height: 1.9;
    padding: 18px 20px;
    background: var(--bg);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    margin: 10px 0;
    box-shadow: var(--shadow-xs);
}

/* ===================== TORRENT CAPTURES ===================== */
.ft-preview {
    margin-top: 12px;
}

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

.ft-preview picture img,
.ft-preview img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--r-xs);
}

/* ===================== DOWNLOAD BUTTONS ===================== */
.ft-dl-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    padding: 14px 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.ft-dl-btn {
    display: inline-block;
    padding: 9px 24px;
    border-radius: var(--r-pill);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--ease);
    border: none;
    background: var(--teal);
    color: var(--txt-white);
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(26,181,176,0.3);
}

.ft-dl-btn:hover {
    background: var(--coral);
    box-shadow: 0 4px 14px rgba(232,39,58,0.3);
    transform: translateY(-1px);
}

/* ===================== CLIENT LINKS ===================== */
.ft-client {
    text-align: center;
    padding: 10px 16px;
}

.ft-client a {
    color: var(--teal-d);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.ft-client a:hover {
    color: var(--coral);
    text-decoration: underline;
}

/* ===================== SHARE SECTION ===================== */
.share-section {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 13px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin: 10px 0;
    flex-wrap: nowrap;
    box-shadow: var(--shadow-xs);
}

.share-url-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    background: var(--teal-light);
    padding: 7px 12px;
    border-radius: var(--r-pill);
    border: 1px solid var(--teal);
    overflow: hidden;
}

.share-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--teal-d);
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

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

.share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: var(--r-pill);
    background: var(--teal);
    color: var(--txt-white);
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.share-copy-btn:hover {
    background: var(--coral);
}

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

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

.ft-pg-a,
.ft-pg-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 13px;
    border-radius: var(--r-pill);
    font-size: 13px;
    transition: var(--ease);
    min-width: 34px;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
}

.ft-pg-a {
    background: var(--bg);
    color: var(--txt);
    border: 1px solid var(--border);
}

.ft-pg-a:hover {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--txt-white);
}

.ft-pg-cur {
    background: var(--coral);
    color: var(--txt-white);
    border: 1px solid var(--coral);
    cursor: default;
    font-weight: 700;
}

/* ===================== FOOTER ===================== */
.ft-footer {
    padding: 20px 0;
    text-align: center;
    border-top: 2px solid var(--teal);
    margin-top: 20px;
    background: var(--bg);
}

.ft-footer p {
    margin: 4px 0;
    color: var(--txt-dim);
    font-size: 12px;
}

.ft-footer a {
    color: var(--txt-dim);
    text-decoration: none;
    transition: var(--ease);
}

.ft-footer a:hover { color: var(--teal-d); }

/* ===================== FRIEND LINKS ===================== */
.ft-links {
    padding: 9px 10px;
    background: var(--bg);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.ft-links dl {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.ft-links dd {
    display: inline-block;
    margin: 3px 2px;
}

.ft-links a {
    color: var(--teal-d);
    text-decoration: none;
    transition: var(--ease);
    font-size: 12px;
    padding: 1px 5px;
    border-radius: var(--r-xs);
}

.ft-links a:hover {
    color: var(--coral);
    background: var(--coral-soft);
}

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

/* ===================== VISIBILITY ===================== */
.show-pc  { display: block; }
.show-mob { display: block; }

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

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .ft-wrap { padding: 0 8px; }
    .ft-header { padding: 0.4rem 0; }
    .ft-brand { gap: 9px; }
    .ft-sitename { font-size: 18px; }
    .ft-domain { padding: 4px 10px; gap: 6px; }
    .ft-domain-tag { font-size: 9px; }
    .ft-domain-val { font-size: 11px; }
    .ft-row { padding: 5px 0; }

    /* Mobile nav: zone 15%, cats 85%, 4 per row */
    .ft-navline .ft-navzone {
        width: 15%;
        font-size: 10px;
        padding: 7px 2px;
        letter-spacing: 0;
    }

    .ft-navline .ft-navcats {
        width: 85%;
        font-size: 12px;
        gap: 3px;
        padding: 7px 3px;
    }

    .ft-navline .ft-navcats a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 9px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

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

    .ft-search { padding: 8px 9px; }
    .ft-search form { gap: 5px; }
    .ft-search input[type="text"] { min-width: 70px; padding: 7px 10px; font-size: 12px; }
    .ft-search button { padding: 7px 10px; font-size: 12px; }

    .ft-tagcloud { padding: 8px 9px; gap: 5px; }
    .ft-tag { padding: 3px 9px; font-size: 11px; }

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

    .ft-dl-bar { padding: 10px 6px; gap: 8px; }
    .ft-dl-btn { padding: 8px 16px; font-size: 13px; }

    .share-section { padding: 9px 10px; margin: 8px 0; gap: 6px; }
    .share-url-display { padding: 6px 10px; gap: 5px; }
    .share-label { font-size: 10px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 6px 10px; font-size: 11px; flex-shrink: 0; }
    .share-icon { font-size: 13px; }

    .ft-pager { gap: 4px; padding: 12px 0; }
    .ft-pg-a, .ft-pg-cur { padding: 5px 10px; font-size: 12px; min-width: 28px; }
    .ft-footer { padding: 16px 0; margin-top: 16px; }
}

@media (max-width: 480px) {
    .ft-sitename { font-size: 16px; }
    .ft-domain-tag { font-size: 8px; }
    .ft-domain-val { font-size: 10px; }

    .ft-navline .ft-navzone { width: 15%; font-size: 10px; padding: 5px 1px; }
    .ft-navline .ft-navcats { width: 85%; gap: 3px; padding: 5px 2px; }
    .ft-navline .ft-navcats a { font-size: 12px; padding: 3px 1px; width: calc((100% - 9px) / 4); }

    .ft-caption h5 { font-size: 12px; }
    .ft-sec-ttl { font-size: 13px; }
    .video-container { height: 56.25vw; max-height: 260px; }
    .ft-dl-btn { padding: 7px 13px; font-size: 12px; }
    .share-section { padding: 7px 8px; }
    .share-url-display { padding: 5px 8px; }
    .share-copy-btn { padding: 5px 8px; font-size: 11px; }
}

/* ===================== LAZY IMG ===================== */
img[data-original] { background: var(--bg-muted); }
