﻿/* ========================================
   Vibrant Gradient Theme - Video Detail
   detail.css
   ======================================== */

.tp4-detail-page {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.tp4-detail-left {
    flex: 1;
    min-width: 0;
}

.tp4-detail-right {
    width: 320px;
    flex-shrink: 0;
}

.tp4-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.tp4-detail-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--tp4-bg-glass);
    border: 1px solid var(--tp4-border);
    transition: var(--tp4-transition);
}

.tp4-detail-back:hover {
    background: rgba(102, 126, 234, 0.2);
}

.tp4-detail-back img {
    width: 20px;
    height: 20px;
    filter: invert(1);
}

.tp4-detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--tp4-text-muted);
    flex-wrap: wrap;
}

.tp4-detail-breadcrumb a {
    color: var(--tp4-text-secondary);
}

.tp4-detail-breadcrumb a:hover {
    color: var(--tp4-accent);
}

.tp4-breadcrumb-sep {
    color: var(--tp4-text-muted);
    opacity: 0.5;
}

.tp4-breadcrumb-current {
    color: var(--tp4-text-primary);
    font-weight: 500;
}

/* Video player box */
.tp4-video-box {
    position: relative;
    border-radius: var(--tp4-radius-lg);
    overflow: hidden;
    background: #000;
    margin-bottom: 16px;
}

.tp4-vd-box {
    width: 100%;
    aspect-ratio: 16/9;
}

.tp4-video-pause-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
    background: rgba(0, 0, 0, 0.7);
    pointer-events: auto;
}

/* Top banner in detail */
.tp4-top-banner {
    margin: 12px 0;
}

/* Detail article area */
.tp4-detail-article {
    background: var(--tp4-bg-card);
    border: 1px solid var(--tp4-border);
    border-radius: var(--tp4-radius-lg);
    padding: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.tp4-detail-article h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.4;
}

.tp4-detail-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 12px;
}

/* Grid swiper (ad banners in detail) */
.tp4-grid-swiper {
    margin: 12px 0;
    overflow: hidden;
    max-width: 100%;
}

.tp4-detail-article .tp4-scroll-container {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

/* Tabs */
.tp4-detail-social .nav {
    border-bottom: 1px solid var(--tp4-border);
    gap: 0;
}

.tp4-detail-social .nav-link {
    color: var(--tp4-text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 0;
    transition: var(--tp4-transition);
}

.tp4-detail-social .nav-link.active {
    color: var(--tp4-text-primary);
    border-bottom-color: var(--tp4-accent-alt);
    background: none;
}

.tp4-detail-social .nav-link:hover {
    color: var(--tp4-text-primary);
}

/* Detail intro / tags / shares */
.tp4-detail-intro {
    padding: 12px 0;
}

.tp4-vd-tags {
    margin-bottom: 12px;
}

.tp4-tags {
    color: var(--tp4-text-secondary);
    font-size: 13px;
    line-height: 2;
}

.tp4-tags a {
    display: inline-block;
    color: var(--tp4-accent);
    background: rgba(240, 147, 251, 0.1);
    padding: 2px 10px;
    border-radius: 12px;
    margin: 2px 4px 2px 0;
    font-size: 12px;
    border: 1px solid rgba(240, 147, 251, 0.2);
    transition: var(--tp4-transition);
}

.tp4-tags a:hover {
    background: rgba(240, 147, 251, 0.2);
    color: #fff;
}

.tp4-vd-shares {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.tp4-vd-shares button {
    background: var(--tp4-bg-glass);
    border: 1px solid var(--tp4-border);
    color: var(--tp4-text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--tp4-transition);
    position: relative;
}

.tp4-vd-shares button:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--tp4-accent-alt);
    color: #fff;
}

.tp4-eye2 {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tp4-eye2::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238686a0' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Phone play popup (QR) */
.tp4-phone-play {
    position: relative;
}

.tp4-phone-popup {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 12, 41, 0.95);
    border: 1px solid var(--tp4-border);
    border-radius: var(--tp4-radius);
    padding: 16px;
    display: none;
    z-index: 10;
    min-width: 200px;
    box-shadow: var(--tp4-shadow);
}

.tp4-phone-play:hover .tp4-phone-popup {
    display: block;
}

.tp4-phone-qr {
    margin: 0 auto 8px;
    text-align: center;
}

.tp4-phone-tips {
    text-align: center;
    font-size: 12px;
    color: var(--tp4-text-secondary);
}

.tp4-phone-tips h3 {
    font-size: 12px;
    margin: 4px 0 0;
}

/* Video info */
.tp4-vd-infos {
    padding: 12px 0;
    border-top: 1px solid var(--tp4-border);
    margin-top: 12px;
}

.tp4-vd-infos p {
    font-size: 13px;
    color: var(--tp4-text-secondary);
    margin: 4px 0;
    line-height: 1.6;
}

.tp4-vd-infos a {
    color: var(--tp4-accent);
}

.tp4-vd-desc {
    margin-top: 8px;
    line-height: 1.7;
}

.tp4-topic-name {
    color: var(--tp4-accent);
}

/* Text adv list */
.tp4-text-adv-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
}

