/*
Theme Name: VideoHub Gallery
Theme URI: https://example.com/videohub
Author: VideoHub
Author URI: https://example.com
Description: A modern video gallery theme with grid layout, video player, filtering, and tag-based organization. Perfect for video portfolios and galleries.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: videohub
Tags: video, gallery, portfolio, grid-layout, custom-colors, custom-logo, featured-images

VideoHub Gallery WordPress Theme, Copyright 2024
*/

:root {
    --vh-primary: #6366f1;
    --vh-primary-dark: #4f46e5;
    --vh-secondary: #10b981;
    --vh-background: #0f0f0f;
    --vh-surface: #1a1a1a;
    --vh-surface-hover: #252525;
    --vh-text: #ffffff;
    --vh-text-muted: #a0a0a0;
    --vh-border: #333333;
    --vh-card-radius: 12px;
    --vh-transition: 0.2s ease;
    --vh-sidebar-width: 240px;
    --vh-header-height: 56px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--vh-background);
    color: var(--vh-text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--vh-transition);
}

/* ============================================
   HEADER - YouTube-like Top Bar
   ============================================ */
.vh-header {
    background: var(--vh-surface);
    border-bottom: 1px solid var(--vh-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--vh-header-height);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.vh-header-inner {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 16px;
}

.vh-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.vh-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.vh-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.vh-menu-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--vh-text);
    cursor: pointer;
    transition: background var(--vh-transition);
}

.vh-menu-toggle:hover {
    background: var(--vh-surface-hover);
}

.vh-menu-toggle svg {
    width: 24px;
    height: 24px;
}

.vh-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--vh-text);
}

.vh-logo .custom-logo-link {
    display: flex;
    align-items: center;
}

.vh-logo .custom-logo,
.vh-logo img {
    max-height: 32px;
    width: auto;
    height: auto;
    max-width: 150px;
    object-fit: contain;
}

.vh-logo-icon {
    width: 28px;
    height: 28px;
    background: var(--vh-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vh-logo-icon svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.vh-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.vh-search-wrapper {
    display: flex;
    width: 100%;
    max-width: 560px;
}

.vh-search-form {
    display: flex;
    flex: 1;
}

.vh-search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--vh-border);
    border-right: none;
    border-radius: 20px 0 0 20px;
    background: var(--vh-background);
    color: var(--vh-text);
    font-size: 1rem;
    outline: none;
}

.vh-search-input:focus {
    border-color: var(--vh-primary);
}

.vh-search-input::placeholder {
    color: var(--vh-text-muted);
}

.vh-search-btn {
    width: 64px;
    background: var(--vh-surface-hover);
    border: 1px solid var(--vh-border);
    border-left: none;
    border-radius: 0 20px 20px 0;
    color: var(--vh-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--vh-transition);
}

.vh-search-btn:hover {
    background: var(--vh-border);
}

.vh-search-btn svg {
    width: 20px;
    height: 20px;
}

.vh-icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--vh-text);
    cursor: pointer;
    transition: background var(--vh-transition);
}

.vh-icon-btn:hover {
    background: var(--vh-surface-hover);
}

.vh-icon-btn svg {
    width: 24px;
    height: 24px;
}

.vh-notification-btn {
    position: relative;
}

.vh-user-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--vh-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.vh-user-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   LAYOUT - Sidebar + Main Content
   ============================================ */
.vh-layout {
    display: flex;
    padding-top: calc(var(--vh-header-height) + 20px);
    min-height: 100vh;
}

/* WordPress Admin Bar Adjustments */
.admin-bar .vh-header {
    top: 32px;
}

.admin-bar .vh-layout {
    padding-top: calc(var(--vh-header-height) + 32px + 20px);
}

.admin-bar .vh-sidebar {
    top: calc(var(--vh-header-height) + 32px);
    height: calc(100vh - var(--vh-header-height) - 32px);
}

@media (max-width: 782px) {
    .admin-bar .vh-header {
        top: 46px;
    }
    
    .admin-bar .vh-layout {
        padding-top: calc(var(--vh-header-height) + 46px + 20px);
    }
    
    .admin-bar .vh-sidebar {
        top: calc(var(--vh-header-height) + 46px);
        height: calc(100vh - var(--vh-header-height) - 46px);
    }
}

/* ============================================
   SIDEBAR - YouTube-like Navigation
   ============================================ */
.vh-sidebar {
    position: fixed;
    top: var(--vh-header-height);
    left: 0;
    width: var(--vh-sidebar-width);
    height: calc(100vh - var(--vh-header-height));
    background: var(--vh-surface);
    border-right: 1px solid var(--vh-border);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 90;
    padding: 20px 0 12px 0;
}

.vh-sidebar-open .vh-sidebar {
    transform: translateX(0);
}

@media (min-width: 1312px) {
    .vh-sidebar {
        transform: translateX(0);
    }
    
    .vh-main-content {
        margin-left: var(--vh-sidebar-width);
    }
}

.vh-sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0 12px;
}

.vh-sidebar-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--vh-text);
    font-size: 0.875rem;
    transition: background var(--vh-transition);
}

.vh-sidebar-item:hover {
    background: var(--vh-surface-hover);
}

