/* ================================================================
   NeTube V2 — Shared Design System
   ================================================================ */

:root {
    --v2-accent:      #0ea5e9;
    --v2-accent-dark: #0284c7;
    --v2-accent-glow: rgba(14,165,233,0.3);
    --v2-gap:         24px;
    --v2-radius:      12px;
}

/* ── Layout ── */
.yt-content { padding: 20px 30px; }
@media (max-width: 768px) { .yt-content { padding: 14px; } }

/* ── Section header ── */
.v2-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.25rem;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--border-light);
    position: relative;
    flex-wrap: wrap;
}
.v2-section-header::after {
    content: '';
    position: absolute;
    bottom: -1.5px; right: 0;
    width: 60px; height: 1.5px;
    background: var(--v2-accent);
    border-radius: 2px;
}
.v2-section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.v2-section-title i { color: var(--v2-accent); }
.v2-section-spacer  { flex: 1; }

/* ── "See all" pill ── */
.v2-see-all {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--v2-accent);
    border: 1.5px solid rgba(14,165,233,0.4);
    padding: 4px 13px;
    border-radius: 20px;
    transition: all 0.18s ease;
    white-space: nowrap;
    background: rgba(14,165,233,0.05);
    text-decoration: none;
}
.v2-see-all:hover {
    background: var(--v2-accent);
    color: #fff !important;
    border-color: var(--v2-accent);
    box-shadow: 0 2px 10px var(--v2-accent-glow);
}

/* ── Back link ── */
.v2-back-link {
    color: var(--text-muted);
    font-size: 0.86rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 1.25rem;
    transition: color 0.15s;
}
.v2-back-link:hover { color: var(--v2-accent); }

/* ── Sort / filter pills ── */
.filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.filter-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}
.sort-btn {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    border: 1.5px solid var(--border-light) !important;
    padding: 5px 13px !important;
    border-radius: 20px !important;
    transition: all 0.18s ease !important;
    white-space: nowrap;
    background: var(--bg-card) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.sort-btn:hover {
    border-color: rgba(14,165,233,0.4) !important;
    color: var(--v2-accent) !important;
    background: rgba(14,165,233,0.05) !important;
}
.sort-btn.active {
    background: var(--v2-accent) !important;
    color: #fff !important;
    border-color: var(--v2-accent) !important;
    box-shadow: 0 2px 10px var(--v2-accent-glow) !important;
}

/* ================================================================
   VIDEO GRID V2
   ================================================================ */
.v2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--v2-gap);
}
@media (max-width: 768px) { .v2-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 440px)  { .v2-grid { grid-template-columns: 1fr; } }

/* ================================================================
   VIDEO CARD V2
   ================================================================ */
.v2-card {
    background: var(--bg-card);
    border-radius: var(--v2-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    border: 1px solid var(--border-light);
    animation: v2CardIn 0.3s ease both;
}
.v2-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: rgba(14,165,233,0.3);
}
@keyframes v2CardIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Thumbnail ── */
.v2-thumb {
    position: relative;
    width: 100%; height: 200px;
    overflow: hidden;
    background: #0d1117;
    flex-shrink: 0;
}
@media (max-width: 440px) { .v2-thumb { height: 185px; } }
.v2-thumb > a.v2-thumb-link { display: block; width: 100%; height: 100%; }
.v2-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
    display: block;
}
.v2-card:hover .v2-thumb img { transform: scale(1.08); }

/* Overlay */
.v2-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.22s ease;
    pointer-events: none; z-index: 2;
}
.v2-card:hover .v2-overlay { background: rgba(0,0,0,0.44); }

/* Play icon */
.v2-play-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--v2-accent);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.2rem; padding-right: 2px;
    opacity: 0; transform: scale(0.7);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 6px 22px var(--v2-accent-glow);
}
.v2-card:hover .v2-play-icon { opacity: 1; transform: scale(1); }

/* Duration badge */
.v2-duration {
    position: absolute; bottom: 8px; left: 8px;
    background: rgba(0,0,0,0.82); color: #fff;
    padding: 2px 7px; border-radius: 5px;
    font-size: 0.73rem; font-weight: 700;
    z-index: 3; pointer-events: none; line-height: 1.5;
}

/* Mini-play button */
.v2-mini-play {
    position: absolute; bottom: 8px; right: 40px;
    background: rgba(0,0,0,0.65); border: none; border-radius: 6px;
    width: 30px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.85); font-size: 0.78rem;
    cursor: pointer; opacity: 0;
    transition: opacity 0.2s ease, background 0.15s ease; z-index: 4;
}
.v2-card:hover .v2-mini-play { opacity: 1; }
.v2-mini-play:hover { background: var(--v2-accent); color: #fff; }

/* Category badge */
.v2-cat-badge {
    position: absolute; top: 8px; right: 8px;
    font-size: 0.6rem; font-weight: 700;
    padding: 3px 8px; border-radius: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap; z-index: 3; pointer-events: none;
    letter-spacing: 0.2px;
}

/* Status badges */
.v2-badge {
    position: absolute; top: 8px; left: 8px;
    font-size: 0.6rem; font-weight: 800;
    padding: 3px 8px; border-radius: 6px;
    z-index: 4; letter-spacing: 0.4px; pointer-events: none;
    text-transform: uppercase; line-height: 1.5;
}
.v2-badge-new       { background: var(--v2-accent); color: #fff; box-shadow: 0 2px 8px var(--v2-accent-glow); }
.v2-badge-trending  { background: #ff5722;           color: #fff; box-shadow: 0 2px 8px rgba(255,87,34,0.4); }
.v2-badge-top-rated { background: #f59e0b;           color: #fff; box-shadow: 0 2px 8px rgba(245,158,11,0.4); }

/* Fav button */
.v2-fav-btn {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.62); border: none; border-radius: 50%;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.8); font-size: 0.9rem;
    cursor: pointer; opacity: 0;
    transition: opacity 0.2s ease, background 0.15s ease, color 0.15s ease; z-index: 4;
}
.v2-card:hover .v2-fav-btn  { opacity: 1; }
.v2-fav-btn:hover            { background: rgba(245,158,11,0.85); color: #fff; }
.v2-fav-btn.active           { color: #f59e0b; opacity: 1; }
.v2-fav-btn.active:hover     { background: rgba(245,158,11,0.85); color: #fff; }

/* ── Info row ── */
.v2-info { padding: 10px 12px 13px; display: flex; gap: 9px; align-items: flex-start; }

.v2-avatar {
    width: 33px; min-width: 33px; height: 33px;
    border-radius: 50%;
    border: 2px solid var(--v2-accent);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.8rem; font-weight: 700;
    overflow: hidden; flex-shrink: 0;
    background: linear-gradient(135deg, var(--v2-accent), var(--v2-accent-dark));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}
.v2-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v2-avatar:hover { transform: translateY(-2px); box-shadow: 0 4px 12px var(--v2-accent-glow); }

.v2-text { flex: 1; min-width: 0; }

.v2-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.93rem; font-weight: 700; line-height: 1.35;
    color: var(--text); margin-bottom: 3px; transition: color 0.15s;
    text-decoration: none;
}
.v2-title:hover { color: var(--v2-accent); }

.v2-channel-name {
    font-size: 0.76rem; color: var(--text-muted);
    font-weight: 500; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

.v2-meta {
    display: flex; align-items: center; gap: 4px;
    font-size: 0.72rem; color: var(--text-secondary);
    margin-top: 2px; flex-wrap: wrap;
}
.v2-meta-dot { opacity: 0.5; }
