/* Video Site Template - TripAdvisor Style: White + Bright Green + Dark Green */

:root {
    --grn:        #34e0a1;
    --grn-d:      #00aa6c;
    --grn-dk:     #004f32;
    --grn-light:  #eafaf3;
    --grn-mid:    #c2f5e0;
    --txt:        #1a1a1a;
    --txt-sub:    #3d3d3d;
    --txt-dim:    #767676;
    --txt-white:  #ffffff;
    --bg:         #ffffff;
    --bg-page:    #f5f5f5;
    --bg-muted:   #f0f0f0;
    --border:     #e0e0e0;
    --border-lt:  #ececec;
    --shadow-xs:  0 1px 3px rgba(0,0,0,0.06);
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.09);
    --shadow-md:  0 4px 18px rgba(0,0,0,0.13);
    --r-xs:       6px;
    --r-sm:       10px;
    --r-md:       14px;
    --r-lg:       20px;
    --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.55;
    font-size: 14px;
    overflow-x: hidden;
}

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

.tp-hd-in {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

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

.tp-sitename {
    font-size: 22px;
    font-weight: 900;
    color: var(--grn-dk);
    letter-spacing: -0.5px;
    line-height: 1;
}

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

.tp-domain-lbl {
    font-size: 10px;
    font-weight: 800;
    color: var(--grn-d);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

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

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

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

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

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

.tp-navstrip:last-child {
    border-bottom: none;
}

.tp-navlabel {
    font-size: 13px;
    font-weight: 800;
    color: var(--grn-dk);
    white-space: nowrap;
    width: 10%;
    text-align: center;
    border-right: 1.5px solid var(--grn-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 4px;
    flex-shrink: 0;
    background: var(--grn-light);
    letter-spacing: 0.1px;
}

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

.tp-navlinks 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: 1.5px solid var(--border);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    font-size: 13px;
    font-weight: 500;
}

.tp-navlinks a:hover {
    background: var(--grn);
    color: var(--grn-dk);
    border-color: var(--grn);
    font-weight: 700;
}

.tp-navlinks a.active {
    background: var(--grn-dk);
    color: var(--txt-white);
    border-color: var(--grn-dk);
    font-weight: 800;
}

/* ===================== SEARCH ===================== */
.tp-sbox {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--r-pill);
    padding: 8px 12px 8px 20px;
    margin-bottom: 7px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
}

.tp-sbox form {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
}

.tp-sbox input[type="text"] {
    flex: 1;
    min-width: 100px;
    padding: 8px 4px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--txt);
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

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

.tp-sbox button {
    padding: 9px 20px;
    border: none;
    border-radius: var(--r-pill);
    background: var(--grn-dk);
    color: var(--txt-white);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.tp-sbox button:hover {
    background: var(--grn-d);
    transform: scale(1.03);
}

/* ===================== TAG CLOUD ===================== */
.tp-tags {
    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: 1.5px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.tp-tag {
    padding: 4px 14px;
    background: var(--grn-light);
    border-radius: var(--r-pill);
    color: var(--grn-dk);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: var(--ease);
    border: 1.5px solid var(--grn-mid);
}

.tp-tag:hover {
    background: var(--grn);
    color: var(--grn-dk);
    border-color: var(--grn);
}

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

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

.tp-sec-hd::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--grn-d);
    border-radius: 2px;
}

.tp-sec-ttl {
    font-size: 17px;
    font-weight: 900;
    margin: 0;
    color: var(--txt);
    letter-spacing: -0.3px;
}

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

.tp-sec-ttl a:hover {
    color: var(--grn-d);
}

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

.tp-grid li {
    animation: tpRise 0.4s ease backwards;
}

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

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

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

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

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

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

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

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

.tp-cap {
    padding: 6px 0 2px;
}

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

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

.tp-cap h5 a:hover {
    color: var(--grn-d);
}

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

.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 ===================== */
.tp-det-ttl {
    line-height: 1.8;
    text-align: center;
    padding: 14px 18px;
    font-size: 15px;
    margin: 10px 0;
    word-break: break-all;
    background: var(--grn-light);
    border-radius: var(--r-md);
    border: 1.5px solid var(--grn-mid);
}

.tp-det-ttl a {
    color: var(--grn-d);
    text-decoration: none;
    font-weight: 800;
    margin-right: 6px;
}

.tp-det-ttl a:hover { text-decoration: underline; }

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

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

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

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

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

.tp-dl-btn {
    display: inline-block;
    padding: 10px 26px;
    border-radius: var(--r-pill);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: var(--ease);
    border: none;
    background: var(--grn-dk);
    color: var(--txt-white);
    font-family: inherit;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(0,79,50,0.25);
}

.tp-dl-btn:hover {
    background: var(--grn-d);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,170,108,0.35);
}

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

