/*
Theme Name: TrVids
Theme URI: https://example.com/trvids
Author: TrVids Team
Author URI: https://example.com
Description: A dark, modern video platform WordPress theme with grid thumbnails, category navigation, and full video browsing features.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trvids
Tags: dark, video, streaming, custom-menu, featured-images, post-thumbnails, full-width-template
*/

/* =============================================
   CSS RESET & ROOT VARIABLES
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg:           #1a1a1a;
    --color-surface:      #242424;
    --color-surface-2:    #2e2e2e;
    --color-border:       #383838;
    --color-accent:       #f90;
    --color-accent-dark:  #d4820a;
    --color-text:         #e5e5e5;
    --color-text-muted:   #999;
    --color-text-dark:    #666;
    --color-white:        #fff;
    --color-black:        #000;
    --color-danger:       #e53e3e;
    --color-success:      #38a169;

    --font-main:  'Roboto', 'Segoe UI', Arial, sans-serif;
    --font-size-xs:   0.75rem;
    --font-size-sm:   0.85rem;
    --font-size-base: 1rem;
    --font-size-md:   1.1rem;
    --font-size-lg:   1.3rem;
    --font-size-xl:   1.6rem;

    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  12px;
    --radius-full: 999px;

    --shadow-sm:  0 1px 4px rgba(0,0,0,.4);
    --shadow-md:  0 4px 16px rgba(0,0,0,.6);
    --shadow-lg:  0 8px 32px rgba(0,0,0,.8);

    --header-h:   56px;
    --sidebar-w:  240px;
    --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-accent); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* =============================================
   UTILITY CLASSES
   ============================================= */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); border: 0;
}
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.badge--accent   { background: var(--color-accent); color: var(--color-black); }
.badge--hd       { background: #2563eb; color: #fff; }
.badge--new      { background: var(--color-danger); color: #fff; }
.badge--top      { background: #7c3aed; color: #fff; }

.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: background var(--transition), transform var(--transition);
}
.btn:active { transform: scale(.97); }
.btn--accent  { background: var(--color-accent); color: #000; }
.btn--accent:hover { background: var(--color-accent-dark); color: #000; }
.btn--outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn--outline:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn--ghost   { background: var(--color-surface-2); color: var(--color-text); }
.btn--ghost:hover { background: var(--color-border); }
.btn--sm { padding: 5px 12px; font-size: var(--font-size-xs); }
.btn--lg { padding: 12px 28px; font-size: var(--font-size-md); }

/* =============================================
   HEADER
   ============================================= */
#site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-h);
    background: #111;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
}

#site-header .container {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

/* Hamburger */
.header__menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.header__menu-toggle:hover { background: var(--color-surface-2); }
.header__menu-toggle span {
    width: 20px; height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

/* Logo */
.header__logo a {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -.02em;
    white-space: nowrap;
}
.header__logo .logo-word-1 { color: var(--color-white); }
.header__logo .logo-word-2 {
    background: var(--color-accent);
    color: #000;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

/* Search */
.header__search {
    flex: 1;
    max-width: 600px;
    display: flex;
}
.header__search form {
    display: flex;
    width: 100%;
    height: 36px;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}
.header__search input {
    flex: 1;
    padding: 0 16px;
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    outline: none;
}
.header__search input::placeholder { color: var(--color-text-muted); }
.header__search button {
    width: 44px;
    background: var(--color-surface-2);
    border-left: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 1rem;
    transition: background var(--transition);
}
.header__search button:hover { background: var(--color-accent); color: #000; }

/* Header Actions */
.header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.header__actions .btn { white-space: nowrap; }

/* =============================================
   CATEGORY NAV BAR
   ============================================= */
#category-nav {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    overflow-x: auto;
    scrollbar-width: none;
}
#category-nav::-webkit-scrollbar { display: none; }
#category-nav .container {
    display: flex;
    align-items: center;
    height: 44px;
    gap: 4px;
}
.category-nav__item {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}
.category-nav__item:hover,
.category-nav__item.active {
    background: var(--color-accent);
    color: #000;
}

/* =============================================
   LAYOUT: SIDEBAR + MAIN
   ============================================= */
#page-wrapper {
    display: flex;
    min-height: calc(100vh - var(--header-h) - 44px);
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: 20px 0;
    position: sticky;
    top: calc(var(--header-h) + 44px);
    height: calc(100vh - var(--header-h) - 44px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

.sidebar__section { margin-bottom: 24px; }
.sidebar__title {
    padding: 4px 16px 8px;
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-text-muted);
}
.sidebar__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    transition: background var(--transition), color var(--transition);
}
.sidebar__link:hover,
.sidebar__link.active {
    background: var(--color-surface-2);
    color: var(--color-text);
}
.sidebar__link.active { color: var(--color-accent); }
.sidebar__link .icon {
    width: 18px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.sidebar__divider {
    height: 1px;
    background: var(--color-border);
    margin: 12px 16px;
}

/* Main Content */
#main-content {
    flex: 1;
    min-width: 0;
    padding: 24px 20px;
}

/* =============================================
   SECTION HEADER
   ============================================= */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.section-header h2 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-header h2 .icon { color: var(--color-accent); }
.section-header a {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}
.section-header a:hover { color: var(--color-accent); }

/* =============================================
   VIDEO GRID
   ============================================= */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 36px;
}
.video-grid--large {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.video-grid--small {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* =============================================
   VIDEO CARD
   ============================================= */
.video-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}
.video-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.video-card:hover .video-card__thumb img {
    transform: scale(1.04);
}

/* Thumbnail */
.video-card__thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-surface-2);
}
.video-card__thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.video-card__thumb .thumb-placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-surface-2), var(--color-border));
    font-size: 2rem;
    color: var(--color-text-dark);
}
.video-card__duration {
    position: absolute;
    bottom: 6px; right: 8px;
    background: rgba(0,0,0,.85);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
}
.video-card__badges {
    position: absolute;
    top: 6px; left: 6px;
    display: flex; gap: 4px;
}
.video-card__preview {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}
.video-card:hover .video-card__preview { opacity: 1; }

