/**
 * Traditional Video Player (TVP) - Retro Video Player
 * CRT/VHS aesthetic
 */

:root {
    --tvp-bg-dark: #0a0a0a;
    --tvp-bg-panel: #1a1a1a;
    --tvp-bg-screen: #0d1117;
    --tvp-border: #333;
    --tvp-accent: #00ff88;
    --tvp-accent-dim: #00aa55;
    --tvp-text: #e0e0e0;
    --tvp-text-dim: #888;
    --tvp-vhs-red: #ff3366;
    --tvp-vhs-blue: #3366ff;
    --tvp-scanline: rgba(0, 0, 0, 0.15);
    --tvp-glow: 0 0 20px rgba(0, 255, 136, 0.3);
}

/* Reset for container */
body.awcr-tvp-page {
    margin: 0 !important;
    padding: 0 !important;
    background: var(--tvp-bg-dark) !important;
}

.tvp-container {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    background: var(--tvp-bg-dark);
    color: var(--tvp-text);
    min-height: 100vh;
    max-width: var(--site_width, var(--aw-content-width, 1340px));
    margin: 0 auto;
    padding: 20px var(--aw-space-md, 1rem);
}

/* ==========================================
   MONITOR BEZEL FRAME
   ========================================== */

.tvp-monitor-bezel {
    position: relative;
    display: flex;
    gap: 0;
    max-width: 100%;
    width: 100%;
}

.tvp-bezel-left,
.tvp-bezel-right {
    width: 75px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 50%, #1a1a1a 100%);
    border: 1px solid #2a2a2a;
    position: relative;
    overflow: hidden;
}

.tvp-bezel-left {
    border-radius: 12px 0 0 12px;
    border-right: none;
}

.tvp-bezel-right {
    border-radius: 0 12px 12px 0;
    border-left: none;
}

/* Bezel texture - vertical ridges */
.tvp-bezel-left::before,
.tvp-bezel-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 8px,
        rgba(255, 255, 255, 0.02) 8px,
        rgba(255, 255, 255, 0.02) 9px
    );
}

/* Vent holes pattern */
.tvp-bezel-left::after,
.tvp-bezel-right::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 200px;
    background: repeating-linear-gradient(
        180deg,
        #0a0a0a 0px,
        #0a0a0a 3px,
        transparent 3px,
        transparent 8px
    );
    border-radius: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Inner glow on bezels */
.tvp-bezel-left {
    box-shadow:
        inset -10px 0 30px rgba(0, 255, 136, 0.02),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
}

.tvp-bezel-right {
    box-shadow:
        inset 10px 0 30px rgba(0, 255, 136, 0.02),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
}

/* Monitor screen area */
.tvp-monitor-screen {
    flex: 1;
    min-width: 0;
    background: var(--tvp-bg-dark);
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
    padding: 0;
}

.tvp-container * {
    box-sizing: border-box;
}

/* Main Layout */
.tvp-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}

@media (max-width: 1024px) {
    .tvp-layout {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   HEADER BAR
   ========================================== */

.tvp-header {
    margin-bottom: 10px;
    background: var(--tvp-bg-panel);
    border: 2px solid var(--tvp-border);
    border-radius: 4px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    width: 100%;
}

.tvp-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tvp-logo-icon {
    width: 40px;
    height: 30px;
    background: var(--tvp-bg-screen);
    border: 2px solid var(--tvp-accent);
    border-radius: 4px;
    position: relative;
    box-shadow: var(--tvp-glow);
}

.tvp-logo-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-left: 10px solid var(--tvp-accent);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.tvp-logo-text {
    font-family: 'VT323', monospace;
    font-size: 28px;
    color: var(--tvp-accent);
    text-shadow: var(--tvp-glow);
    letter-spacing: 2px;
}

.tvp-search {
    display: flex;
    gap: 8px;
    width: 600px;
    margin-left: auto;
    position: relative;
}

.tvp-search input {
    flex: 1;
    background: var(--tvp-bg-screen);
    border: 1px solid var(--tvp-border);
    color: var(--tvp-text);
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

/* Search dropdown */
.tvp-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--tvp-bg-panel);
    border: 2px solid var(--tvp-accent-dim);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.tvp-search-dropdown.active {
    display: block;
}

.tvp-search-results {
    padding: 8px 0;
}

.tvp-search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #222;
}

.tvp-search-result-item:last-child {
    border-bottom: none;
}

.tvp-search-result-item:hover,
.tvp-search-result-item.highlighted {
    background: rgba(0, 255, 136, 0.1);
}

.tvp-search-result-thumb {
    width: 80px;
    height: 45px;
    background: var(--tvp-bg-screen);
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    flex-shrink: 0;
    position: relative;
}

.tvp-search-result-thumb-duration {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 1px 4px;
    border-radius: 2px;
    color: var(--tvp-text);
}

.tvp-search-result-info {
    flex: 1;
    min-width: 0;
}

.tvp-search-result-title {
    font-size: 14px;
    color: var(--tvp-text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tvp-search-result-title mark {
    background: var(--tvp-accent);
    color: #000;
    padding: 0 2px;
    border-radius: 2px;
}

.tvp-search-result-meta {
    font-size: 11px;
    color: var(--tvp-text-dim);
    display: flex;
    gap: 8px;
}

.tvp-search-result-meta mark {
    background: var(--tvp-accent-dim);
    color: #000;
    padding: 0 2px;
    border-radius: 2px;
}

.tvp-search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--tvp-text-dim);
    font-size: 13px;
}

.tvp-search-hint {
    padding: 8px 12px;
    font-size: 11px;
    color: var(--tvp-text-dim);
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-between;
}

.tvp-search-hint kbd {
    background: #333;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin: 0 2px;
}

.tvp-search input::placeholder {
    color: var(--tvp-text-dim);
    opacity: 1;
}

.tvp-search input:focus {
    outline: none;
    border-color: var(--tvp-accent);
}

.tvp-search button {
    background: var(--tvp-accent-dim);
    border: 1px solid var(--tvp-accent-dim);
    color: #000;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-sizing: border-box;
}

.tvp-user-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tvp-user-balance {
    font-size: 13px;
    font-family: 'VT323', monospace;
    color: var(--tvp-accent);
    background: var(--tvp-bg-screen);
    padding: 8px 14px;
    border: 1px solid var(--tvp-accent-dim);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.tvp-token-icon {
    font-size: 18px;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    line-height: 1;
}

.tvp-user-avatar {
    width: 32px;
    height: 32px;
    background: var(--tvp-border);
    border-radius: 50%;
}

/* ==========================================
   MAIN VIDEO PLAYER
   ========================================== */

.tvp-main-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tvp-player-wrapper {
    background: var(--tvp-bg-panel);
    border: 3px solid var(--tvp-border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.tvp-crt-frame {
    background: #222;
    padding: 12px;
    border-radius: 8px 8px 0 0;
}

.tvp-screen {
    position: relative;
    background: #000;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    box-shadow:
        inset 0 0 100px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 255, 136, 0.1);
}

/* CRT Overlay - scanlines + vignette + phosphor glow */
.tvp-crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Scanlines */
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.15) 2px,
            rgba(0, 0, 0, 0.15) 4px
        ),
        /* Subtle RGB subpixel effect */
        repeating-linear-gradient(
            90deg,
            rgba(255, 0, 0, 0.02) 0px,
            rgba(0, 255, 0, 0.02) 1px,
            rgba(0, 0, 255, 0.02) 2px
        );
    /* Vignette */
    mask-image: radial-gradient(ellipse 80% 80% at center, black 60%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at center, black 60%, transparent 100%);
}