.vh-sidebar-item.active {
    background: var(--vh-surface-hover);
    font-weight: 600;
}

.vh-sidebar-item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.vh-sidebar-divider {
    height: 1px;
    background: var(--vh-border);
    margin: 12px 0;
}

.vh-sidebar-section {
    padding: 0 12px;
}

.vh-sidebar-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--vh-text);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--vh-transition);
}

.vh-sidebar-section-toggle:hover {
    background: var(--vh-surface-hover);
}

.vh-sidebar-section-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.vh-sidebar-section-toggle[aria-expanded="true"] svg {
    transform: rotate(90deg);
}

.vh-sidebar-folders {
    display: flex;
    flex-direction: column;
    margin-top: 4px;
}

.vh-folder-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vh-folder-count {
    font-size: 0.75rem;
    color: var(--vh-text-muted);
    background: var(--vh-background);
    padding: 2px 8px;
    border-radius: 10px;
}

.vh-sidebar-overlay {
    position: fixed;
    top: var(--vh-header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 80;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vh-sidebar-open .vh-sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 1312px) {
    .vh-sidebar-overlay {
        display: none;
    }
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.vh-main-content {
    flex: 1;
    padding: 24px;
    min-width: 0;
}

.vh-main {
    flex: 1;
    padding: 24px;
    min-width: 0;
    max-width: 1800px;
}

@media (min-width: 1312px) {
    .vh-main {
        margin-left: var(--vh-sidebar-width);
    }
}

.vh-container {
    max-width: 1800px;
    margin: 0 auto;
}

/* ============================================
   CHIP-STYLE TAG FILTERS
   ============================================ */
.vh-tags-filter {
    padding: 0 0 24px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.vh-tags-filter::-webkit-scrollbar {
    display: none;
}

.vh-tags-scroll {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
}

.vh-tags-list {
    display: flex;
    gap: 12px;
    list-style: none;
    flex-wrap: nowrap;
}

.vh-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--vh-surface);
    border: none;
    border-radius: 8px;
    color: var(--vh-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--vh-transition);
}

.vh-chip:hover {
    background: var(--vh-surface-hover);
}

.vh-chip.active {
    background: var(--vh-text);
    color: var(--vh-background);
}

.vh-tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--vh-surface);
    border: 1px solid var(--vh-border);
    border-radius: 20px;
    color: var(--vh-text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--vh-transition);
}

.vh-tag:hover,
.vh-tag.active {
    background: var(--vh-primary);
    border-color: var(--vh-primary);
    color: var(--vh-text);
}

/* ============================================
   VIDEO GRID
   ============================================ */
.vh-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

@media (min-width: 600px) {
    .vh-video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .vh-video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .vh-video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1600px) {
    .vh-video-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ============================================
   VIDEO CARD - YouTube-like Style
   ============================================ */
.vh-video-card {
    display: block;
    cursor: pointer;
    transition: transform var(--vh-transition);
}

.vh-video-card:hover {
    transform: scale(1.02);
}

.vh-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.vh-thumbnail-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--vh-card-radius);
    background: var(--vh-surface);
}

.vh-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vh-video-card:hover .vh-thumbnail {
    transform: scale(1.05);
}

.vh-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--vh-text);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.vh-watch-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--vh-primary);
    border-radius: 0 0 0 var(--vh-card-radius);
    transition: width 0.3s ease;
}

.vh-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--vh-transition);
}

.vh-video-card:hover .vh-play-overlay {
    opacity: 1;
}

.vh-play-overlay svg {
    width: 24px;
    height: 24px;
    fill: white;
    margin-left: 4px;
}

.vh-video-info {
    display: flex;
    gap: 12px;
    padding: 12px 0;
}

.vh-channel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--vh-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vh-channel-avatar svg {
    width: 20px;
    height: 20px;
    color: var(--vh-text-muted);
}

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

.vh-video-title {
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--vh-text);
    line-height: 1.4;
}

.vh-video-channel {
    font-size: 0.875rem;
    color: var(--vh-text-muted);
    margin-bottom: 2px;
}

.vh-video-channel:hover {
    color: var(--vh-text);
}

.vh-video-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.875rem;
    color: var(--vh-text-muted);
}

.vh-meta-separator {
    margin: 0 4px;
}

.vh-video-views,
.vh-video-date {
    display: inline;
}

.vh-video-tags {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.vh-video-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    padding: 4px 8px;
    background: var(--vh-surface);
    border-radius: 4px;
    color: var(--vh-text-muted);
}

.vh-tag-icon {
    width: 12px;
    height: 12px;
}

.vh-tag-more {
    font-size: 0.75rem;
    color: var(--vh-text-muted);
    padding: 4px;
}

/* ============================================
   VIDEO MODAL/PLAYER
   ============================================ */
.vh-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vh-modal.active {
    display: flex;
}

.vh-modal-content {
    max-width: 1200px;
    width: 100%;
    background: var(--vh-surface);
    border-radius: var(--vh-card-radius);
    overflow: hidden;
}

.vh-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--vh-surface);
    border: none;
    border-radius: 50%;
    color: var(--vh-text);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--vh-transition);
}

.vh-modal-close:hover {
    background: var(--vh-surface-hover);
}

.vh-player-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
}