.tp-client a {
    color: var(--grn-d);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

.tp-client a:hover {
    color: var(--grn-dk);
    text-decoration: underline;
}

/* ===================== SHARE SECTION ===================== */
.share-section {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--r-pill);
    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(--bg-muted);
    padding: 7px 14px;
    border-radius: var(--r-pill);
    border: 1.5px solid var(--border);
    overflow: hidden;
}

.share-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--grn-d);
    white-space: nowrap;
    letter-spacing: 0.4px;
    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 16px;
    border-radius: var(--r-pill);
    background: var(--grn-dk);
    color: var(--txt-white);
    border: none;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.share-copy-btn:hover {
    background: var(--grn-d);
    transform: scale(1.03);
}

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

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

.tp-pg,
.tp-pg-on {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 600;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
}

.tp-pg {
    background: var(--bg);
    color: var(--txt);
    border: 1.5px solid var(--border);
}

.tp-pg:hover {
    background: var(--grn);
    border-color: var(--grn);
    color: var(--grn-dk);
    font-weight: 800;
}

.tp-pg-on {
    background: var(--grn-dk);
    color: var(--txt-white);
    border: 1.5px solid var(--grn-dk);
    cursor: default;
    font-weight: 800;
}

/* ===================== FOOTER ===================== */
.tp-foot {
    padding: 20px 0;
    text-align: center;
    border-top: 2px solid var(--grn-mid);
    margin-top: 20px;
    background: var(--bg);
}

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

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

.tp-foot a:hover { color: var(--grn-d); }

/* ===================== FRIEND LINKS ===================== */
.tp-flink {
    padding: 9px 12px;
    background: var(--bg);
    border-radius: var(--r-md);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.tp-flink dl {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.tp-flink dd {
    display: inline-block;
    margin: 3px 2px;
}

.tp-flink a {
    color: var(--grn-d);
    text-decoration: none;
    transition: var(--ease);
    font-size: 12px;
    font-weight: 500;
    padding: 2px 5px;
    border-radius: var(--r-xs);
}

.tp-flink a:hover {
    color: var(--grn-dk);
    background: var(--grn-light);
}

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

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

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

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

    /* Mobile nav: zone 15%, links 85%, 4 per row */
    .tp-navstrip .tp-navlabel {
        width: 15%;
        font-size: 10px;
        padding: 7px 2px;
        letter-spacing: 0;
    }

    .tp-navstrip .tp-navlinks {
        width: 85%;
        font-size: 12px;
        gap: 3px;
        padding: 7px 3px;
    }

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

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

    .tp-sbox { padding: 6px 10px 6px 14px; border-radius: var(--r-lg); }
    .tp-sbox input[type="text"] { font-size: 13px; padding: 6px 4px; }
    .tp-sbox button { padding: 7px 12px; font-size: 12px; }

    .tp-tags { padding: 7px 8px; gap: 5px; }
    .tp-tag { padding: 3px 10px; font-size: 11px; }

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

    .tp-dl-row { padding: 10px 6px; gap: 8px; }
    .tp-dl-btn { padding: 9px 18px; font-size: 13px; }

    .share-section { padding: 8px 10px; margin: 8px 0; gap: 6px; border-radius: var(--r-lg); }
    .share-url-display { padding: 6px 10px; gap: 5px; }
    .share-label { font-size: 10px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 7px 10px; font-size: 11px; flex-shrink: 0; }
    .share-icon { font-size: 13px; }

    .tp-pager { gap: 4px; padding: 12px 0; }
    .tp-pg, .tp-pg-on { padding: 6px 10px; font-size: 12px; min-width: 30px; }
    .tp-foot { padding: 16px 0; margin-top: 16px; }
}

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

    .tp-navstrip .tp-navlabel { width: 15%; font-size: 10px; padding: 5px 1px; }
    .tp-navstrip .tp-navlinks { width: 85%; gap: 3px; padding: 5px 2px; }
    .tp-navstrip .tp-navlinks a { font-size: 12px; padding: 3px 1px; width: calc((100% - 9px) / 4); }

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

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