/* ================================================================
   Tube Video Aggregator — Frontend CSS  v1.0.2
   ================================================================ */

/* ── Grid ─────────────────────────────────────────────────────── */
.tva-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin: 0 0 32px;
}

.tva-card {
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.tva-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,.55);
}

.tva-thumb-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #0a0a0a;
}
.tva-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.tva-card:hover .tva-thumb-wrap img { transform: scale(1.06); }

.tva-duration {
    position: absolute;
    bottom: 6px;
    right: 8px;
    background: rgba(0,0,0,.82);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: .4px;
    pointer-events: none;
}
.tva-source {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .8px;
    pointer-events: none;
}
.tva-source--pornhub  { background: #ff9000; color: #000; }
.tva-source--xhamster { background: #f90;    color: #000; }
.tva-source--redtube  { background: #e00;    color: #fff; }

.tva-card-info {
    padding: 10px 12px 14px;
}
.tva-card-info h3 {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tva-card-info h3 a {
    color: #eee;
    text-decoration: none;
}
.tva-card-info h3 a:hover { color: #f90; }

.tva-views {
    font-size: 12px;
    color: #777;
}

/* ── Category Pill Filter Bar ─────────────────────────────────── */
/* High-specificity block so theme styles don't override */
div.tva-cat-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 0 22px !important;
    padding: 0 !important;
    list-style: none !important;
    align-items: center !important;
}

div.tva-cat-pills a.tva-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 7px 16px !important;
    border-radius: 999px !important;
    background: #1e1e1e !important;
    color: #bbb !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    border: 1px solid #333 !important;
    transition: background .15s, color .15s, border-color .15s !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

div.tva-cat-pills a.tva-pill:hover {
    background: #2a2a2a !important;
    color: #f90 !important;
    border-color: #f90 !important;
}

div.tva-cat-pills a.tva-pill.tva-pill--active {
    background: #ff9500 !important;
    color: #000 !important;
    border-color: #ff9500 !important;
    font-weight: 700 !important;
}

div.tva-cat-pills a.tva-pill.tva-pill--active:hover {
    background: #e08400 !important;
    border-color: #e08400 !important;
}

.tva-pill-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    background: rgba(255,255,255,.12) !important;
    padding: 1px 7px !important;
    border-radius: 999px !important;
    line-height: 1.4 !important;
    min-width: 20px !important;
}

div.tva-cat-pills a.tva-pill.tva-pill--active .tva-pill-count {
    background: rgba(0,0,0,.18) !important;
}

/* ── Ad slots ─────────────────────────────────────────────────── */
.tva-ad-before,
.tva-ad-after   { margin: 16px 0; text-align: center; }
.tva-ad-in-grid { grid-column: 1 / -1; text-align: center; padding: 12px 0; }

/* ── Single video page ────────────────────────────────────────── */
.tva-embed-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
    margin-bottom: 20px;
}
.tva-embed-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

.tva-description {
    color: #ccc;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.tva-tags-block {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tva-tag {
    background: #222;
    color: #aaa;
    font-size: 12px;
    padding: 4px 11px;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid #333;
    transition: background .15s;
}
.tva-tag:hover { background: #f90; color: #000; border-color: #f90; }

/* ── Related videos ───────────────────────────────────────────── */
.tva-related { margin-top: 36px; }
.tva-related h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #222;
    color: #ddd;
}

/* ── Misc ─────────────────────────────────────────────────────── */
.tva-no-results {
    color: #666;
    text-align: center;
    padding: 40px 0;
    font-size: 15px;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 600px) {
    .tva-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .tva-card-info h3 { font-size: 12px; }
    div.tva-cat-pills a.tva-pill {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
    div.tva-cat-pills { gap: 6px !important; }
}