.vh-player-wrapper video,
.vh-player-wrapper iframe {
    width: 100%;
    height: 100%;
}

.vh-modal-info {
    padding: 20px;
}

.vh-modal-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.vh-modal-description {
    color: var(--vh-text-muted);
    margin-bottom: 15px;
}

/* ============================================
   PAGINATION - YouTube-like Style
   ============================================ */
.vh-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 40px 0;
}

.vh-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--vh-surface);
    border: 1px solid var(--vh-border);
    border-radius: 20px;
    color: var(--vh-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--vh-transition);
}

.vh-page-btn:hover:not(:disabled) {
    background: var(--vh-surface-hover);
    border-color: var(--vh-primary);
}

.vh-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vh-page-btn svg {
    width: 16px;
    height: 16px;
}

.vh-page-numbers {
    display: flex;
    gap: 4px;
}

.vh-page-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: transparent;
    border: none;
    border-radius: 20px;
    color: var(--vh-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--vh-transition);
}

.vh-page-num:hover {
    background: var(--vh-surface-hover);
}

.vh-page-num.current {
    background: var(--vh-primary);
    color: white;
}

.vh-page-link {
    padding: 10px 18px;
    background: var(--vh-surface);
    border: 1px solid var(--vh-border);
    border-radius: 8px;
    color: var(--vh-text);
    font-weight: 500;
    transition: all var(--vh-transition);
}

.vh-page-link:hover,
.vh-page-link.current {
    background: var(--vh-primary);
    border-color: var(--vh-primary);
}

/* ============================================
   BUTTONS
   ============================================ */
.vh-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: var(--vh-primary);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--vh-transition);
}

.vh-btn-primary:hover {
    background: var(--vh-primary-dark);
}

/* ============================================
   FOOTER
   ============================================ */
.vh-footer {
    background: var(--vh-surface);
    border-top: 1px solid var(--vh-border);
    padding: 40px 0;
    margin-top: 50px;
}

.vh-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 24px;
}

.vh-footer-links {
    display: flex;
    gap: 20px;
}

.vh-footer-links a {
    color: var(--vh-text-muted);
}

.vh-footer-links a:hover {
    color: var(--vh-text);
}

.vh-copyright {
    color: var(--vh-text-muted);
    font-size: 0.875rem;
}

/* ============================================
   LOADING & EMPTY STATES
   ============================================ */
.vh-loading {
    display: flex;
    justify-content: center;
    padding: 50px;
}

.vh-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--vh-border);
    border-top-color: var(--vh-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.vh-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--vh-text-muted);
}

.vh-empty svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.vh-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--vh-text);
}

/* ============================================
   SINGLE VIDEO PAGE
   ============================================ */
.vh-single-player {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--vh-card-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.vh-single-player video,
.vh-single-player iframe {
    width: 100%;
    height: 100%;
}

.vh-single-info {
    padding: 20px 0;
}

.vh-single-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.vh-single-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--vh-text-muted);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.vh-single-description {
    color: var(--vh-text-muted);
    line-height: 1.7;
}

/* ============================================
   WATCH PAGE - YouTube-like Layout
   ============================================ */
.vh-main.vh-watch-page {
    padding-top: calc(var(--vh-header-height) + 24px) !important;
    margin-top: 0;
}

.admin-bar .vh-main.vh-watch-page {
    padding-top: calc(var(--vh-header-height) + 32px + 24px) !important;
}

@media (max-width: 782px) {
    .admin-bar .vh-main.vh-watch-page {
        padding-top: calc(var(--vh-header-height) + 46px + 24px) !important;
    }
}

.vh-watch-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 1024px) {
    .vh-watch-layout {
        grid-template-columns: 1fr 360px;
    }
}

@media (min-width: 1200px) {
    .vh-watch-layout {
        grid-template-columns: 1fr 400px;
    }
}

.vh-watch-player {
    min-width: 0;
}

.vh-player-container {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--vh-card-radius);
    overflow: hidden;
}

.vh-video-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.vh-watch-info {
    padding: 16px 0;
}

.vh-watch-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
    color: var(--vh-text);
}

@media (min-width: 768px) {
    .vh-watch-title {
        font-size: 1.5rem;
    }
}

.vh-watch-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--vh-border);
    margin-bottom: 16px;
}

.vh-watch-meta > span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--vh-text-muted);
    font-size: 0.875rem;
}

.vh-watch-meta svg {
    opacity: 0.7;
}

/* YouTube-style Action Bar */
.vh-watch-actions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--vh-border);
    margin-bottom: 16px;
}

.vh-channel-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.vh-watch-actions-bar .vh-channel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--vh-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--vh-transition);
}

.vh-watch-actions-bar .vh-channel-avatar:hover {
    background: var(--vh-surface-hover);
}

.vh-watch-actions-bar .vh-channel-avatar svg {
    width: 24px;
    height: 24px;
    color: var(--vh-text-muted);
}

.vh-channel-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vh-channel-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--vh-text);
    transition: color var(--vh-transition);
}

.vh-channel-name:hover {
    color: var(--vh-primary);
}

.vh-upload-date {
    font-size: 0.8125rem;
    color: var(--vh-text-muted);
}