/* Play overlay */
.video-card__play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.4);
    opacity: 0;
    transition: opacity var(--transition);
}
.video-card:hover .video-card__play-overlay { opacity: 1; }
.video-card__play-overlay .play-icon {
    width: 48px; height: 48px;
    background: rgba(255,153,0,.9);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    color: #000;
    transform: scale(.9);
    transition: transform var(--transition);
}
.video-card:hover .play-icon { transform: scale(1); }

/* Card body */
.video-card__body {
    padding: 10px 12px;
}
.video-card__title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--color-text);
}
.video-card__title:hover { color: var(--color-accent); }
.video-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.video-card__channel { font-weight: 500; }
.video-card__channel:hover { color: var(--color-accent); }
.video-card__stats { display: flex; gap: 10px; }
.video-card__stats span { display: flex; align-items: center; gap: 3px; }
.video-card__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
}
.video-card__rating-bar {
    flex: 1;
    height: 3px;
    background: var(--color-danger);
    border-radius: 2px;
    overflow: hidden;
}
.video-card__rating-bar-fill {
    height: 100%;
    background: var(--color-success);
    border-radius: 2px;
}
.video-card__rating span {
    font-size: 10px;
    color: var(--color-text-muted);
}

/* =============================================
   FILTERS / SORT BAR
   ============================================= */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-bar__label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    margin-right: 4px;
}
.filter-tag {
    padding: 5px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--color-surface);
    transition: all var(--transition);
}
.filter-tag:hover,
.filter-tag.active {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(255,153,0,.1);
}
.filter-select {
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: var(--font-size-xs);
    outline: none;
    cursor: pointer;
}
.filter-select:focus { border-color: var(--color-accent); }

/* =============================================
   FEATURED / HERO BANNER
   ============================================= */
.hero-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
    aspect-ratio: 21/7;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.hero-banner__bg {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%; height: 100%;
    opacity: .5;
}
.hero-banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
}
.hero-banner__content {
    position: relative;
    z-index: 1;
    padding: 32px 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 60%;
}
.hero-banner__tag {
    display: inline-block;
    background: var(--color-accent);
    color: #000;
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    width: fit-content;
}
.hero-banner__title {
    font-size: var(--font-size-xl);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
    color: #fff;
}
.hero-banner__meta {
    font-size: var(--font-size-sm);
    color: rgba(255,255,255,.7);
    margin-bottom: 20px;
    display: flex; gap: 16px;
}
.hero-banner__actions { display: flex; gap: 10px; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 32px 0;
}
.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    background: var(--color-surface);
    transition: all var(--transition);
}
.pagination a:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pagination .current,
.pagination span.current {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #000;
}

/* =============================================
   SINGLE VIDEO PAGE
   ============================================= */