.tvp-screen.scanlines-on .tvp-crt-overlay {
    opacity: 1;
}

/* Screen edge glow */
.tvp-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px 12px 0 0;
    box-shadow:
        inset 0 0 80px rgba(0, 255, 136, 0.05),
        inset 0 0 3px rgba(0, 255, 136, 0.1);
    pointer-events: none;
    z-index: 12;
}

/* CRT curvature vignette */
.tvp-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 11;
}

/* Static noise for no signal */
.tvp-static-noise {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.15;
    animation: tvp-static 0.1s infinite;
    mix-blend-mode: overlay;
}

@keyframes tvp-static {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2%, 2%); }
    50% { transform: translate(2%, -2%); }
    75% { transform: translate(-1%, -1%); }
}

/* Channel change static - high contrast TV snow */
.tvp-video-placeholder.channel-static {
    background: #222;
    z-index: 20;
}

.tvp-video-placeholder.channel-static .tvp-static-noise {
    background:
        repeating-linear-gradient(
            90deg,
            #fff 0px, #fff 2px,
            #000 2px, #000 4px,
            #888 4px, #888 6px,
            #000 6px, #000 8px,
            #fff 8px, #fff 10px,
            #444 10px, #444 12px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0px, transparent 3px,
            rgba(0,0,0,0.3) 3px, rgba(0,0,0,0.3) 6px
        );
    background-size: 12px 100%, 100% 6px;
    opacity: 0.9;
    animation: tvp-channel-static 0.05s steps(1) infinite;
}

@keyframes tvp-channel-static {
    0% { background-position: 0 0, 0 0; }
    20% { background-position: -4px 0, 0 -2px; }
    40% { background-position: -8px 0, 0 -4px; }
    60% { background-position: -2px 0, 0 -1px; }
    80% { background-position: -6px 0, 0 -3px; }
    100% { background-position: 0 0, 0 0; }
}

/* VHS Overlay - play indicator and counter */
.tvp-vhs-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 8;
    font-family: 'VT323', monospace;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tvp-vhs-overlay.visible {
    opacity: 1;
}

.tvp-screen.indicators-off .tvp-vhs-overlay {
    opacity: 0 !important;
}

.tvp-vhs-top {
    position: absolute;
    top: 16px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.tvp-vhs-play-indicator {
    font-size: 20px;
    color: #fff;
    text-shadow:
        2px 2px 0 #000,
        -1px -1px 0 #000,
        0 0 10px rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

.tvp-vhs-play-indicator.paused {
    color: var(--tvp-vhs-red);
    text-shadow:
        2px 2px 0 #000,
        0 0 15px var(--tvp-vhs-red);
}

.tvp-vhs-sp {
    font-size: 18px;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    letter-spacing: 3px;
}

.tvp-vhs-bottom {
    position: absolute;
    bottom: 16px;
    right: 20px;
}

.tvp-vhs-counter {
    font-size: 24px;
    color: #0ff;
    text-shadow:
        2px 2px 0 #000,
        0 0 10px rgba(0, 255, 255, 0.6);
    letter-spacing: 3px;
    font-variant-numeric: tabular-nums;
}

.tvp-video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    z-index: 5;
}

.tvp-video-title-overlay {
    font-family: 'VT323', monospace;
    font-size: 28px;
    color: #fff;
    text-shadow:
        2px 2px 0 #000,
        0 0 30px rgba(255, 255, 255, 0.3);
    letter-spacing: 6px;
    animation: tvp-flicker 0.15s infinite;
    z-index: 2;
}

@keyframes tvp-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
    75% { opacity: 0.98; }
}

