/* 
 * style.css - Premium Dark-Theme Stylesheet for Veloce Hub
 * 
 * Implements a modern dark color palette, glassmorphism, responsive grids, 
 * hover zoom/preview animations, and mobile layouts.
 */

:root {
    --bg-dark: #070709;
    --bg-surface: #121217;
    --bg-surface-hover: #1b1b22;
    --bg-glass: rgba(18, 18, 23, 0.75);
    
    --color-primary: #ff2a5f;
    --color-primary-hover: #e01e4e;
    --color-accent: #ff9f1c;
    --color-text-main: #f0f0f5;
    --color-text-muted: #8e8e9f;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 42, 95, 0.4);
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-quick: all 0.15s ease;
    
    --shadow-premium: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 10px 25px rgba(255, 42, 95, 0.15);
}

/* Reset & Basics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    position: relative;
}

body {
    background-color: var(--bg-dark);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

button, input {
    font-family: inherit;
    color: inherit;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #252533;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

/* Main Sticky Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-container {
    max-width: 1440px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Logo Area */
.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: 2px;
    color: #ffffff;
}
.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--color-primary), #ff6b8b);
    color: white;
    border-radius: 10px;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(255, 42, 95, 0.3);
}
.logo-text {
    background: linear-gradient(to right, #ffffff, #dcdcdf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Modern Search Box */
.search-form {
    flex: 1;
    max-width: 480px;
}
.search-box {
    position: relative;
    width: 100%;
    height: 44px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: var(--transition-quick);
}
.search-box:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(255, 42, 95, 0.2);
}
.search-icon {
    color: var(--color-text-muted);
    font-size: 16px;
    margin-right: 12px;
}
.search-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    color: #ffffff;
}
.search-box input::placeholder {
    color: var(--color-text-muted);
}
.clear-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 16px;
    display: none;
    padding: 4px;
}
.clear-btn:hover {
    color: #ffffff;
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-muted);
    transition: var(--transition-quick);
}
.nav-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}
.nav-btn.active {
    color: #ffffff;
    background: var(--color-primary);
    box-shadow: 0 4px 12px rgba(255, 42, 95, 0.3);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    position: relative;
    z-index: 160;
}

/* Mobile Dropdown Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-premium);
}
.mobile-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--color-text-muted);
}
.mobile-nav-btn.active {
    color: white;
    background: var(--color-primary);
}

/* Main Content Wrapper */
.content-wrapper {
    flex: 1;
    margin-top: 72px;
    min-height: calc(100vh - 144px);
    display: flex;
    flex-direction: column;
}

/* Filtering & Strip Styling */
.filter-strip {
    background-color: var(--bg-dark);
    padding: 24px 0 12px 0;
}
.strip-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.section-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
    color: #ffffff;
}

/* Horizontal pill tag carousel */
.popular-tags {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.popular-tags::-webkit-scrollbar {
    display: none;
}
.tag-pill {
    white-space: nowrap;
    padding: 8px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: var(--transition-quick);
    cursor: pointer;
}
.tag-pill:hover, .tag-pill.active {
    background: var(--bg-surface-hover);
    border-color: var(--color-primary);
    color: #ffffff;
}
.tag-pill.active {
    background: rgba(255, 42, 95, 0.1);
}

/* Video Grid layout */
.grid-section {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 12px 24px 48px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px 20px;
}

/* Premium Video Card design */
.video-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    position: relative;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -khtml-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    
}
@media (min-width: 1025px) {
    .video-card:hover {
        transform: translateY(-6px);
        border-color: var(--border-color-hover);
        box-shadow: var(--shadow-glow);
    }
    .video-card:hover .card-thumb {
        transform: scale(1.05);
    }
}

/* Thumbnail Container & Video previews */
.thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #0d0d11;
    overflow: hidden;
    cursor: pointer;
}
.card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-medium);
    pointer-events: none !important;
    -webkit-user-drag: none !important;
    user-drag: none !important;
}