/* Action Button Group (Like/Dislike) */
.vh-action-group {
    display: flex;
    align-items: center;
    background: var(--vh-surface);
    border-radius: 20px;
    overflow: hidden;
}

.vh-action-group .vh-action-btn {
    border-radius: 0;
    background: transparent;
}

.vh-action-group .vh-action-btn:first-child {
    border-radius: 20px 0 0 20px;
    padding-right: 12px;
}

.vh-action-group .vh-action-btn:last-child {
    border-radius: 0 20px 20px 0;
    padding-left: 12px;
}

.vh-action-group .vh-action-btn:hover {
    background: var(--vh-surface-hover);
}

.vh-action-divider {
    width: 1px;
    height: 24px;
    background: var(--vh-border);
    flex-shrink: 0;
}

.vh-action-count {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Override vh-watch-actions when inside action bar */
.vh-watch-actions-bar .vh-watch-actions {
    padding: 0;
    border-bottom: none;
    margin-bottom: 0;
}

/* Responsive adjustments for action bar */
@media (max-width: 640px) {
    .vh-watch-actions-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .vh-watch-actions-bar .vh-watch-actions {
        width: 100%;
        justify-content: flex-start;
        padding: 0;
        border-bottom: none;
        margin-bottom: 0;
    }
    
    .vh-action-btn span {
        display: none;
    }
    
    .vh-action-group .vh-action-count {
        display: inline;
    }
}

.vh-watch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid var(--vh-border);
    margin-bottom: 16px;
}

.vh-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--vh-surface);
    border: none;
    border-radius: 20px;
    color: var(--vh-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--vh-transition);
}

.vh-action-btn:hover {
    background: var(--vh-surface-hover);
}

.vh-action-btn.active {
    background: var(--vh-primary);
}

.vh-action-btn svg {
    width: 20px;
    height: 20px;
}

.vh-watch-description {
    color: var(--vh-text-muted);
    line-height: 1.7;
    padding: 16px;
    background: var(--vh-surface);
    border-radius: var(--vh-card-radius);
    margin-bottom: 16px;
}

.vh-watch-description.collapsed {
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.vh-watch-description.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, var(--vh-surface));
}

.vh-description-toggle {
    display: block;
    width: 100%;
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--vh-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
}

.vh-description-toggle:hover {
    color: var(--vh-text);
}

.vh-watch-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.vh-watch-tags .vh-video-tag {
    padding: 6px 12px;
    background: var(--vh-surface);
    border-radius: 16px;
    color: var(--vh-primary);
    font-size: 0.8125rem;
    transition: background var(--vh-transition);
}

.vh-watch-tags .vh-video-tag:hover {
    background: var(--vh-surface-hover);
}

/* Related Videos Sidebar - YouTube-style */
.vh-related-videos {
    position: sticky;
    top: calc(var(--vh-header-height) + 24px);
    max-height: calc(100vh - var(--vh-header-height) - 48px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--vh-border) transparent;
    padding-right: 4px;
}

.vh-related-videos::-webkit-scrollbar {
    width: 6px;
}

.vh-related-videos::-webkit-scrollbar-track {
    background: transparent;
}

.vh-related-videos::-webkit-scrollbar-thumb {
    background: var(--vh-border);
    border-radius: 3px;
}

.vh-related-videos::-webkit-scrollbar-thumb:hover {
    background: var(--vh-text-muted);
}

.vh-related-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--vh-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.vh-related-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--vh-primary);
    border-radius: 2px;
}

.vh-related-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vh-related-item {
    display: flex;
    gap: 8px;
    padding: 4px;
    border-radius: 12px;
    transition: background var(--vh-transition), transform 0.15s ease;
    position: relative;
}

.vh-related-item:hover {
    background: var(--vh-surface);
}

.vh-related-item:active {
    transform: scale(0.99);
}

.vh-related-thumb {
    position: relative;
    width: 168px;
    flex-shrink: 0;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: var(--vh-surface);
    transition: box-shadow 0.2s ease;
}

.vh-related-item:hover .vh-related-thumb {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.vh-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vh-related-item:hover .vh-related-thumb img {
    transform: scale(1.05);
}

.vh-related-thumb .vh-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 4px;
    letter-spacing: 0.3px;
}

/* Progress bar for watched videos */
.vh-related-thumb .vh-watch-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--vh-primary);
    border-radius: 0 0 0 8px;
}

.vh-related-info {
    flex: 1;
    min-width: 0;
    padding: 2px 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.vh-related-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--vh-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    transition: color var(--vh-transition);
}

.vh-related-item:hover .vh-related-item-title {
    color: var(--vh-primary);
}

.vh-related-channel {
    font-size: 0.75rem;
    color: var(--vh-text-muted);
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vh-related-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--vh-text-muted);
}

.vh-related-views {
    font-size: 0.75rem;
    color: var(--vh-text-muted);
}

.vh-related-meta-separator {
    font-size: 0.625rem;
}

/* Autoplay next indicator */
.vh-related-item.vh-next-video {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.vh-related-item.vh-next-video::before {
    content: 'Up next';
    position: absolute;
    top: -10px;
    left: 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--vh-primary);
    background: var(--vh-background);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Back Link */
.vh-back-link {
    padding: 24px 0;
}

.vh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--vh-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--vh-transition);
}