.tvp-play-button {
    width: 80px;
    height: 80px;
    background: rgba(0, 255, 136, 0.2);
    border: 3px solid var(--tvp-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.tvp-play-button:hover {
    background: rgba(0, 255, 136, 0.4);
    box-shadow: var(--tvp-glow);
}

.tvp-play-button::before {
    content: '';
    border-left: 28px solid var(--tvp-accent);
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    margin-left: 8px;
}

.tvp-video-title-overlay {
    color: var(--tvp-accent);
    font-size: 18px;
    text-shadow: 0 0 10px var(--tvp-accent);
    text-align: center;
}

.tvp-signal-hint {
    display: block;
    font-size: 22px;
    color: var(--tvp-text-dim, rgba(255,255,255,0.4));
    letter-spacing: 3px;
    text-shadow: none;
    margin-top: 8px;
    animation: none;
}

/* VHS-style info bar */
.tvp-vhs-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    z-index: 5;
}

.tvp-vhs-rec {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--tvp-vhs-red);
}

.tvp-vhs-rec-dot {
    width: 10px;
    height: 10px;
    background: var(--tvp-vhs-red);
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.tvp-vhs-timecode {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: var(--tvp-text);
    letter-spacing: 2px;
}

.tvp-vhs-date {
    color: var(--tvp-text-dim);
}

/* ==========================================
   VCR CONTROL DECK
   ========================================== */

.tvp-vcr-deck {
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    padding: 12px 16px;
    border-top: 1px solid #2a2a2a;
    border-radius: 0 0 8px 8px;
}

/* Progress Track */
.tvp-progress-track {
    position: relative;
    height: 6px;
    background: #0a0a0a;
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 12px;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.8),
        0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Hover scale moved to JS */

.tvp-progress-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    width: 0;
    transition: width 0.1s ease;
}

.tvp-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--tvp-accent-dim) 0%, var(--tvp-accent) 100%);
    border-radius: 4px;
    width: 0;
    box-shadow: 0 0 12px var(--tvp-accent);
    will-change: width;
    transition: width 0.25s linear;
}

.tvp-progress-head {
    position: absolute;
    top: 50%;
    left: 0;
    width: 16px;
    height: 16px;
    margin-left: -8px; /* Center the dot on the progress point */
    background: var(--tvp-accent);
    border-radius: 50%;
    box-shadow:
        0 0 10px var(--tvp-accent),
        0 0 20px rgba(0, 255, 136, 0.3);
    transform: translateY(-50%) translateX(0);
    will-change: transform;
    transition: transform 0.25s linear;
    z-index: 2;
}

/* Hover scale handled via JS to preserve translateX position */

/* Disable transitions during seeking for instant response */
.tvp-progress-track.seeking .tvp-progress-fill,
.tvp-progress-track.seeking .tvp-progress-head {
    transition: none !important;
}