.single-video-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}
.video-player-wrap {
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    width: 100%;
    /* Modern browsers: aspect-ratio */
    aspect-ratio: 16 / 9;
}
/* Fallback padding-top hack for browsers without aspect-ratio support */
@supports not (aspect-ratio: 16/9) {
    .video-player-wrap {
        padding-top: 56.25%; /* 9/16 = 0.5625 */
        height: 0;
    }
    .video-player-wrap video,
    .video-player-wrap iframe,
    .video-player-wrap .player-placeholder {
        position: absolute;
        top: 0; left: 0;
    }
}
.video-player-wrap video,
.video-player-wrap iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}
.video-player-wrap .player-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 12px;
    background: #000;
    color: var(--color-text-muted);
    font-size: 2rem;
}
.video-info { padding: 16px 0; }
.video-info__title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}
.video-info__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 16px;
}
.video-info__stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}
.video-info__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.action-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: var(--color-surface-2);
    color: var(--color-text);
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.action-btn:hover { background: var(--color-border); }
.action-btn--like { }
.action-btn--like:hover { color: var(--color-success); }
.action-btn--dislike:hover { color: var(--color-danger); }
.action-btn--fav:hover { color: var(--color-accent); }

/* Rating bar full */
.rating-bar-full {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}
.rating-bar-full .bar {
    flex: 1; height: 6px;
    background: var(--color-danger);
    border-radius: 3px;
    overflow: hidden;
}
.rating-bar-full .bar-fill {
    height: 100%;
    background: var(--color-success);
    border-radius: 3px;
}
.rating-bar-full .pct {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-success);
}

/* Tags */
.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
}
.video-tag {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    transition: all var(--transition);
}
.video-tag:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Channel info */
.channel-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    margin: 16px 0;
}
.channel-info__avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--color-surface-2);
    overflow: hidden;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.channel-info__name {
    font-weight: 700;
    font-size: var(--font-size-md);
}
.channel-info__subs {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.channel-info__actions { margin-left: auto; }

/* Sidebar related */
.related-list { display: flex; flex-direction: column; gap: 12px; }
.related-card {
    display: flex;
    gap: 10px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: background var(--transition);
    padding: 4px;
}
.related-card:hover { background: var(--color-surface); }
.related-card__thumb {
    width: 130px;
    flex-shrink: 0;
    aspect-ratio: 16/9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    background: var(--color-surface-2);
}
.related-card__thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.related-card__thumb .duration {
    position: absolute;
    bottom: 3px; right: 4px;
    background: rgba(0,0,0,.85);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 2px;
}
.related-card__info { flex: 1; min-width: 0; }
.related-card__title {
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}
.related-card__title:hover { color: var(--color-accent); }
.related-card__meta {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* =============================================
   COMMENTS
   ============================================= */
.comments-section { margin-top: 28px; }
.comments-section h3 {
    font-size: var(--font-size-md);
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}
.comment-form { margin-bottom: 24px; }
.comment-form textarea {
    width: 100%;
    padding: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    resize: vertical;
    min-height: 90px;
    margin-bottom: 10px;
    outline: none;
    transition: border-color var(--transition);
}
.comment-form textarea:focus { border-color: var(--color-accent); }
.comment {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.comment__avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--color-surface-2);
    overflow: hidden;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.comment__body { flex: 1; }
.comment__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.comment__author { font-size: var(--font-size-sm); font-weight: 600; }
.comment__date { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.comment__text { font-size: var(--font-size-sm); line-height: 1.5; color: var(--color-text); }
.comment__actions {
    display: flex; gap: 14px;
    margin-top: 6px;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.comment__actions button { color: var(--color-text-muted); font-size: inherit; }
.comment__actions button:hover { color: var(--color-accent); }

/* =============================================
   CATEGORIES PAGE
   ============================================= */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.category-card {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
}
.category-card__bg {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.category-card:hover .category-card__bg { transform: scale(1.06); }
.category-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,.8) 0%, rgba(0,0,0,.2) 100%);
}
.category-card__info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 12px;
}
.category-card__name {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: #fff;
}
.category-card__count {
    font-size: var(--font-size-xs);
    color: rgba(255,255,255,.7);
}

/* =============================================
   FOOTER
   ============================================= */
#site-footer {
    background: #111;
    border-top: 1px solid var(--color-border);
    margin-top: 40px;
}
.footer__top {
    padding: 40px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
}
.footer__col-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-text);
    margin-bottom: 14px;
}
.footer__links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer__links a {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    transition: color var(--transition);
}
.footer__links a:hover { color: var(--color-accent); }
.footer__bottom {
    padding: 16px 0;
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.footer__bottom a:hover { color: var(--color-accent); }
.footer__logo {
    font-size: 1.2rem;
    font-weight: 900;
    display: flex; gap: 2px; align-items: center;
}
.footer__logo .w1 { color: var(--color-text); }
.footer__logo .w2 {
    background: var(--color-accent);
    color: #000;
    padding: 1px 5px;
    border-radius: 3px;
}

/* =============================================
   WIDGETS
   ============================================= */
.widget { margin-bottom: 24px; }
.widget-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    padding: 0 16px;
}