.vh-btn:hover {
    background: var(--vh-primary-dark);
}

.vh-btn-outline {
    background: transparent;
    border: 1px solid var(--vh-border);
    color: var(--vh-text);
}

.vh-btn-outline:hover {
    background: var(--vh-surface);
    border-color: var(--vh-primary);
}

/* Speed Control Dropdown */
.vh-speed-control {
    position: relative;
}

.vh-speed-dropdown {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--vh-surface);
    border: 1px solid var(--vh-border);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 100px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 10;
}

.vh-speed-control:hover .vh-speed-dropdown {
    display: block;
}

.vh-speed-option {
    display: block;
    width: 100%;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--vh-text);
    font-size: 0.875rem;
    text-align: center;
    cursor: pointer;
}

.vh-speed-option:hover {
    background: var(--vh-surface-hover);
}

.vh-speed-option.active {
    color: var(--vh-primary);
    font-weight: 600;
}

/* Share Modal */
.vh-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.vh-share-modal.active {
    display: flex;
}

.vh-share-content {
    background: var(--vh-surface);
    border-radius: var(--vh-card-radius);
    padding: 24px;
    max-width: 500px;
    width: 100%;
}

.vh-share-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.vh-share-url {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.vh-share-url input {
    flex: 1;
    padding: 10px 14px;
    background: var(--vh-background);
    border: 1px solid var(--vh-border);
    border-radius: 8px;
    color: var(--vh-text);
    font-size: 0.875rem;
}

.vh-share-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.vh-share-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: transform var(--vh-transition);
}

.vh-share-btn:hover {
    transform: scale(1.1);
}