/* Transport Row */
.tvp-transport-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tvp-transport-left,
.tvp-transport-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tvp-transport-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Deck Buttons */
.tvp-deck-btn {
    width: 38px;
    height: 38px;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid #3a3a3a;
    border-radius: 5px;
    color: var(--tvp-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tvp-deck-btn:hover {
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    border-color: var(--tvp-accent-dim);
    box-shadow:
        0 0 15px rgba(0, 255, 136, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tvp-deck-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.tvp-deck-btn-play {
    width: 46px;
    height: 46px;
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    border-width: 2px;
}

.tvp-deck-btn-play:hover {
    border-color: var(--tvp-accent);
    box-shadow:
        0 0 20px rgba(0, 255, 136, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tvp-deck-btn-play.playing {
    border-color: var(--tvp-accent);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.tvp-deck-btn-sm {
    width: 36px;
    height: 36px;
}

/* Transport Icons */
.tvp-icon-play {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent var(--tvp-text);
    margin-left: 4px;
    transition: all 0.15s ease;
}

.tvp-deck-btn-play:hover .tvp-icon-play {
    border-left-color: var(--tvp-accent);
}

.tvp-deck-btn-play.playing .tvp-icon-play {
    width: 14px;
    height: 18px;
    border: none;
    margin-left: 0;
    background: linear-gradient(90deg,
        var(--tvp-accent) 0%,
        var(--tvp-accent) 35%,
        transparent 35%,
        transparent 65%,
        var(--tvp-accent) 65%,
        var(--tvp-accent) 100%
    );
}

.tvp-icon-prev,
.tvp-icon-next,
.tvp-icon-rew,
.tvp-icon-ff {
    display: flex;
    align-items: center;
}

.tvp-icon-prev::before {
    content: '';
    width: 3px;
    height: 14px;
    background: currentColor;
    margin-right: 2px;
}

.tvp-icon-prev::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 7px 10px 7px 0;
    border-color: transparent currentColor transparent transparent;
}

.tvp-icon-next::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 7px 0 7px 10px;
    border-color: transparent transparent transparent currentColor;
}

.tvp-icon-next::after {
    content: '';
    width: 3px;
    height: 14px;
    background: currentColor;
    margin-left: 2px;
}

.tvp-icon-rew::before,
.tvp-icon-rew::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 9px 6px 0;
    border-color: transparent currentColor transparent transparent;
}

.tvp-icon-ff::before,
.tvp-icon-ff::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 9px;
    border-color: transparent transparent transparent currentColor;
}

/* Volume - using dashicons */
.tvp-icon-vol {
    font-family: dashicons;
    font-size: 18px;
    line-height: 1;
}

.tvp-icon-vol::before {
    content: '\f028'; /* dashicons-format-audio (speaker) */
}

.tvp-icon-vol.muted::before {
    content: '\f028';
    color: var(--tvp-vhs-red);
    opacity: 0.5;
}

/* Effect toggle buttons */
.tvp-effect-toggles {
    display: flex;
    gap: 4px;
    margin-right: 12px;
}

.tvp-effect-btn {
    background: transparent;
    border: 1px solid var(--tvp-border);
    color: var(--tvp-text-dim);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tvp-effect-btn:hover {
    border-color: var(--tvp-accent-dim);
    color: var(--tvp-text);
}

.tvp-effect-btn.active {
    background: rgba(0, 255, 136, 0.15);
    border-color: var(--tvp-accent);
    color: var(--tvp-accent);
}

/* Fullscreen icon (Feather maximize SVG) */
.tvp-icon-fullscreen {
    display: block;
}

/* Volume Control */
.tvp-volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tvp-volume-slider {
    width: 70px;
    height: 6px;
    background: #0a0a0a;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tvp-volume-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tvp-accent-dim) 0%, var(--tvp-accent) 100%);
    border-radius: 3px;
    width: 70%;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
    transition: width 0.1s ease;
}

/* Time Display */
.tvp-time-display {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: var(--tvp-accent);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
    font-variant-numeric: tabular-nums;
}

.tvp-time-sep {
    color: var(--tvp-text-dim);
    margin: 0 4px;
}

.tvp-time-total {
    color: var(--tvp-text-dim);
}

/* ==========================================
   LEGACY: Old controls bar (keeping for reference)
   ========================================== */

/* Player controls bar */
.tvp-controls-bar {
    background: #1a1a1a;
    padding: 12px 16px;
    display: none; /* Hidden - using new VCR deck */
    flex-direction: column;
    gap: 10px;
}

.tvp-progress-bar {
    height: 6px;
    background: #333;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.tvp-progress-bar .tvp-progress-fill {
    height: 100%;
    background: var(--tvp-accent);
    border-radius: 3px;
    width: 35%;
    box-shadow: 0 0 8px var(--tvp-accent);
}

.tvp-progress-handle {
    position: absolute;
    top: 50%;
    left: 35%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: var(--tvp-accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--tvp-accent);
}

.tvp-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tvp-transport {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tvp-ctrl-btn {
    background: #2a2a2a;
    border: 1px solid #444;
    color: var(--tvp-text);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

.tvp-ctrl-btn:hover {
    background: #3a3a3a;
    border-color: var(--tvp-accent);
}

.tvp-ctrl-btn.large {
    width: 44px;
    height: 44px;
    font-size: 18px;
}

/* Transport Icon Styles */
.tvp-ctrl-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Play triangle */
.tvp-ctrl-btn .icon-play {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 10px;
    border-color: transparent transparent transparent currentColor;
    margin-left: 3px;
}

/* Pause bars */
.tvp-ctrl-btn.playing .icon-play {
    width: 10px;
    height: 12px;
    border: none;
    background: linear-gradient(to right, currentColor 0%, currentColor 35%, transparent 35%, transparent 65%, currentColor 65%, currentColor 100%);
    margin-left: 0;
}

/* Rewind - two triangles */
.tvp-ctrl-btn .icon-rew {
    display: flex;
    gap: 2px;
}
.tvp-ctrl-btn .icon-rew::before,
.tvp-ctrl-btn .icon-rew::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 7px 5px 0;
    border-color: transparent currentColor transparent transparent;
}

/* Fast forward - two triangles */
.tvp-ctrl-btn .icon-ff {
    display: flex;
    gap: 2px;
}
.tvp-ctrl-btn .icon-ff::before,
.tvp-ctrl-btn .icon-ff::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 7px;
    border-color: transparent transparent transparent currentColor;
}

/* Previous - bar + triangle */
.tvp-ctrl-btn .icon-prev {
    display: flex;
    align-items: center;
    gap: 2px;
}
.tvp-ctrl-btn .icon-prev::before {
    content: '';
    width: 2px;
    height: 12px;
    background: currentColor;
}
.tvp-ctrl-btn .icon-prev::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 8px 6px 0;
    border-color: transparent currentColor transparent transparent;
}

/* Next - triangle + bar */
.tvp-ctrl-btn .icon-next {
    display: flex;
    align-items: center;
    gap: 2px;
}
.tvp-ctrl-btn .icon-next::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 8px;
    border-color: transparent transparent transparent currentColor;
}
.tvp-ctrl-btn .icon-next::after {
    content: '';
    width: 2px;
    height: 12px;
    background: currentColor;
}

/* Volume icon */
.tvp-ctrl-btn .icon-vol {
    position: relative;
    width: 16px;
    height: 14px;
    display: block;
}
.tvp-ctrl-btn .icon-vol::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 7px 0 7px 6px;
    border-color: transparent transparent transparent currentColor;
}
.tvp-ctrl-btn .icon-vol::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 8px;
    background: currentColor;
}