/* =============================================
   SEARCH PAGE
   ============================================= */
.search-header {
    background: var(--color-surface);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}
.search-header h1 {
    font-size: var(--font-size-lg);
    margin-bottom: 6px;
}
.search-header p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}
.search-header span { color: var(--color-accent); font-weight: 700; }

/* =============================================
   LOADING / SKELETON
   ============================================= */
@keyframes shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--color-surface) 25%, var(--color-surface-2) 50%, var(--color-surface) 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius-sm);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
    #sidebar { display: none; }
    .single-video-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    :root { --header-h: 52px; }
    .header__actions .btn--outline { display: none; }
    .hero-banner { aspect-ratio: 16/9; }
    .hero-banner__content { padding: 20px; max-width: 80%; }
    .hero-banner__title { font-size: var(--font-size-md); }
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .footer__top { grid-template-columns: repeat(2, 1fr); }
}
/* Mobile: search bar drops to its own row below logo + actions */
@media (max-width: 600px) {
    #site-header {
        height: auto;
        padding: 8px 0 10px;
    }
    #site-header .container {
        flex-wrap: wrap;
        row-gap: 8px;
        padding: 0 12px;
        gap: 8px;
    }
    .header__menu-toggle { order: 1; flex-shrink: 0; }
    .header__logo        { order: 2; flex: 1 1 auto; }
    .header__actions     { order: 3; margin-left: auto; flex-shrink: 0; }
    /* Search fills the entire second row */
    .header__search {
        order: 4;
        flex: 0 0 100%;
        max-width: 100%;
    }
    /* Prevent sign-up label overflow on very small screens */
    .header__actions .btn--accent span { display: none; }
}
@media (max-width: 480px) {
    .header__logo .logo-text { display: none; }
    .video-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .filter-bar { gap: 6px; }
    /* Keep action buttons small */
    .header__actions .btn { padding: 6px 10px; font-size: 0.78rem; }
}

/* =============================================
   WORDPRESS CORE CLASSES
   ============================================= */
.alignleft  { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin: 0 auto 1em; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--font-size-xs); color: var(--color-text-muted); text-align: center; padding: 4px; }
.sticky { }
.gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.bypostauthor { }
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}


/* =============================================
   TV- AUTH & UPLOAD PAGES
   Login, Register, Upload
   ============================================= */

/* Page shell */
.tv-page {
    width: 100%;
    min-height: calc(100vh - var(--header-h) - 44px);
    background: var(--color-bg);
    padding-bottom: 64px;
}

/* Banner strip */
.tv-page__banner {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a2e 45%, #16213e 70%, #0f3460 100%);
}
.tv-page__banner--blue {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 45%, #1c2a45 70%, #1e3a5f 100%);
}
.tv-banner__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 44px 44px;
}
.tv-banner__glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 90% at 80% 50%, rgba(255,153,0,.1) 0%, transparent 70%),
        radial-gradient(ellipse 35% 60% at 15% 50%, rgba(255,153,0,.06) 0%, transparent 70%);
}
.tv-banner__glow--blue {
    background:
        radial-gradient(ellipse 55% 90% at 80% 50%, rgba(37,99,235,.15) 0%, transparent 70%),
        radial-gradient(ellipse 35% 60% at 15% 50%, rgba(37,99,235,.08) 0%, transparent 70%);
}

/* Content wrapper */
.tv-page__wrap {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
}
.tv-page__wrap--wide {
    max-width: 980px;
}

/* Icon bubble — overlaps banner and card */
.tv-bubble {
    position: relative;
    z-index: 10;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), #d4820a);
    border: 4px solid var(--color-surface);
    box-shadow: 0 8px 28px rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: -44px auto 0;
}
.tv-bubble--blue {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Main card */
.tv-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px 36px 28px;
    box-shadow: 0 8px 40px rgba(0,0,0,.5);
    margin-top: -20px;
    position: relative;
    z-index: 5;
}
.tv-card--wide {
    padding: 32px 40px 36px;
}

/* Card head */
.tv-card__head {
    text-align: center;
    margin-bottom: 20px;
}
.tv-card__head--center { text-align: center; }

.tv-card__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    margin: 0 0 6px;
    letter-spacing: -.015em;
    line-height: 1.2;
}
.tv-card__subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.55;
    margin: 0;
}