.vh-share-btn.facebook { background: #1877f2; color: white; }
.vh-share-btn.twitter { background: #1da1f2; color: white; }
.vh-share-btn.linkedin { background: #0a66c2; color: white; }
.vh-share-btn.whatsapp { background: #25d366; color: white; }

/* Keyboard Shortcuts Tooltip */
.vh-shortcuts-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--vh-surface);
    border: 1px solid var(--vh-border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.8125rem;
    color: var(--vh-text-muted);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 50;
}

.vh-shortcuts-hint.visible {
    opacity: 1;
}

.vh-shortcuts-hint kbd {
    background: var(--vh-background);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 4px;
    font-family: monospace;
}

/* ============================================
   MOBILE-FIRST BASE STYLES
   ============================================ */

/* Touch-friendly minimum tap targets (44px recommended) */
.vh-touch-target {
    min-width: 44px;
    min-height: 44px;
}

/* Smooth hardware-accelerated transitions */
.vh-video-card,
.vh-sidebar-item,
.vh-action-btn,
.vh-chip,
.vh-related-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Better focus states for accessibility */
*:focus-visible {
    outline: 2px solid var(--vh-primary);
    outline-offset: 2px;
}

/* Safe area padding for notched devices */
@supports (padding: max(0px)) {
    .vh-header {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
    
    .vh-main,
    .vh-main-content {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
    
    .vh-footer {
        padding-bottom: max(40px, env(safe-area-inset-bottom));
    }
}

/* ============================================
   RESPONSIVE - Mobile First Approach
   ============================================ */

/* Extra Small Devices (phones < 480px) */
@media (max-width: 480px) {
    :root {
        --vh-header-height: 52px;
        --vh-card-radius: 8px;
    }
    
    .vh-header {
        padding: 0 8px;
    }
    
    .vh-header-inner {
        gap: 8px;
    }
    
    .vh-header-left {
        gap: 8px;
    }
    
    .vh-header-center {
        display: none;
    }
    
    .vh-logo-text {
        display: none;
    }
    
    .vh-header-right {
        gap: 2px;
    }
    
    /* Larger touch targets for mobile */
    .vh-menu-toggle,
    .vh-icon-btn {
        width: 44px;
        height: 44px;
    }
    
    .vh-menu-toggle svg,
    .vh-icon-btn svg {
        width: 22px;
        height: 22px;
    }
    
    .vh-user-btn {
        width: 32px;
        height: 32px;
        margin-left: 4px;
    }
    
    .vh-main,
    .vh-main-content {
        padding: 12px;
    }
    
    /* Single column video grid on small phones */
    .vh-video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Larger video cards on mobile for better visibility */
    .vh-video-card {
        margin-bottom: 4px;
    }
    
    .vh-thumbnail-wrapper {
        border-radius: var(--vh-card-radius);
    }
    
    .vh-video-info {
        padding: 10px 4px;
        gap: 10px;
    }
    
    .vh-video-title {
        font-size: 0.9375rem;
        line-height: 1.35;
        margin-bottom: 6px;
    }
    
    .vh-video-meta {
        font-size: 0.8125rem;
    }
    
    /* Tags filter horizontal scroll improvements */
    .vh-tags-filter {
        padding: 0 0 16px 0;
        margin: 0 -12px;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .vh-tags-scroll {
        gap: 8px;
    }
    
    .vh-chip {
        padding: 10px 14px;
        font-size: 0.8125rem;
        border-radius: 16px;
        flex-shrink: 0;
    }
    
    /* Pagination touch-friendly */
    .vh-pagination {
        padding: 24px 0;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .vh-page-btn {
        padding: 12px 16px;
        font-size: 0.8125rem;
        min-height: 44px;
    }
    
    .vh-page-num {
        min-width: 44px;
        height: 44px;
        padding: 0 10px;
        font-size: 0.875rem;
    }
    
    .vh-page-numbers {
        gap: 2px;
    }
    
    /* Footer mobile adjustments */
    .vh-footer {
        padding: 24px 12px;
        margin-top: 32px;
    }
    
    .vh-footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 0;
    }
    
    .vh-footer-links {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Watch page mobile improvements */
    .vh-watch-page {
        padding-top: 12px;
    }
    
    .vh-watch-title {
        font-size: 1.125rem;
        line-height: 1.35;
        margin-bottom: 10px;
    }
    
    .vh-watch-meta {
        gap: 12px;
        padding: 10px 0;
    }
    
    .vh-watch-meta > span {
        font-size: 0.8125rem;
    }
    
    /* YouTube-style action bar mobile */
    .vh-watch-actions-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0;
    }
    
    .vh-channel-info {
        gap: 10px;
    }
    
    .vh-watch-actions-bar .vh-channel-avatar {
        width: 36px;
        height: 36px;
    }
    
    .vh-watch-actions-bar .vh-channel-avatar svg {
        width: 20px;
        height: 20px;
    }
    
    .vh-channel-name {
        font-size: 0.875rem;
    }
    
    .vh-upload-date {
        font-size: 0.75rem;
    }
    
    .vh-action-group {
        border-radius: 18px;
    }
    
    .vh-action-group .vh-action-btn:first-child {
        border-radius: 18px 0 0 18px;
    }
    
    .vh-action-group .vh-action-btn:last-child {
        border-radius: 0 18px 18px 0;
    }
    
    .vh-action-divider {
        height: 20px;
    }
    
    .vh-watch-actions {
        gap: 6px;
        padding: 10px 0;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin: 0 -12px;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .vh-watch-actions::-webkit-scrollbar {
        display: none;
    }
    
    .vh-action-btn {
        padding: 10px 14px;
        font-size: 0.8125rem;
        min-height: 44px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .vh-action-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .vh-watch-description {
        padding: 12px;
        font-size: 0.875rem;
        border-radius: 8px;
    }
    
    /* Related videos - vertical list on small phones */
    .vh-related-videos {
        position: static;
        max-height: none;
        overflow: visible;
        margin-top: 24px;
        padding: 0;
    }
    
    .vh-related-title {
        font-size: 0.9375rem;
        margin-bottom: 12px;
    }
    
    .vh-related-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow: visible;
        margin: 0;
        padding: 0;
    }
    
    .vh-related-item {
        flex-direction: row;
        min-width: auto;
        max-width: none;
        padding: 8px;
        min-height: 48px;
        border-radius: 8px;
    }
    
    .vh-related-thumb {
        width: 120px;
        flex-shrink: 0;
    }
    
    .vh-related-info {
        padding: 4px 0;
    }
    
    .vh-related-item-title {
        font-size: 0.8125rem;
        margin-top: 0;
        margin-bottom: 4px;
    }
    
    .vh-related-channel,
    .vh-related-views,
    .vh-related-date {
        font-size: 0.6875rem;
    }
    
    /* Hide "Up next" badge on mobile */
    .vh-related-item.vh-next-video::before {
        display: none;
    }
    
    .vh-related-item.vh-next-video {
        background: var(--vh-surface);
        border: none;
    }
    
    /* Modal improvements for mobile */
    .vh-modal {
        padding: 0;
    }
    
    .vh-modal-content {
        border-radius: 0;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .vh-modal-close {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
        z-index: 10;
    }
    
    .vh-modal-info {
        padding: 16px;
    }
    
    .vh-modal-title {
        font-size: 1.0625rem;
    }
    
    /* Share modal mobile */
    .vh-share-content {
        margin: 12px;
        padding: 20px 16px;
        border-radius: 12px;
    }
    
    .vh-share-title {
        font-size: 1.125rem;
    }
    
    .vh-share-url {
        flex-direction: column;
    }
    
    .vh-share-url input {
        font-size: 0.8125rem;
    }
    
    .vh-share-buttons {
        gap: 16px;
    }
    
    .vh-share-btn {
        width: 52px;
        height: 52px;
    }
    
    /* Continue watching mobile */
    .vh-continue-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    
    .vh-continue-title {
        font-size: 0.8125rem;
    }
    
    /* Shortcuts hint hidden on mobile */
    .vh-shortcuts-hint {
        display: none;
    }
}

/* Small Devices (phones 481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .vh-header {
        padding: 0 12px;
    }
    
    .vh-header-center {
        display: none;
    }
    
    .vh-logo-text {
        display: none;
    }
    
    .vh-main,
    .vh-main-content {
        padding: 16px;
    }
    
    /* Two column grid on larger phones */
    .vh-video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .vh-video-title {
        font-size: 0.875rem;
    }
    
    .vh-video-meta {
        font-size: 0.8125rem;
    }
    
    .vh-tags-filter {
        padding: 0 0 20px 0;
    }
    
    .vh-chip {
        padding: 10px 16px;
    }
    
    .vh-footer-inner {
        flex-direction: column;
        text-align: center;
    }
    
    /* Watch page */
    .vh-watch-title {
        font-size: 1.25rem;
    }
    
    /* Related videos - flow naturally on tablets */
    .vh-related-videos {
        position: static;
        max-height: none;
        overflow: visible;
        margin-top: 24px;
    }
    
    .vh-related-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        overflow: visible;
    }
    
    .vh-related-item {
        flex-direction: row;
        padding: 8px;
        min-height: 48px;
    }
    
    .vh-related-thumb {
        width: 140px;
    }
    
    .vh-action-btn {
        padding: 10px 16px;
        min-height: 44px;
    }
    
    .vh-related-item {
        flex-direction: row;
    }
    
    .vh-related-thumb {
        width: 140px;
    }
}

/* Medium Devices (tablets 769px - 1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
    .vh-header-center {
        max-width: 400px;
    }
    
    .vh-search-wrapper {
        max-width: 400px;
    }
    
    .vh-main,
    .vh-main-content {
        padding: 20px;
    }
    
    .vh-video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .vh-video-title {
        font-size: 0.875rem;
    }
}

/* ============================================
   DESKTOP STYLES (769px+)
   ============================================ */
@media (min-width: 769px) {
    /* Hide mobile-only elements on desktop */
    .vh-mobile-search-btn,
    .vh-bottom-nav {
        display: none !important;
    }
    
    /* Desktop header refinements */
    .vh-header {
        padding: 0 24px;
    }
    
    .vh-header-inner {
        gap: 24px;
    }
    
    .vh-header-left {
        gap: 20px;
    }
    
    .vh-header-center {
        display: flex;
        flex: 1;
        max-width: 640px;
    }
    
    .vh-search-wrapper {
        max-width: 100%;
    }
    
    .vh-search-input {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .vh-search-btn {
        width: 72px;
    }
    
    .vh-header-right {
        gap: 12px;
    }
    
    /* Desktop video grid spacing */
    .vh-video-grid {
        gap: 20px;
    }
    
    /* Desktop video card hover effects */
    .vh-video-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .vh-video-card:hover {
        transform: translateY(-4px);
    }
    
    .vh-thumbnail-wrapper {
        transition: box-shadow 0.2s ease;
    }
    
    .vh-video-card:hover .vh-thumbnail-wrapper {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }
    
    /* Desktop play overlay - only show on hover */
    .vh-play-overlay {
        opacity: 0;
        width: 64px;
        height: 64px;
    }
    
    .vh-play-overlay svg {
        width: 28px;
        height: 28px;
    }
    
    .vh-video-card:hover .vh-play-overlay {
        opacity: 1;
    }
    
    /* Desktop footer */
    .vh-footer {
        padding: 48px 24px;
    }
    
    .vh-footer-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* ============================================
   LARGE DESKTOP (1024px+)
   ============================================ */
@media (min-width: 1024px) {
    .vh-header {
        padding: 0 32px;
    }
    
    .vh-header-center {
        max-width: 720px;
    }
    
    .vh-main,
    .vh-main-content {
        padding: 28px 32px;
    }
    
    /* Refined video info on desktop */
    .vh-video-info {
        padding: 14px 0;
    }
    
    .vh-video-title {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    /* Watch page desktop layout */
    .vh-watch-layout {
        gap: 32px;
    }
    
    .vh-watch-title {
        font-size: 1.5rem;
    }
    
    .vh-watch-actions {
        gap: 12px;
    }
    
    .vh-action-btn {
        padding: 10px 20px;
    }
}

/* ============================================
   EXTRA LARGE DESKTOP (1440px+)
   ============================================ */
@media (min-width: 1440px) {
    .vh-header-center {
        max-width: 800px;
    }
    
    .vh-main,
    .vh-main-content {
        padding: 32px 48px;
    }
    
    .vh-video-grid {
        gap: 24px;
    }
    
    .vh-video-title {
        font-size: 1.0625rem;
    }
    
    /* Related videos sidebar - larger thumbnails */
    .vh-related-thumb {
        width: 180px;
    }
}

/* Mobile Search Modal - Enhanced */
.vh-mobile-search {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--vh-surface);
    padding: 8px 12px;
    z-index: 110;
    border-bottom: 1px solid var(--vh-border);
}

@supports (padding: max(0px)) {
    .vh-mobile-search {
        padding-top: max(8px, env(safe-area-inset-top));
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
}

.vh-mobile-search.active {
    display: flex;
    gap: 12px;
    align-items: center;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vh-mobile-search .vh-search-wrapper {
    flex: 1;
}

.vh-mobile-search .vh-search-input {
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 1rem;
}

.vh-mobile-search .vh-search-btn {
    border-radius: 0 24px 24px 0;
    width: 52px;
}

.vh-mobile-search-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--vh-text);
    cursor: pointer;
    transition: background var(--vh-transition);
    flex-shrink: 0;
}

.vh-mobile-search-close:hover {
    background: var(--vh-surface-hover);
}

.vh-mobile-search-close svg {
    width: 24px;
    height: 24px;
}

/* Mobile search button in header */
.vh-mobile-search-btn {
    display: none;
}

@media (max-width: 768px) {
    .vh-mobile-search-btn {
        display: flex;
    }
}

/* ============================================
   SIDEBAR MOBILE IMPROVEMENTS
   ============================================ */
@media (max-width: 1311px) {
    .vh-sidebar {
        width: min(280px, 85vw);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .vh-sidebar-nav {
        padding: 0 8px;
    }
    
    .vh-sidebar-item {
        padding: 14px 16px;
        gap: 20px;
        border-radius: 12px;
        min-height: 48px;
    }
    
    .vh-sidebar-item svg {
        width: 22px;
        height: 22px;
    }
    
    .vh-sidebar-section {
        padding: 0 8px;
    }
    
    .vh-sidebar-section-toggle {
        padding: 14px 16px;
        border-radius: 12px;
        min-height: 48px;
    }
    
    .vh-sidebar-folders .vh-sidebar-item {
        padding-left: 24px;
    }
    
    .vh-sidebar-overlay {
        backdrop-filter: blur(2px);
    }
}

/* ============================================
   VIDEO CARD MOBILE ENHANCEMENTS
   ============================================ */
@media (max-width: 768px) {
    /* Disable hover effects on touch devices */
    .vh-video-card:hover {
        transform: none;
    }
    
    .vh-video-card:hover .vh-thumbnail {
        transform: none;
    }
    
    /* Show play overlay on all cards for touch */
    .vh-play-overlay {
        opacity: 0.9;
        width: 50px;
        height: 50px;
    }
    
    .vh-play-overlay svg {
        width: 20px;
        height: 20px;
    }
    
    /* Active state for touch feedback */
    .vh-video-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .vh-video-card:active .vh-thumbnail-wrapper {
        opacity: 0.9;
    }
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

/* Smooth page transitions */
.vh-main,
.vh-main-content {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Skeleton loading animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.vh-skeleton {
    background: linear-gradient(
        90deg,
        var(--vh-surface) 25%,
        var(--vh-surface-hover) 50%,
        var(--vh-surface) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Pull to refresh indicator styles */
.vh-pull-refresh {
    position: fixed;
    top: var(--vh-header-height);
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    padding: 12px 20px;
    background: var(--vh-surface);
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 90;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.vh-pull-refresh.visible {
    transform: translateX(-50%) translateY(12px);
    opacity: 1;
}

/* ============================================
   IMPROVED SCROLLBARS FOR MOBILE
   ============================================ */
@media (max-width: 768px) {
    /* Hide scrollbars on mobile for cleaner look */
    ::-webkit-scrollbar {
        width: 0;
        height: 0;
    }
    
    /* But show thin scrollbar on sidebar */
    .vh-sidebar::-webkit-scrollbar {
        width: 4px;
    }
    
    .vh-sidebar::-webkit-scrollbar-thumb {
        background: var(--vh-border);
        border-radius: 2px;
    }
}

/* Desktop scrollbar styling */
@media (min-width: 769px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    ::-webkit-scrollbar-track {
        background: var(--vh-background);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--vh-border);
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--vh-text-muted);
    }
}

/* ============================================
   BOTTOM NAVIGATION (MOBILE)
   ============================================ */
.vh-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--vh-surface);
    border-top: 1px solid var(--vh-border);
    z-index: 100;
    padding: 8px 0;
}

@supports (padding: max(0px)) {
    .vh-bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .vh-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    /* Add bottom padding to main content when bottom nav is visible */
    .vh-main,
    .vh-main-content {
        padding-bottom: 80px;
    }
}

.vh-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    color: var(--vh-text-muted);
    text-decoration: none;
    font-size: 0.6875rem;
    transition: color var(--vh-transition);
    -webkit-tap-highlight-color: transparent;
}

.vh-bottom-nav-item:active {
    transform: scale(0.95);
}

.vh-bottom-nav-item.active {
    color: var(--vh-primary);
}

.vh-bottom-nav-item svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   LOADING STATES IMPROVEMENTS
   ============================================ */
.vh-loading {
    padding: 40px 20px;
}

.vh-spinner {
    width: 36px;
    height: 36px;
    border-width: 3px;
}

/* Inline loading indicator */
.vh-loading-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--vh-surface);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--vh-text-muted);
}

.vh-loading-inline .vh-spinner {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .vh-video-card:hover,
    .vh-video-card:active {
        transform: none !important;
    }
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    :root {
        --vh-border: #888888;
        --vh-text-muted: #dddddd;
        --vh-surface: #1a1a1a;
        --vh-surface-hover: #2a2a2a;
    }
    
    .vh-video-card,
    .vh-chip,
    .vh-action-btn {
        border: 1px solid var(--vh-border);
    }
}

/* ============================================
   ARCHIVE HEADER STYLES
   ============================================ */
.vh-archive-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--vh-border);
}

.vh-archive-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.vh-archive-title svg {
    color: var(--vh-primary);
}

.vh-archive-count {
    color: var(--vh-text-muted);
    font-size: 0.875rem;
}

/* ============================================
   LANDSCAPE MOBILE ADJUSTMENTS
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .vh-header {
        height: 48px;
    }
    
    .vh-layout {
        padding-top: 48px;
    }
    
    .vh-video-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .vh-watch-layout {
        grid-template-columns: 1fr;
    }
    
    .vh-player-container {
        max-height: 60vh;
    }
}