/* Muted state */
.tvp-ctrl-btn.muted .icon-vol::before,
.tvp-ctrl-btn.muted .icon-vol::after {
    opacity: 0.4;
}

.tvp-time-display {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: var(--tvp-text-dim);
    margin-left: 12px;
}

.tvp-right-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tvp-volume {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tvp-volume-bar {
    width: 80px;
    height: 4px;
    background: #333;
    border-radius: 2px;
}

.tvp-volume-fill {
    height: 100%;
    background: var(--tvp-accent);
    width: 70%;
    border-radius: 2px;
}

.tvp-quality-btn,
.tvp-fullscreen-btn {
    background: none;
    border: 1px solid #444;
    color: var(--tvp-text-dim);
    padding: 4px 8px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

/* Video info section */
.tvp-video-info {
    background: var(--tvp-bg-panel);
    border: 2px solid var(--tvp-border);
    border-radius: 4px;
    padding: 16px;
}

.tvp-video-main-title {
    font-family: 'VT323', monospace;
    font-size: 24px;
    color: var(--tvp-text);
    margin: 0 0 8px 0;
}

.tvp-video-meta {
    display: flex;
    gap: 16px;
    color: var(--tvp-text-dim);
    font-size: 13px;
    margin-bottom: 12px;
}

.tvp-video-actions {
    display: flex;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--tvp-border);
}

.tvp-action-btn {
    background: #2a2a2a;
    border: 1px solid #444;
    color: var(--tvp-text);
    padding: 8px 16px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tvp-action-btn:hover {
    border-color: var(--tvp-accent);
}

.tvp-action-btn.primary {
    background: var(--tvp-accent-dim);
    color: #000;
    border-color: var(--tvp-accent);
}

.tvp-copy-link-btn {
    padding: 8px 10px;
}

.tvp-copy-link-btn svg {
    display: block;
}

/* Like button in VCR deck */
.tvp-like-btn.tvp-deck-btn {
    margin-left: 8px;
}

.tvp-like-btn .tvp-like-icon {
    font-size: 16px;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.tvp-like-btn:hover .tvp-like-icon {
    transform: scale(1.15);
    color: #ff4466;
}

.tvp-like-btn.liked {
    border-color: #ff4466 !important;
    background: rgba(255, 68, 102, 0.2) !important;
}

.tvp-like-btn.liked .tvp-like-icon {
    color: #ff4466;
}

/* ==========================================
   SIDEBAR
   ========================================== */

.tvp-sidebar {
    display: flex;
    flex-direction: column;
    align-self: start; /* Don't stretch with main content */
}

/* Playlist panel - fixed height, doesn't expand with video description */
.tvp-playlist-panel {
    background: var(--tvp-bg-panel);
    border: 2px solid var(--tvp-border);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Featured Videos Panel - no scroll, fixed list */
.tvp-featured-panel .tvp-featured-items {
    flex: 1;
    overflow: hidden; /* No scroll for featured */
}

.tvp-no-featured {
    padding: 20px;
    text-align: center;
    color: var(--tvp-text-dim);
    font-size: 13px;
}

.tvp-playlist-header {
    background: #222;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--tvp-border);
}

.tvp-playlist-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tvp-playlist-title {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: var(--tvp-accent);
}

.tvp-playlist-count {
    font-size: 11px;
    color: var(--tvp-text-dim);
}

.tvp-playlist-filters {
    display: flex;
    gap: 6px;
}

.tvp-filter-btn {
    background: var(--tvp-bg-screen);
    border: 1px solid var(--tvp-accent-dim);
    color: var(--tvp-accent-dim);
    height: 32px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
}

.tvp-filter-btn:hover {
    border-color: var(--tvp-accent-dim);
    color: var(--tvp-text);
}

.tvp-filter-btn.active {
    border-color: var(--tvp-accent);
    color: var(--tvp-accent);
    background: rgba(0, 255, 136, 0.1);
}

.tvp-filter-icon {
    font-size: 12px;
    line-height: 1;
}

.tvp-filter-label {
    font-size: 10px;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 0.5px;
}

.tvp-filter-dropdown {
    display: none;
    background: #1a1a1a;
    border-bottom: 1px solid var(--tvp-border);
    padding: 10px 12px;
}

.tvp-filter-dropdown.active {
    display: block;
}

.tvp-playlist-items {
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Required for flex overflow scroll */
}

.tvp-playlist-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: background 0.2s;
}

.tvp-playlist-item:hover {
    background: #252525;
}

.tvp-playlist-item.active {
    background: #1a2a1a;
    border-left: 3px solid var(--tvp-accent);
}

.tvp-playlist-thumb {
    width: 100px;
    height: 56px;
    background: #333;
    border-radius: 2px;
    position: relative;
    flex-shrink: 0;
}

.tvp-playlist-thumb-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 11px;
    padding: 2px 4px;
}

.tvp-playlist-item-info {
    flex: 1;
    min-width: 0;
}

.tvp-playlist-item-title {
    font-size: 13px;
    color: var(--tvp-text);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.tvp-playlist-item-meta {
    font-size: 11px;
    color: var(--tvp-text-dim);
}

/* Categories/Tags */
.tvp-categories-panel {
    background: var(--tvp-bg-panel);
    border: 2px solid var(--tvp-border);
    border-radius: 4px;
    padding: 16px;
}

.tvp-categories-title {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: var(--tvp-accent);
    margin-bottom: 12px;
}

.tvp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tvp-tag {
    background: #2a2a2a;
    border: 1px solid #444;
    color: var(--tvp-text-dim);
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.tvp-tag:hover,
.tvp-tag.active {
    border-color: var(--tvp-accent);
    color: var(--tvp-accent);
}

/* ==========================================
   VIDEO GRID (Library View)
   ========================================== */

.tvp-grid-section {
    grid-column: 1 / -1;
    margin-top: 20px;
}

.tvp-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tvp-section-title {
    font-family: 'VT323', monospace;
    font-size: 22px;
    color: var(--tvp-accent);
}

.tvp-section-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tvp-section-title-row .tvp-playlist-filters {
    margin-left: 8px;
}

.tvp-grid-dropdown {
    margin-bottom: 16px;
    border-radius: 4px;
    border: 1px solid var(--tvp-border);
    width: 100%;
}

/* Grid layout: category sidebar + video content */
.tvp-grid-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
}

.tvp-grid-categories {
    background: var(--tvp-bg-panel);
    border: 1px solid var(--tvp-border);
    border-radius: 4px;
    overflow: hidden;
    align-self: start;
    position: sticky;
    top: 52px;
}

.tvp-grid-categories-header {
    font-family: 'VT323', monospace;
    font-size: 15px;
    color: var(--tvp-accent);
    padding: 10px 12px;
    border-bottom: 1px solid var(--tvp-border);
    letter-spacing: 1px;
}

.tvp-grid-categories-list {
    max-height: 60vh;
    overflow-y: auto;
}

/* Desktop: hide mobile category toggle + dropdown, show persistent panel */
.tvp-grid-filter-toggle {
    display: none;
}

.tvp-grid-filter-dropdown {
    display: none;
}

/* Mobile: hide persistent panel, show toggle + dropdown */
@media (max-width: 1024px) {
    .tvp-grid-layout {
        grid-template-columns: 1fr;
    }

    .tvp-grid-categories {
        display: none;
    }

    .tvp-grid-filter-toggle {
        display: flex;
    }

    /* Dropdown still controlled by .active from JS toggle */
    .tvp-grid-filter-dropdown.active {
        display: block;
    }
}

.tvp-view-toggle {
    display: flex;
    gap: 4px;
}

.tvp-view-btn {
    background: var(--tvp-bg-screen);
    border: 1px solid var(--tvp-border);
    color: var(--tvp-text-dim);
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.tvp-view-btn:hover {
    border-color: var(--tvp-accent-dim);
    color: var(--tvp-text);
}

.tvp-sort-caret {
    margin-left: 4px;
    font-size: 10px;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.tvp-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tvp-video-card {
    background: var(--tvp-bg-panel);
    border: 2px solid var(--tvp-border);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.tvp-video-card:hover {
    border-color: var(--tvp-accent-dim);
    transform: translateY(-2px);
}

.tvp-video-card-thumb {
    aspect-ratio: 16 / 9;
    background: #222;
    position: relative;
    overflow: hidden;
}

.tvp-video-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tvp-video-card-thumb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
}

.tvp-video-card-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 12px;
    padding: 3px 6px;
}

.tvp-video-card-info {
    padding: 12px;
}

.tvp-video-card-title {
    font-size: 14px;
    color: var(--tvp-text);
    margin-bottom: 6px;
    line-height: 1.3;
}

.tvp-video-card-meta {
    font-size: 12px;
    color: var(--tvp-text-dim);
}

/* ==========================================
   SCROLLBAR - VHS/CRT branded
   ========================================== */

.tvp-playlist-items::-webkit-scrollbar {
    width: 10px;
}

.tvp-playlist-items::-webkit-scrollbar-track {
    background: #111;
    border-left: 1px solid #333;
}

.tvp-playlist-items::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #555 0%, #333 100%);
    border: 1px solid #222;
    border-radius: 2px;
}

.tvp-playlist-items::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--tvp-accent-dim) 0%, #2a5a3a 100%);
    border-color: var(--tvp-accent-dim);
}

.tvp-playlist-items::-webkit-scrollbar-thumb:active {
    background: var(--tvp-accent);
}

/* Firefox scrollbar */
.tvp-playlist-items {
    scrollbar-width: thin;
    scrollbar-color: #444 #111;
}

/* ==========================================
   MOBILE RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
    .tvp-layout {
        grid-template-columns: 1fr;
    }

    .tvp-sidebar {
        order: 2;
    }

    .tvp-main-content {
        order: 1;
    }

    .tvp-grid-section {
        order: 3;
    }

    /* Hide bezels on tablet */
    .tvp-bezel-left,
    .tvp-bezel-right {
        display: none;
    }

    .tvp-monitor-screen {
        border-radius: 8px;
        border-left: 1px solid #2a2a2a;
        border-right: 1px solid #2a2a2a;
    }

    /* Header adjustments for tablet */
    .tvp-header {
        padding: 10px 16px;
    }

    .tvp-logo-text {
        visibility: hidden;
        position: relative;
    }

    .tvp-logo-text::after {
        content: 'TVP';
        visibility: visible;
        position: absolute;
        left: 0;
    }

    .tvp-search {
        max-width: 280px;
        margin: 0 20px;
    }

    .tvp-user-controls {
        gap: 10px;
        flex-shrink: 0;
    }

    .tvp-user-balance {
        padding: 6px 10px;
        font-size: 12px;
    }

    .tvp-add-tokens-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
}