/* Horizontal rule */
.tv-card__rule {
    height: 1px;
    background: var(--color-border);
    margin: 20px -36px;
}
.tv-card--wide .tv-card__rule {
    margin: 20px -40px;
}

/* Step indicator */
.tv-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0 4px;
}
.tv-steps__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.tv-steps__dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.tv-steps__item--active .tv-steps__dot {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #000;
    box-shadow: 0 0 0 4px rgba(255,153,0,.2);
}
.tv-steps__item--done .tv-steps__dot {
    background: var(--color-success);
    border-color: var(--color-success);
    color: #fff;
}
.tv-steps__label {
    font-size: 10px;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.tv-steps__item--active .tv-steps__label { color: var(--color-accent); }
.tv-steps__line {
    flex: 1;
    max-width: 48px;
    height: 2px;
    background: var(--color-border);
    border-radius: 1px;
    margin-bottom: 18px;
}

/* Alert banners */
.tv-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
}
.tv-alert__icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.tv-alert__text { flex: 1; }
.tv-alert--error {
    background: rgba(229,62,62,.12);
    border: 1px solid rgba(229,62,62,.3);
    color: #fc8181;
}
.tv-alert--success {
    background: rgba(56,161,105,.12);
    border: 1px solid rgba(56,161,105,.3);
    color: #68d391;
}

/* Form wrapper */
.tv-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Section label inside form */
.tv-form__section {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--color-text-muted);
    margin-bottom: -4px;
}
.tv-form__section::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

/* Individual field */
.tv-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tv-field--inline {
    flex-direction: row;
    align-items: center;
}

/* Label row */
.tv-field__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.tv-field__label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}

/* Badge */
.tv-field__badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 2px 7px;
    border-radius: 3px;
    background: rgba(255,153,0,.15);
    color: var(--color-accent);
    white-space: nowrap;
    flex-shrink: 0;
}
.tv-field__badge--info {
    background: rgba(37,99,235,.15);
    color: #93c5fd;
}

/* Inline link */
.tv-field__link {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-accent);
    white-space: nowrap;
    flex-shrink: 0;
}
.tv-field__link:hover { text-decoration: underline; }

/* Control wrapper */
.tv-field__control {
    position: relative;
    display: flex;
}

/* Icon prefix */
.tv-field__control--icon .tv-field__icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: .95rem;
    pointer-events: none;
    opacity: .5;
    z-index: 1;
}
.tv-field__control--icon .tv-field__input { padding-left: 40px; }

/* Password eye button */
.tv-field__control--pw .tv-field__input { padding-right: 46px; }
.tv-field__eye {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 44px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: .95rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: color var(--transition);
}
.tv-field__eye:hover { color: var(--color-accent); }

/* Input, textarea, select */
.tv-field__input {
    width: 100%;
    padding: 11px 14px;
    background: var(--color-surface-2);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: var(--font-size-sm);
    font-family: var(--font-main);
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
}
.tv-field__input:hover { border-color: var(--color-text-dark); }
.tv-field__input:focus {
    border-color: var(--color-accent);
    background: rgba(255,153,0,.04);
    box-shadow: 0 0 0 3px rgba(255,153,0,.14);
}
.tv-field__input::placeholder { color: var(--color-text-dark); }
.tv-field__input--textarea { resize: vertical; min-height: 96px; }
.tv-field__input--mono { font-family: 'Courier New', Courier, monospace; font-size: .82rem; }
.tv-field__input--select { cursor: pointer; }

/* Hint and counter */
.tv-field__hint {
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.45;
}
.tv-field__counter {
    font-size: 11px;
    color: var(--color-text-muted);
    text-align: right;
}

/* Two fields side-by-side */
.tv-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Checkbox */
.tv-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--color-surface-2);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color .18s;
}
.tv-check:hover { border-color: var(--color-accent); }
.tv-check__input {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--color-accent);
    cursor: pointer;
}
.tv-check__mark { display: none; }
.tv-check__text {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.5;
}
.tv-check__link { color: var(--color-accent); font-weight: 600; }
.tv-check__link:hover { text-decoration: underline; }

/* Remember me inline row - no box */
.tv-field--inline .tv-check {
    background: none;
    border: none;
    padding: 0;
}

/* Password strength meter */
.tv-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}
.tv-strength__bar {
    flex: 1;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
}
.tv-strength__fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width .3s ease, background .3s ease;
}
.tv-strength__label {
    font-size: 11px;
    font-weight: 700;
    min-width: 48px;
    text-align: right;
    white-space: nowrap;
}