.tp4-adv-item {
    display: inline-block;
    font-size: 12px;
    color: var(--tp4-accent);
    background: rgba(240, 147, 251, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(240, 147, 251, 0.15);
    transition: var(--tp4-transition);
}

.tp4-adv-item:hover {
    background: rgba(240, 147, 251, 0.15);
    color: #fff;
}

/* Double row box (mobile ad grid) */
.tp4-double-row-box {
    margin: 12px 0;
}

.tp4-top-row-box {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}

.tp4-top-row-item {
    width: 100%;
    max-width: 56px;
    margin: 0 auto;
    text-decoration: none;
    min-width: 0;
}

.tp4-top-row-item img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
}

.tp4-top-row-title {
    font-size: 10px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--tp4-text-secondary);
}

@media screen and (min-width: 768px) {
    .tp4-double-row-box { display: none; }
}

/* Right sidebar */
.tp4-detail-right h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px;
    padding-left: 12px;
    position: relative;
}

.tp4-detail-right h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: var(--tp4-gradient-primary);
    border-radius: 2px;
}

.tp4-detail-right-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tp4-detail-right-item {
    display: flex;
    gap: 10px;
    text-decoration: none;
    background: var(--tp4-bg-card);
    border: 1px solid var(--tp4-border);
    border-radius: var(--tp4-radius);
    overflow: hidden;
    transition: var(--tp4-transition);
    padding: 8px;
}

.tp4-detail-right-item:hover {
    background: var(--tp4-bg-card-hover);
    border-color: var(--tp4-border-hover);
}

.tp4-detail-right-item .tp4-item-cover {
    width: 130px;
    min-width: 130px;
    padding-top: 0;
    height: 75px;
    border-radius: var(--tp4-radius-sm);
}

.tp4-item-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--tp4-text-primary);
    line-height: 1.4;
    margin: 0;
}

/* Comments section */
.tp4-comments {
    padding: 16px 0;
}

.tp4-comments-sorts {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tp4-comments-sorts button {
    background: var(--tp4-bg-glass);
    border: 1px solid var(--tp4-border);
    color: var(--tp4-text-secondary);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--tp4-transition);
}

.tp4-comments-sorts button.active {
    background: var(--tp4-gradient-primary);
    color: #fff;
    border-color: transparent;
}

.tp4-empty-comment {
    text-align: center;
    padding: 40px 0;
    color: var(--tp4-text-muted);
}

.tp4-empty-comment img {
    width: 80px;
    opacity: 0.4;
    margin-bottom: 12px;
}