/* Smaller laptops (height-constrained) */
@media (max-height: 800px) {
    .tvp-header {
        padding: 8px 16px;
        margin-bottom: 6px;
    }

    .tvp-logo-text {
        font-size: 22px;
    }

    .tvp-crt-frame {
        padding: 8px;
    }

    .tvp-vcr-deck {
        padding: 8px 12px;
    }

    .tvp-progress-track {
        margin-bottom: 8px;
    }

    .tvp-deck-btn {
        width: 34px;
        height: 34px;
    }

    .tvp-deck-btn-play {
        width: 42px;
        height: 42px;
    }

    .tvp-time-display {
        font-size: 16px;
    }

    .tvp-video-info {
        padding: 12px;
    }

    .tvp-video-main-title {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .tvp-video-meta {
        margin-bottom: 8px;
    }
}

@media (max-width: 768px) {
    .tvp-container {
        padding: 10px;
    }
    
    .tvp-header {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .tvp-search {
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    .tvp-logo-text {
        visibility: visible;
        position: static;
        font-size: 22px;
    }

    .tvp-logo-text::after {
        content: none;
    }

    .tvp-crt-frame {
        padding: 10px;
    }

    /* VCR Deck Mobile */
    .tvp-vcr-deck {
        padding: 12px 14px;
    }

    .tvp-transport-row {
        gap: 8px;
    }

    .tvp-deck-btn {
        width: 40px;
        height: 40px;
    }

    .tvp-deck-btn-play {
        width: 50px;
        height: 50px;
    }

    .tvp-time-display {
        font-size: 20px;
    }

    .tvp-volume-slider {
        width: 60px;
    }

    /* VHS Overlay Mobile */
    .tvp-vhs-play-indicator {
        font-size: 16px;
    }

    .tvp-vhs-counter {
        font-size: 18px;
    }

    .tvp-controls-row {
        flex-direction: column;
        gap: 12px;
    }

    .tvp-transport {
        justify-content: center;
        flex-wrap: wrap;
    }

    .tvp-right-controls {
        justify-content: center;
    }
    
    .tvp-video-info {
        padding: 12px;
    }
    
    .tvp-video-main-title {
        font-size: 18px;
    }
    
    .tvp-video-actions {
        flex-wrap: wrap;
    }
    
    .tvp-playlist-panel {
        height: auto !important; /* Override JS-set height */
        max-height: none;
    }

    .tvp-featured-panel .tvp-featured-items {
        overflow: visible;
    }

    .tvp-playlist-items {
        max-height: none;
    }
    
    .tvp-playlist-thumb {
        width: 80px;
        height: 45px;
    }
    
    .tvp-video-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 12px;
    }
    
    .tvp-video-card-info {
        padding: 10px;
    }
    
    .tvp-video-card-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .tvp-header {
        padding: 10px;
    }
    
    .tvp-logo-text {
        font-size: 18px;
    }
    
    .tvp-ctrl-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .tvp-ctrl-btn.large {
        width: 38px;
        height: 38px;
    }
    
    .tvp-time-display {
        font-size: 12px;
    }
    
    .tvp-video-actions {
        flex-direction: column;
    }
    
    .tvp-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .tvp-playlist-item {
        padding: 8px;
        gap: 8px;
    }
    
    .tvp-playlist-thumb {
        width: 60px;
        height: 34px;
    }
    
    .tvp-playlist-item-title {
        font-size: 12px;
    }
    
    .tvp-video-grid {
        grid-template-columns: 1fr;
    }
    
    .tvp-tags {
        gap: 6px;
    }
    
    .tvp-tag {
        padding: 3px 8px;
        font-size: 11px;
    }
}

/* ==========================================
   ADDITIONAL DYNAMIC ELEMENTS
   ========================================== */

/* Video element styling */
.tvp-video-element,
.tvp-video-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: #000;
    z-index: 1;
}

/* Loading spinner */
.tvp-loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
}