/* Preview Video on hover */
.preview-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.video-card.hovered .preview-video {
    opacity: 1;
}

/* Video Badges */
.card-badge {
    position: absolute;
    z-index: 2;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    pointer-events: none;
}
.duration-badge {
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-family: monospace;
}
.quality-badge {
    top: 8px;
    right: 8px;
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.uhd-badge {
    background: var(--color-accent);
}

/* Card details info block */
.card-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
    line-height: 1.5;
    cursor: pointer;
}
.card-title:hover {
    color: var(--color-primary);
}

/* Views & Rating metrics */
.card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.views-stat, .rating-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}
.rating-stat i {
    color: var(--color-accent);
}

/* Uploader row */
.uploader-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.uploader-img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.uploader-lnk:hover {
    color: white;
}

/* Loading Spinner styles */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    gap: 16px;
    color: var(--color-text-muted);
}
.premium-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 42, 95, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    border-right-color: var(--color-primary);
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(255, 42, 95, 0.1);
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error States */
.error-container {
    text-align: center;
    padding: 60px 24px;
    max-width: 420px;
    margin: 40px auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}
.error-icon {
    font-size: 48px;
    color: var(--color-primary);
    margin-bottom: 16px;
}
.error-container h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}
.error-container p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}
.retry-btn {
    padding: 12px 28px;
    background: var(--color-primary);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 42, 95, 0.3);
    transition: var(--transition-quick);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.retry-btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
}

/* Premium Watch Section (Theater Page Layout) */
.watch-section {
    width: 100%;
    margin-top: 0;
    padding-top: 0;
    animation: watchFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
}
@keyframes watchFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.watch-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

/* Theater Mode Player (16:9 responsive layout scale) */
.player-theater-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000000;
    border-radius: 0;
    overflow: hidden;
    border: none;
    border-bottom: 1px solid var(--border-color);
    box-shadow: none;
    position: relative;
    
}
.player-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Details and Sidebar Layout (Desktop) */
.watch-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    margin-bottom: 40px;
}
.watch-main-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-premium);
}
.watch-sidebar {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    height: fit-content;
    box-shadow: var(--shadow-premium);
}
.watch-sidebar h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

/* live mobile search layout and transition rules */
@media (max-width: 768px) {
    .search-form {
        position: relative;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .search-form.expanded {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 72px; /* Match header height */
        background: #09090c;
        z-index: 150;
        display: flex;
        align-items: center;
        padding: 0 20px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    }
    .search-form.expanded .search-box {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Responsive Grid Wrappers */
@media (max-width: 1024px) {
    .watch-grid {
        grid-template-columns: 1fr; /* Single column, pushes related videos to bottom */
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .watch-container {
        padding: 0;
    }
    .watch-nav-bar {
        padding: 8px 16px;
    }
    .player-theater-wrapper {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .watch-main-content, .watch-sidebar {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 20px 16px;
    }
}

/* Fallback watch button when embedding is restricted */
.player-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
    
}
.fallback-mask {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1;
}
.fallback-details {
    position: relative;
    z-index: 2;
    max-width: 480px;
}
.fallback-btn {
    padding: 14px 32px;
    background: var(--color-primary);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 42, 95, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    transition: var(--transition-quick);
}
.fallback-btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
}

/* Video detail styling inside Modal */
.video-details {
    padding: 24px;
}
.video-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
    margin-bottom: 12px;
}
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.rating-accent {
    color: var(--color-accent);
}
.uploader-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.uploader-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.uploader-info {
    display: flex;
    flex-direction: column;
}
.uploader-label {
    font-size: 11px;
    color: var(--color-text-muted);
}
.uploader-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}
.uploader-name:hover {
    color: var(--color-primary);
}
.video-description {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-top: 12px;
}
.separator {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

/* Tags, Categories, Stars items in Watch Info */
.stars-box, .categories-box, .tags-box {
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.meta-heading {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    width: 90px;
}
.stars-list, .categories-list, .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}
.meta-pill {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--color-text-muted);
}
.meta-pill:hover {
    color: #ffffff;
    border-color: var(--color-primary);
    background: rgba(255, 42, 95, 0.05);
}
.star-pill {
    border-color: rgba(255, 159, 28, 0.3);
}
.star-pill:hover {
    border-color: var(--color-accent);
    background: rgba(255, 159, 28, 0.05);
}

/* Related Sidebar styling */
.related-sidebar {
    padding: 20px;
    overflow-y: auto;
    height: 100%;
}
.related-sidebar h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #ffffff;
}
.related-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Small Card for Sidebar list */
.related-card {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: var(--transition-quick);
}
.related-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary);
}
.related-thumb-box {
    position: relative;
    width: 100px;
    aspect-ratio: 16/9;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}