.tp4-comments-input {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.tp4-comments-input .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tp4-border);
    color: var(--tp4-text-primary);
    border-radius: var(--tp4-radius-sm);
}

.tp4-comments-input .form-control:focus {
    border-color: var(--tp4-accent-alt);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.tp4-comments-input textarea {
    min-height: 60px;
    resize: vertical;
}

.tp4-nick-input {
    position: relative;
}

.tp4-nick-input svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.tp4-nick-input input {
    padding-left: 30px;
}

.tp4-nick-count {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--tp4-text-muted);
}

.tp4-send {
    background: var(--tp4-gradient-primary);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: var(--tp4-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--tp4-transition);
    flex-shrink: 0;
}

.tp4-send.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tp4-send:hover:not(.disabled) {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Share modal */
.tp4-share-modal .modal-content {
    background: none;
    border: none;
}

.tp4-share-modal-content {
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--tp4-border);
    border-radius: var(--tp4-radius-lg);
    color: var(--tp4-text-primary);
}

.tp4-share-modal-header {
    border-bottom: 1px solid var(--tp4-border);
    padding: 16px 20px;
}

.tp4-pop-title-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tp4-pop-title-line {
    flex: 1;
    height: 1px;
    background: var(--tp4-border);
}

.tp4-kind-tips {
    width: 20px;
    height: 20px;
}

.tp4-share-modal-body {
    padding: 20px;
}

.tp4-share-content p {
    font-size: 14px;
    color: var(--tp4-text-secondary);
}

.tp4-share-content p span {
    color: var(--tp4-accent);
    font-weight: 600;
}

.tp4-share-url {
    display: block;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: var(--tp4-radius-sm);
    font-size: 12px;
    color: var(--tp4-text-muted);
    word-break: break-all;
    margin: 8px 0;
}

.tp4-cpy-box {
    margin: 8px 0;
}

.tp4-cpy-text {
    font-size: 11px;
    color: var(--tp4-text-muted);
}

.tp4-cpy-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--tp4-gradient-primary);
    border: none;
    border-radius: var(--tp4-radius-sm);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tp4-transition);
    margin-top: 12px;
}

.tp4-cpy-btn:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.tp4-close-button {
    display: block;
    margin: 12px auto;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--tp4-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: var(--tp4-text-secondary);
    font-size: 18px;
    cursor: pointer;
}

/* Empty content */
.tp4-archive-content {
    text-align: center;
    padding: 80px 20px;
    color: var(--tp4-text-muted);
    font-size: 16px;
}

/* Static archive page wrapper */
.tp4-static-archive-page {
    padding-top: 12px;
}

.tp4-static-page-wrap {
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive detail layout */
@media screen and (max-width: 824px) {
    .tp4-detail-page {
        flex-direction: column;
        gap: 16px;
    }

    .tp4-detail-left {
        width: 100%;
    }

    .tp4-detail-right {
        width: 100%;
        order: 3;
    }

    .tp4-detail-page > .tp4-top-banner:last-of-type {
        order: 4;
        width: 100%;
    }

    .tp4-detail-right-content {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .tp4-detail-right-item {
        flex-direction: column;
    }

    .tp4-detail-right-item .tp4-item-cover {
        width: 100%;
        padding-top: 56.25%;
        height: auto;
    }

    .tp4-detail-article {
        padding: 12px;
    }

    .tp4-detail-article h1 {
        font-size: 17px;
    }

    .tp4-detail-header {
        padding-left: 0;
        padding-right: 0;
        flex-wrap: wrap;
    }

    .tp4-detail-breadcrumb {
        font-size: 12px;
        min-width: 0;
        flex: 1;
    }

    .tp4-grid-swiper {
        overflow: visible;
    }

    .tp4-top-row-box {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .tp4-top-row-item {
        max-width: none;
    }

    .tp4-section-content-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .tp4-detail-social .nav {
        flex-wrap: wrap;
    }
}