.tvp-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--tvp-border);
    border-top-color: var(--tvp-accent);
    border-radius: 50%;
    animation: tvp-spin 1s linear infinite;
}

@keyframes tvp-spin {
    to { transform: rotate(360deg); }
}

/* Big play button overlay (for thumbnail preview) */
.tvp-big-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 12;
    cursor: pointer;
}

.tvp-big-play-overlay.visible {
    display: flex;
}

.tvp-big-play-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 4px solid var(--tvp-accent);
    color: var(--tvp-accent);
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
}

.tvp-big-play-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 212, 170, 0.2);
    box-shadow: 0 0 30px rgba(0, 212, 170, 0.5);
}

.tvp-big-play-icon {
    margin-left: 8px; /* Optical centering for play triangle */
}

/* Progress buffer */
.tvp-progress-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    width: 0;
}

/* Toast notifications */
.tvp-toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tvp-toast {
    background: var(--tvp-bg-panel);
    border: 2px solid var(--tvp-border);
    padding: 12px 20px;
    font-size: 13px;
    color: var(--tvp-text);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tvp-toast .toast-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    font-size: 16px;
    padding: 0 0 0 12px;
    line-height: 1;
}

.tvp-toast .toast-dismiss:hover {
    opacity: 1;
}

.tvp-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.tvp-toast-success {
    border-color: var(--tvp-accent);
    color: var(--tvp-accent);
}