/* Submit areas */
.tv-form__submit { margin-top: 4px; }
.tv-form__submit-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    margin-top: 4px;
}
.tv-form__note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.5;
}
.tv-form__note-icon { flex-shrink: 0; font-size: .85rem; }
.tv-form__note-text { flex: 1; }

/* Button */
.tv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    font-family: var(--font-main);
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .15s, box-shadow .18s;
    letter-spacing: .01em;
    text-decoration: none;
    line-height: 1;
}
.tv-btn--primary {
    background: var(--color-accent);
    color: #000;
    box-shadow: 0 4px 16px rgba(255,153,0,.25);
}
.tv-btn--primary:hover {
    background: #e68a00;
    color: #000;
    box-shadow: 0 6px 22px rgba(255,153,0,.4);
    transform: translateY(-1px);
}
.tv-btn--primary:active { transform: translateY(0); }
.tv-btn--primary:disabled {
    opacity: .5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
.tv-btn--full { width: 100%; }
.tv-btn__icon { font-size: 1rem; flex-shrink: 0; }
.tv-btn__text { flex: 1; text-align: center; }

/* Card footer */
.tv-card__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-wrap: wrap;
    padding-top: 4px;
}
.tv-card__footer-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}
.tv-card__footer-link {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-accent);
}
.tv-card__footer-link:hover { text-decoration: underline; }

/* Trust bar */
.tv-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}
.tv-trust__item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 16px;
}
.tv-trust__icon { font-size: .9rem; }
.tv-trust__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    white-space: nowrap;
}
.tv-trust__sep {
    width: 1px;
    height: 16px;
    background: var(--color-border);
    flex-shrink: 0;
}

/* Info bar (upload page) */
.tv-infobar {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    background: rgba(37,99,235,.1);
    border: 1px solid rgba(37,99,235,.22);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    font-size: var(--font-size-sm);
    color: #93c5fd;
    line-height: 1.5;
}
.tv-infobar__icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.tv-infobar__text { flex: 1; }

/* Upload two-column grid */
.tv-upload-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 36px;
    align-items: start;
}
.tv-upload-thumb {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tv-upload-fields { min-width: 0; }

/* Thumbnail dropzone */
.tv-dropzone {
    position: relative;
    aspect-ratio: 16 / 9;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
    overflow: hidden;
    cursor: pointer;
    transition: border-color .18s, background .18s;
}
.tv-dropzone:hover,
.tv-dropzone.drag-over {
    border-color: var(--color-accent);
    background: rgba(255,153,0,.05);
}
.tv-dropzone__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    pointer-events: none;
    text-align: center;
}
.tv-dropzone__icon   { font-size: 2rem; line-height: 1; }
.tv-dropzone__title  { font-size: var(--font-size-sm); font-weight: 600; color: var(--color-text); line-height: 1.3; }
.tv-dropzone__sub    { font-size: 11px; color: var(--color-text-muted); }
.tv-dropzone__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.tv-dropzone img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Thumbnail info panel */
.tv-thumb-info {
    padding: 12px 14px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}
.tv-thumb-info__title {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.tv-thumb-info__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.tv-thumb-info__list li {
    font-size: 11px;
    color: var(--color-text-muted);
    padding-left: 14px;
    position: relative;
    line-height: 1.4;
}
.tv-thumb-info__list li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
}

/* OR divider */
.tv-or {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--color-text-muted);
}
.tv-or__line { flex: 1; height: 1px; background: var(--color-border); }
.tv-or__text { white-space: nowrap; }

/* Responsive */
@media (max-width: 860px) {
    .tv-upload-grid { grid-template-columns: 1fr; }
    .tv-upload-thumb { max-width: 360px; margin: 0 auto; width: 100%; }
}
@media (max-width: 600px) {
    .tv-page__banner  { height: 140px; }
    .tv-card          { padding: 28px 20px 24px; }
    .tv-card--wide    { padding: 28px 20px 28px; }
    .tv-card__rule    { margin: 18px -20px; }
    .tv-card--wide .tv-card__rule { margin: 18px -20px; }
    .tv-card__title   { font-size: 1.25rem; }
    .tv-fields-row    { grid-template-columns: 1fr; }
    .tv-trust         { flex-direction: column; align-items: flex-start; gap: 4px; }
    .tv-trust__sep    { display: none; }
    .tv-steps__line   { max-width: 28px; }
}
@media (max-width: 400px) {
    .tv-page__wrap { padding: 0 10px; }
    .tv-bubble     { width: 76px; height: 76px; font-size: 1.7rem; }
}