.related-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.related-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    overflow: hidden;
}
.related-title {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.related-meta {
    font-size: 10px;
    color: var(--color-text-muted);
}

/* Traditional pagination layout */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}
.pag-btn {
    padding: 10px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-quick);
}
.pag-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--color-primary);
}
.page-info {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* Footer structure */
.main-footer {
    height: 72px;
    border-top: 1px solid var(--border-color);
    background: #09090b;
}
.footer-container {
    max-width: 1440px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--color-text-muted);
}
.footer-links {
    display: flex;
    gap: 16px;
}
.footer-links a:hover {
    color: white;
}

/* Helper Utilities */
.hidden {
    display: none !important;
}
.scroll-trigger {
    height: 20px;
    width: 100%;
}

/* Responsive breakdowns */
@media (max-width: 1024px) {
    .watch-modal {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: 94vh;
    }
    .modal-content {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .related-sidebar {
        height: auto;
        overflow-y: visible;
    }
    .related-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }
    .nav-links {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    .mobile-menu {
        display: none;
    }
    .content-wrapper {
        margin-top: 72px;
    }
    .grid-section {
        padding: 12px 16px 36px 16px;
    }
    .grid-container {
        gap: 16px 12px;
    }
    .filter-strip {
        padding: 16px 0 8px 0;
    }
    .strip-container {
        padding: 0 16px;
    }
    .section-title {
        font-size: 22px;
    }
    .footer-container {
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        padding: 16px 0;
        height: auto;
    }
}

/* ISP DNS Warning box styling */
.isp-warning-box {
    margin-top: 16px;
    background: rgba(255, 159, 28, 0.04);
    border: 1px solid rgba(255, 159, 28, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    transition: var(--transition-smooth);
}
.isp-warning-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--color-text-muted);
}
.warning-icon {
    color: var(--color-accent);
    font-size: 16px;
    flex-shrink: 0;
}
.help-toggle-btn {
    background: transparent;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition-quick);
}
.help-toggle-btn:hover {
    background: rgba(255, 159, 28, 0.1);
}
.bypass-instructions {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 159, 28, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeIn 0.25s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.instruction-step {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--color-accent);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 11px;
    border-radius: 50%;
    margin-top: 2px;
    flex-shrink: 0;
}
.step-content {
    color: var(--color-text-muted);
    line-height: 1.4;
}
.step-content strong {
    color: #ffffff;
}
.direct-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-weight: 600;
    color: var(--color-primary);
}
.direct-link-btn:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* Age Gate Overlay Styles */
.age-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(4, 4, 6, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}
.age-gate-modal {
    max-width: 480px;
    width: 90%;
    background: #111116;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    animation: modalPopIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.age-gate-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 800;
    font-size: 28px;
    letter-spacing: 2px;
    margin-bottom: 24px;
}
.age-gate-modal h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #ffffff;
}
.age-warning-text {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}
.age-gate-buttons {
    display: flex;
    gap: 16px;
}
.age-btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition-quick);
}
.age-btn-yes {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 42, 95, 0.4);
}
.age-btn-yes:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
}
.age-btn-no {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    border: 1px solid var(--border-color);
}
.age-btn-no:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Player click protection overlays */
.player-overlay-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px; /* Covers top bar (title & uploader links) */
    background: transparent;
    z-index: 5;
    pointer-events: auto;
    cursor: default;
}
.player-overlay-bottom-left {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 180px; /* Covers the bottom left logo "Watch on xHamster" */
    height: 50px; 
    background: transparent;
    z-index: 5;
    pointer-events: auto;
    cursor: default;
}