.tvp-toast-error {
    border-color: var(--tvp-vhs-red);
    color: var(--tvp-vhs-red);
}

.tvp-toast-info {
    border-color: var(--tvp-vhs-blue);
    color: var(--tvp-vhs-blue);
}

/* Add tokens button */
.tvp-add-tokens-btn {
    background: linear-gradient(180deg, #4a7a3a 0%, #2a5a2a 100%);
    border: 1px solid #5a9a4a;
    color: var(--tvp-accent);
    font-family: inherit;
    font-size: 11px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.tvp-add-tokens-btn:hover {
    background: linear-gradient(180deg, #5a9a4a 0%, #3a6a3a 100%);
}

/* Playlist panel in sidebar */
.tvp-playlists-panel {
    background: var(--tvp-bg-panel);
    border: 2px solid var(--tvp-border);
    border-radius: 4px;
    padding: 16px;
    margin-top: 16px;
}

.tvp-playlist-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #222;
}

.tvp-playlist-link:last-child {
    border-bottom: none;
}

.tvp-playlist-link:hover {
    background: #252525;
}

.tvp-playlist-link.active {
    background: #1a2a1a;
    border-left: 3px solid var(--tvp-accent);
    margin-left: -3px;
}

.tvp-playlist-link-icon {
    color: var(--tvp-accent-dim);
    font-size: 10px;
}

.tvp-playlist-link-name {
    flex: 1;
    font-size: 13px;
    color: var(--tvp-text);
}

.tvp-playlist-link-count {
    font-size: 11px;
    color: var(--tvp-text-dim);
    background: #2a2a2a;
    padding: 2px 6px;
    border-radius: 2px;
}

/* Hierarchical playlist - child items indented */
.tvp-playlist-link.tvp-playlist-child {
    padding-left: 24px;
    opacity: 0.9;
    font-size: 12px;
}

.tvp-playlist-link.tvp-playlist-child .tvp-playlist-link-name {
    font-size: 12px;
}

/* Collapsible playlist sections */
.tvp-playlist-section {
    border-bottom: 1px solid rgba(0, 255, 65, 0.15);
}

.tvp-playlist-section:last-child {
    border-bottom: none;
}

.tvp-collapsible-header {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(0, 255, 65, 0.1);
    transition: background 0.2s;
}

.tvp-collapsible-header:hover {
    background: rgba(0, 255, 65, 0.08);
}

.tvp-section-toggle {
    margin-right: 8px;
    font-size: 10px;
    color: var(--tvp-accent);
    width: 12px;
}

.tvp-section-name {
    flex: 1;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tvp-accent);
}

.tvp-section-count {
    font-size: 11px;
    color: var(--tvp-text-dim);
    opacity: 0.7;
}

.tvp-section-videos {
    /* Container for videos in a section */
}

/* No content messages */
.tvp-no-videos,
.tvp-no-playlists {
    padding: 40px 20px;
    text-align: center;
    color: var(--tvp-text-dim);
    font-size: 14px;
}

.tvp-loading-text {
    padding: 40px 20px;
    text-align: center;
    color: var(--tvp-accent);
    font-size: 14px;
}

/* Video description */
.tvp-video-description {
    margin-top: 12px;
    font-size: 13px;
    color: var(--tvp-text-dim);
    line-height: 1.5;
}

/* Load more */
.tvp-load-more {
    text-align: center;
    margin-top: 24px;
    margin-bottom: 15px;
}

.tvp-load-more-btn {
    background: var(--tvp-bg-panel);
    border: 2px solid var(--tvp-border);
    color: var(--tvp-accent);
    font-family: inherit;
    font-size: 13px;
    padding: 12px 32px;
    cursor: pointer;
    transition: all 0.2s;
}

.tvp-load-more-btn:hover {
    border-color: var(--tvp-accent);
    background: #252525;
}

/* Playlist panel load more */
.tvp-playlist-load-more {
    padding: 12px;
    text-align: center;
    border-top: 1px solid var(--tvp-border);
}

.tvp-playlist-load-more-btn {
    background: var(--tvp-bg-panel);
    border: 1px solid var(--tvp-border);
    color: var(--tvp-accent);
    padding: 8px 16px;
    font-family: var(--tvp-font-mono);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.tvp-playlist-load-more-btn:hover {
    border-color: var(--tvp-accent);
    background: #252525;
}

/* Active video card */
.tvp-video-card.active {
    border-color: var(--tvp-accent);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

/* Sidebar layout fix */
.tvp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Header user controls fix */
.tvp-user-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tvp-action-btn.primary {
    background: var(--tvp-accent-dim);
    color: #000;
    font-weight: bold;
}

.tvp-action-btn.primary:hover {
    background: var(--tvp-accent);
}

/* ==========================================
   FOOTER STYLES
   ========================================== */

/* Copyright inherits default footer styling */