/* =============================================
   SPONSORED VIDEOS SECTION
   ============================================= */
.section-header--sponsored {
    border-left: 3px solid #f39c12;
    padding-left: 12px;
}
.sponsored-label {
    display: inline-block;
    background: #f39c12;
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 8px;
    letter-spacing: 0.05em;
}
.sponsored-grid .video-card {
    border: 1px solid rgba(243,156,18,0.25);
    border-radius: var(--radius-md);
}
.sponsored-more {
    text-align: center;
    padding: 16px 0 8px;
}
.sponsored-more .btn--outline {
    font-size: 0.85rem;
    padding: 8px 24px;
    border-color: var(--color-border);
    color: var(--color-text-muted);
}
.sponsored-more .btn--outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* =============================================
   EDIT PROFILE — AVATAR
   ============================================= */
.tv-profile-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.tv-profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-accent);
    display: block;
    margin: 0 auto;
}
.tv-dropzone--avatar {
    cursor: pointer;
    padding: 14px;
    min-height: auto;
}
.tv-dropzone--avatar .tv-dropzone__title {
    font-size: 0.85rem;
}


/* =============================================
   PREMIUM BADGE
   ============================================= */
.badge--premium {
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* =============================================
   PAYWALL OVERLAY
   ============================================= */
.paywall-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0d0d1a center/cover no-repeat;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.paywall-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,10,30,.92) 0%, rgba(30,20,60,.88) 100%);
    backdrop-filter: blur(6px);
}
.paywall-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 24px;
    max-width: 420px;
    width: 100%;
}
.paywall-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    animation: paywall-pulse 2s ease-in-out infinite;
}
@keyframes paywall-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}
.paywall-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
}
.paywall-desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,.7);
    margin: 0 0 20px;
    line-height: 1.5;
}
.paywall-price {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    padding: 12px 20px;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 20px;
}
.paywall-price__currency {
    font-size: 0.9rem;
    color: rgba(255,255,255,.6);
    font-weight: 600;
}
.paywall-price__amount {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}
.paywall-price__label {
    font-size: 0.75rem;
    color: rgba(255,255,255,.5);
    align-self: flex-end;
    margin-bottom: 2px;
}
.paywall-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.paywall-actions .btn {
    width: 100%;
    justify-content: center;
}
.paywall-note {
    font-size: 0.82rem;
    min-height: 1.2em;
    margin: 0;
}
.paywall-note--ok  { color: #2ecc71; }
.paywall-note--err { color: #e74c3c; }
.paywall-perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}
.paywall-perks li {
    font-size: 0.8rem;
    color: rgba(255,255,255,.65);
}

/* =============================================
   FOLLOW BUTTON & COUNT
   ============================================= */
.follow-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.follow-btn {
    transition: background 0.2s, transform 0.15s;
    min-width: 100px;
}
.follow-btn--active {
    background: var(--color-surface-2, #2a2a4a);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}
.follow-btn--active:hover {
    background: rgba(231,76,60,.15);
    color: #e74c3c;
    border-color: #e74c3c;
}
.follow-count {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}
.follow-count__num {
    color: var(--color-text);
    font-weight: 700;
}

/* =============================================
   NEWSLETTER WIDGET
   ============================================= */
.single-video-newsletter {
    margin-top: 32px;
}

/* ── Widget Shell ─────────────────────────── */
.nl-widget {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 28px 28px 24px;
    position: relative;
    overflow: hidden;
}

/* Subtle accent stripe along the top edge */
.nl-widget::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--color-accent);
}

/* ── Typography ───────────────────────────── */
.nl-widget__title {
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nl-widget__sub {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0 0 12px;
    line-height: 1.5;
}
.nl-widget__count {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin: 0 0 16px;
}
.nl-widget__count strong {
    color: var(--color-accent);
    font-weight: 700;
}

/* ── Form ─────────────────────────────────── */
.nl-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: opacity .3s;
}

/* Field wrapper — provides label hook and spacing context */
.nl-field {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.nl-field__label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nl-field__input {
    width: 100%;
    padding: 9px 14px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: var(--font-size-sm);
    font-family: var(--font-main);
    outline: none;
    transition: border-color var(--transition), background var(--transition);
    box-sizing: border-box;
}
.nl-field__input::placeholder {
    color: var(--color-text-dark);
}
.nl-field__input:focus {
    border-color: var(--color-accent);
    background: var(--color-surface);
}

/* ── Subscribe Button ─────────────────────── */
.nl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    background: var(--color-accent);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-size: var(--font-size-sm);
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.nl-btn:hover:not(:disabled) {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
}
.nl-btn:active:not(:disabled) {
    transform: scale(.97);
}
.nl-btn:disabled {
    opacity: .55;
    cursor: default;
}

/* ── Privacy Note ─────────────────────────── */
.nl-privacy {
    font-size: var(--font-size-xs);
    color: var(--color-text-dark);
    margin: 0;
    text-align: center;
    line-height: 1.4;
}

/* ── Alert Messages ───────────────────────── */
.nl-alert {
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    display: block;
    font-weight: 500;
    border: 1px solid transparent;
}
.nl-alert--error {
    background: rgba(229,62,62,.12);
    color: #fc8181;
    border-color: rgba(229,62,62,.25);
}
.nl-alert--success {
    background: rgba(56,161,105,.12);
    color: #68d391;
    border-color: rgba(56,161,105,.25);
}

/* ── Sidebar Widget Variant ───────────────── */
.widget .nl-widget {
    padding: 20px;
    border-radius: var(--radius-sm);
}
.widget .nl-widget__title {
    font-size: var(--font-size-base);
}

/* ── Homepage Banner Variant ──────────────── */
.newsletter-banner {
    margin: 48px 0 24px;
}
.newsletter-banner .nl-widget {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    background: linear-gradient(135deg, var(--color-surface) 0%, rgba(255,153,0,.06) 100%);
    border-color: rgba(255, 153, 0, 0.2);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(255,153,0,.08);
}
/* Accent stripe override: thicker + animated shimmer for the banner */
.newsletter-banner .nl-widget::before {
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), #d4820a, var(--color-accent));
    background-size: 200% 100%;
    animation: nl-stripe-shimmer 3s linear infinite;
}
@keyframes nl-stripe-shimmer {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}
.newsletter-banner .nl-widget__title {
    justify-content: center;
    font-size: var(--font-size-lg);
}
.newsletter-banner .nl-widget__sub {
    font-size: var(--font-size-base);
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}
/* Inline row layout: fields + button side-by-side on desktop */
.newsletter-banner .nl-form {
    max-width: 560px;
    margin: 0 auto;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}
.newsletter-banner .nl-form .nl-field {
    flex: 1 1 160px;
    min-width: 140px;
}
.newsletter-banner .nl-form .nl-btn {
    flex: 0 0 auto;
    width: auto;
    padding: 10px 24px;
    align-self: center;
    white-space: nowrap;
}
/* Privacy note spans the full row below the inputs */
.newsletter-banner .nl-privacy {
    flex: 0 0 100%;
    text-align: center;
    margin-top: 4px;
}

/* =============================================
   SPONSORED VIDEOS — ITEM + HOVER STYLES
   ============================================= */
/* Individual card wrapper inside sponsored-grid */
.sponsored-item {
    position: relative;
}
/* Amber glow on hover */
.sponsored-item:hover .video-card {
    border-color: rgba(243, 156, 18, 0.55);
    box-shadow: 0 0 12px rgba(243, 156, 18, 0.12);
    transition: border-color var(--transition), box-shadow var(--transition);
}

/* =============================================
   RESPONSIVE — NEWER SECTIONS
   ============================================= */

/* Newsletter banner: collapse inline row to column on mobile */
@media (max-width: 600px) {
    .newsletter-banner { margin: 32px 0 16px; }
    .newsletter-banner .nl-form {
        flex-direction: column;
        max-width: 100%;
        gap: 10px;
    }
    .newsletter-banner .nl-form .nl-field { flex: 1 1 auto; }
    .newsletter-banner .nl-form .nl-btn  { width: 100%; }
}

/* Newsletter widget: compact on very small screens */
@media (max-width: 480px) {
    .nl-widget { padding: 20px 16px 18px; }
    .nl-widget__title { font-size: var(--font-size-base); }
    .nl-widget__sub   { font-size: var(--font-size-xs); }
}

/* Sponsored section: minor spacing tweak on mobile */
@media (max-width: 768px) {
    .section-header--sponsored { padding-left: 10px; }
    .sponsored-more            { padding: 12px 0 4px; }
}

/* Paywall: tighten on small screens */
@media (max-width: 600px) {
    .paywall-content          { padding: 24px 16px; }
    .paywall-title            { font-size: 1.15rem; }
    .paywall-desc             { font-size: 0.82rem; }
    .paywall-price__amount    { font-size: 1.6rem; }
}

/* Follow button: compact on very small screens */
@media (max-width: 480px) {
    .follow-wrap { gap: 8px; }
    .follow-btn  { min-width: 84px; font-size: var(--font-size-sm); padding: 7px 12px; }
}