/* Collapsible Description styles */
.description-container {
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    
}
.description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    padding: 12px 16px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    transition: var(--transition-quick);
}
.description-header:hover {
    background: rgba(255, 255, 255, 0.08);
}
.description-title-text {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}
.desc-toggle-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 14px;
}
.description-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.description-content.collapsed {
    display: none;
}
.video-description {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}
.video-description.collapsed {
    display: none;
}
.description-metadata-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* Floating Quality Selector */
.quality-selector-container {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 100;
}
.quality-btn {
    background: rgba(18, 18, 23, 0.85);
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition-quick);
}
.quality-btn:hover {
    background: rgba(255, 42, 95, 0.9);
    border-color: var(--color-primary);
}
.quality-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(18, 18, 23, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 110px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: menuFadeIn 0.15s ease-out;
}
@keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.quality-option {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-quick);
    width: 100%;
}
.quality-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}
.quality-option.active {
    background: rgba(255, 42, 95, 0.15);
    color: var(--color-primary);
    font-weight: 700;
}

/* Double-Tap Seek Feedback HUD */
.seek-feedback {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 101;
}
.seek-feedback.left {
    left: 15%;
}
.seek-feedback.right {
    right: 15%;
}
.seek-feedback.active {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}
.seek-feedback i {
    font-size: 16px;
    color: var(--color-primary);
}

/* Related Videos Load More Button */
.load-more-related-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-quick);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}
.load-more-related-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-color: var(--color-primary);
}
.load-more-related-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom Premium HTML5 Video Controls Styles */
.custom-controls-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
    padding: 24px 16px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: auto;
}
.native-player-wrapper:hover .custom-controls-bar,
.custom-controls-bar.active {
    opacity: 1;
}

/* Progress Slider */
.progress-container {
    position: relative;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    cursor: pointer;
    transition: height 0.15s ease;
    touch-action: none;
}
.progress-container:hover {
    height: 8px;
}
.progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--color-primary);
    border-radius: 4px;
    width: 0%;
}
.progress-bar-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.15s ease;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}
.progress-container:hover .progress-bar-thumb {
    transform: translate(-50%, -50%) scale(1);
}

/* Control Alignments */
.controls-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 18px;
}
.control-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.15s ease;
}
.control-btn:hover {
    color: var(--color-primary);
    transform: scale(1.15);
}
.time-display {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    font-family: monospace;
}

/* Three Dots Options Menu Dropdown */
.options-menu-container {
    position: relative;
}
.options-dropdown {
    position: absolute;
    bottom: calc(100% + 16px);
    right: 0;
    background: rgba(18, 18, 23, 0.96);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    animation: menuFadeIn 0.2s ease-out;
}
.options-dropdown.hidden {
    display: none !important;
}
.option-item, .sub-option-item, .submenu-back-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    transition: var(--transition-quick);
}
.option-item:hover, .sub-option-item:hover, .submenu-back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}
.option-item .val-label {
    margin-left: auto;
    color: var(--color-text-muted);
    font-size: 11px;
}
.option-item .arrow {
    font-size: 11px;
    color: var(--color-text-muted);
}
.submenu-back-btn {
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    padding-bottom: 8px;
    margin-bottom: 6px;
    color: var(--color-primary);
}
.sub-option-item.active {
    background: rgba(255, 42, 95, 0.15);
    color: var(--color-primary);
    font-weight: 700;
}
.options-list-sub.hidden {
    display: none !important;
}
.options-list-main.hidden {
    display: none !important;
}

/* Ensure the custom HTML5 video element takes up the full space of its container and is perfectly centered */
.native-player-wrapper video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    
}
