/* ============================================
   GAY3X DESIGN SYSTEM v2.0
   Ultra Modern Mobile-First Design - Blue Theme
   ============================================ */

/* ===========================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   =========================================== */
:root {
    /* Font Family */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    /* Dark Mode Colors (Default) */
    --color-bg: #0a0a0a;
    --color-bg-secondary: #111111;
    --color-bg-tertiary: #1a1a1a;
    --color-bg-elevated: #1f1f1f;
    --color-bg-hover: #2a2a2a;
    --color-bg-active: #333333;

    /* Glass effects */
    --color-glass: rgba(17, 17, 17, 0.85);
    --color-glass-border: rgba(255, 255, 255, 0.08);
    --color-glass-hover: rgba(255, 255, 255, 0.05);

    /* Text Colors */
    --color-text: #ffffff;
    --color-text-secondary: #a0a0a0;
    --color-text-tertiary: #666666;
    --color-text-muted: #444444;

    /* Border */
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.15);

    /* Accent Colors - Modern Blue */
    --color-accent: #3b82f6;
    --color-accent-hover: #2563eb;
    --color-accent-light: rgba(59, 130, 246, 0.15);
    --color-accent-glow: rgba(59, 130, 246, 0.4);

    /* Secondary Accents */
    --color-blue: #3b82f6;
    --color-green: #10b981;
    --color-yellow: #f59e0b;
    --color-purple: #8b5cf6;
    --color-pink: #ec4899;

    /* Shadows - Layered for depth */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6), 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.7), 0 8px 16px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--color-accent-glow);
    --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--color-border-hover);

    /* Layout */
    --header-height: 56px;
    --sidebar-width: 240px;
    --sidebar-mini-width: 72px;
    --bottom-nav-height: 64px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);

    /* Transitions - Snappy and modern */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

    --transition-instant: 100ms var(--ease-out-expo);
    --transition-fast: 150ms var(--ease-out-expo);
    --transition-normal: 250ms var(--ease-out-expo);
    --transition-slow: 400ms var(--ease-out-expo);
    --transition-spring: 500ms var(--ease-spring);

    /* Border Radius - Rounded and soft */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-pill: 9999px;

    /* Z-Index Scale */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-toast: 700;
}

/* ===========================================
   FONTS
   =========================================== */
@font-face {
    font-family: 'Font Awesome 6 Duotone';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fontawesome/webfonts/fa-duotone-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 6 Pro';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fontawesome/webfonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 6 Pro';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fontawesome/webfonts/fa-regular-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fontawesome/webfonts/fa-brands-400.woff2') format('woff2');
}

/* ===========================================
   BASE STYLES & RESET
   =========================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Better scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--color-text-muted);
    border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-tertiary);
}

/* Selection */
::selection {
    background: var(--color-accent);
    color: white;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Remove tap highlight on mobile */
button, a, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
}

/* ===========================================
   ANIMATIONS KEYFRAMES
   =========================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px var(--color-accent-glow); }
    50% { box-shadow: 0 0 20px var(--color-accent-glow), 0 0 30px var(--color-accent-glow); }
}

/* Animation utilities */
.animate-fade-in { animation: fadeIn 0.3s var(--ease-out-expo); }
.animate-fade-in-up { animation: fadeInUp 0.4s var(--ease-out-expo); }
.animate-fade-in-down { animation: fadeInDown 0.4s var(--ease-out-expo); }
.animate-slide-up { animation: slideInUp 0.4s var(--ease-out-expo); }
.animate-slide-down { animation: slideInDown 0.4s var(--ease-out-expo); }
.animate-scale-in { animation: scaleIn 0.3s var(--ease-out-back); }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-bounce { animation: bounce 0.6s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }

/* Staggered animations for lists */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }

/* ===========================================
   HEADER - Glass morphism modern design
   =========================================== */
.yt-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--color-glass-border);
    z-index: var(--z-fixed);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    transition: transform var(--transition-normal), background var(--transition-normal);
}

.yt-header.scrolled {
    background: var(--color-bg-secondary);
}

.yt-header.hidden-header {
    transform: translateY(-100%);
}

/* Logo */
.yt-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-left: 16px;
    transition: transform var(--transition-fast);
}

@media (min-width: 768px) {
    .yt-logo {
        margin-left: 24px;
    }
}

.yt-logo:active {
    transform: scale(0.95);
}

.yt-logo-img {
    height: 37px;
    width: auto;
    object-fit: contain;
}

@media (min-width: 768px) {
    .yt-header {
        padding: 0 16px;
        gap: 16px;
    }

    .yt-logo-img {
        height: 47px;
    }
}

/* ===========================================
   SIDEBAR - Modern with smooth animations
   =========================================== */
.yt-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--color-bg-secondary);
    border-right: 1px solid var(--color-border);
    z-index: var(--z-sticky);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 8px;
    transform: translateX(-100%);
    transition: transform var(--transition-normal), width var(--transition-normal);
}

.yt-sidebar.open {
    transform: translateX(0);
    z-index: var(--z-modal);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
}

.yt-sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: var(--radius-lg);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.yt-sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--color-accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: height var(--transition-fast);
}

.yt-sidebar-item:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
}

.yt-sidebar-item.active {
    background: var(--color-accent-light);
    color: var(--color-accent);
}

.yt-sidebar-item.active::before {
    height: 60%;
}

.yt-sidebar-item i {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 18px;
    transition: transform var(--transition-fast);
}

.yt-sidebar-item:hover i {
    transform: scale(1.1);
}

.yt-sidebar-divider {
    height: 1px;
    background: var(--color-border);
    margin: 12px 16px;
}

.yt-sidebar-overlay {
    position: fixed;
    inset: 0;
    top: var(--header-height);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: calc(var(--z-modal) - 1);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

/* Desktop sidebar - Click only, no hover */
@media (min-width: 1024px) {
    .yt-sidebar {
        transform: translateX(0);
        width: var(--sidebar-mini-width);
    }

    /* Expanded state - only via click */
    .yt-sidebar.expanded {
        width: var(--sidebar-width);
    }

    /* Mini state - icons only */
    .yt-sidebar .yt-sidebar-item {
        flex-direction: column;
        padding: 12px 8px;
        text-align: center;
        gap: 4px;
    }

    .yt-sidebar .yt-sidebar-item i {
        margin-right: 0;
        font-size: 20px;
    }

    .yt-sidebar .yt-sidebar-item span {
        font-size: 10px;
        opacity: 1;
    }

    /* Expanded state - full items */
    .yt-sidebar.expanded .yt-sidebar-item {
        flex-direction: row;
        padding: 12px 16px;
        text-align: left;
    }

    .yt-sidebar.expanded .yt-sidebar-item i {
        margin-right: 16px;
        font-size: 18px;
    }

    .yt-sidebar.expanded .yt-sidebar-item span {
        font-size: 14px;
    }

    /* Main content adjustment when sidebar is expanded */
    .yt-main.sidebar-expanded {
        margin-left: var(--sidebar-width);
    }
}

/* ===========================================
   MAIN CONTENT AREA
   =========================================== */
.yt-main {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    padding: 16px;
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + 16px);
    transition: margin-left var(--transition-normal), padding var(--transition-normal);
}

@media (min-width: 768px) {
    .yt-main {
        padding: 24px;
        padding-bottom: 24px;
    }
}

@media (min-width: 1024px) {
    .yt-main {
        margin-left: var(--sidebar-mini-width);
    }
}

/* ===========================================
   BUTTONS - Modern with micro-interactions
   =========================================== */
.yt-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    overflow: hidden;
    transition: all var(--transition-fast);
    -webkit-user-select: none;
    user-select: none;
}

.yt-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, white 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.yt-btn:active::after {
    opacity: 0.1;
}

.yt-btn:active {
    transform: scale(0.97);
}

.yt-btn-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.yt-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.yt-btn-secondary {
    background: var(--color-bg-tertiary);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.yt-btn-secondary:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-hover);
}

.yt-btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
}

.yt-btn-ghost:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
}

.yt-btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-pill);
}

.yt-btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: var(--radius-md);
}

.yt-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* ===========================================
   SEARCH - Modern with smooth focus
   =========================================== */
.yt-search {
    display: flex;
    align-items: center;
    max-width: 600px;
    flex: 1;
}

.yt-search-form {
    display: flex;
    align-items: center;
    width: 100%;
}

.yt-search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    height: 44px;
    background: var(--color-bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    overflow: visible;
    position: relative;
    transition: all var(--transition-fast);
}

.yt-search-input-wrapper:focus-within {
    border-color: var(--color-accent);
    background: var(--color-bg-elevated);
    box-shadow: 0 0 0 4px var(--color-accent-light);
}

.yt-search-input {
    flex: 1;
    height: 100%;
    padding: 0 16px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 15px;
    outline: none;
}

.yt-search-input::placeholder {
    color: var(--color-text-tertiary);
}

.yt-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--color-accent);
    border: none;
    border-radius: var(--radius-pill);
    margin-left: 8px;
    cursor: pointer;
    color: white;
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.yt-search-btn i {
    font-size: 1.25rem;
}

.yt-search-btn:hover {
    background: var(--color-accent-hover);
    transform: scale(1.05);
}

.yt-search-btn:active {
    transform: scale(0.95);
}

/* ===========================================
   VIDEO CARD - Modern YouTube-style
   =========================================== */
.yt-video-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.yt-video-card:hover {
    transform: translateY(-4px);
    z-index: 1;
}

/* Thumbnail Container */
.yt-video-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.yt-video-thumbnail-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow), opacity 0.3s ease;
}

.yt-video-card:hover .yt-video-thumbnail-img {
    transform: scale(1.08);
}

/* Progress bar on hover */
.yt-video-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-accent);
    transition: width 0.4s var(--ease-out-expo);
}

.yt-video-card:hover .yt-video-thumbnail::after {
    width: 100%;
}

/* Hover overlay */
.yt-video-thumbnail-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.yt-video-card:hover .yt-video-thumbnail-hover {
    opacity: 1;
}

/* Hide play overlay when preview is active */
.yt-video-thumbnail.preview-active .yt-video-thumbnail-hover,
.preview-active .yt-video-thumbnail-hover {
    opacity: 0 !important;
    pointer-events: none;
}
video.preview-video {
    z-index: 20;
    background: transparent;
    transition: opacity 0.15s ease-out;
}
.card-sprite-preview {
    z-index: 20;
}

.yt-video-play-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transform: scale(0.8);
    transition: transform var(--transition-spring);
}

.yt-video-card:hover .yt-video-play-icon {
    transform: scale(1);
}

/* Duration badge */
.yt-video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* HD badge */
.yt-video-badge-hd {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--color-accent);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Video Info */
.yt-video-info {
    padding: 12px 4px 8px;
}

.yt-video-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    transition: color var(--transition-fast);
}

.yt-video-card:hover .yt-video-title {
    color: var(--color-accent);
}

.yt-video-title-link {
    text-decoration: none;
    color: inherit;
}

.yt-video-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.yt-video-source {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--color-accent);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.yt-video-channel {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.yt-video-stats {
    font-size: 12px;
    color: var(--color-text-tertiary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.yt-video-stats-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
}

/* ===========================================
   VIDEO CARD SKELETON - Shimmer loading
   =========================================== */
.yt-video-card-skeleton {
    display: flex;
    flex-direction: column;
}

.yt-skeleton-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg,
        var(--color-bg-tertiary) 0%,
        var(--color-bg-elevated) 50%,
        var(--color-bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.yt-skeleton-info {
    padding: 12px 4px 8px;
}

.yt-skeleton-bar {
    height: 14px;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg,
        var(--color-bg-tertiary) 0%,
        var(--color-bg-elevated) 50%,
        var(--color-bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 8px;
}

.yt-skeleton-bar:last-child {
    width: 60%;
    margin-bottom: 0;
}

/* ===========================================
   VIDEO GRID - Responsive
   =========================================== */
/* Site pleine largeur : on retire le plafond de largeur du conteneur */
.container { max-width: 100% !important; }

.yt-video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* mobile : 2 colonnes */
    gap: 12px;
}

/* Au-delà du mobile : nombre de colonnes AUTOMATIQUE selon la largeur dispo.
   Carte ~240px min → plus la fenêtre est large, plus il y a de colonnes. */
@media (min-width: 640px) {
    .yt-video-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
}
@media (min-width: 1536px) {
    .yt-video-grid { gap: 20px; }
}

/* Cartes de la dernière ligne incomplète, masquées par JS (lignes toujours pleines) */
.yt-video-grid > .row-hidden { display: none !important; }

/* ===========================================
   PILLS / CHIPS - Modern tags
   =========================================== */
.yt-pills-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.yt-pills-container::-webkit-scrollbar {
    display: none;
}

.yt-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    white-space: nowrap;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.yt-pill:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
    border-color: var(--color-border-hover);
}

.yt-pill:active {
    transform: scale(0.95);
}

.yt-pill.active {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.yt-pill i {
    margin-right: 6px;
    font-size: 12px;
}

/* ===========================================
   PAGINATION - Modern design
   =========================================== */
.yt-pagination-wrapper {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.yt-pagination-info {
    font-size: 13px;
    color: var(--color-text-tertiary);
}

.yt-pagination-info strong {
    color: var(--color-text);
}

.yt-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
}

.yt-pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.yt-pagination-btn:hover:not(.disabled):not(.active) {
    background: var(--color-bg-hover);
    color: var(--color-text);
}

.yt-pagination-btn:active:not(.disabled) {
    transform: scale(0.95);
}

.yt-pagination-btn.active {
    background: var(--color-accent);
    color: white;
}

.yt-pagination-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.yt-pagination-ellipsis {
    padding: 0 8px;
    color: var(--color-text-tertiary);
}

/* Mobile pagination */
@media (max-width: 640px) {
    .yt-pagination {
        padding: 6px;
    }

    .yt-pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* ===========================================
   CATEGORY CARDS - Modern hover effects
   =========================================== */
.yt-category-card {
    position: relative;
    display: block;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--color-bg-tertiary);
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.yt-category-card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.yt-category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.yt-category-card:hover img {
    transform: scale(1.1);
}

.yt-category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
}

.yt-category-card-name {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.yt-category-card-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* ===========================================
   TAGS - Modern pill design
   =========================================== */
.yt-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-pill);
    font-size: 13px;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.yt-tag:hover {
    background: var(--color-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.yt-tag-count {
    margin-left: 6px;
    font-size: 11px;
    opacity: 0.7;
}

/* ===========================================
   SECTION HEADERS
   =========================================== */
.yt-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.yt-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.yt-section-title i {
    color: var(--color-accent);
}

.yt-section-link {
    font-size: 14px;
    color: var(--color-accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.yt-section-link:hover {
    color: var(--color-accent-hover);
}

.yt-section-link i {
    transition: transform var(--transition-fast);
}

.yt-section-link:hover i {
    transform: translateX(3px);
}

/* ===========================================
   FOOTER - Clean modern design
   =========================================== */
.yt-footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: 32px 16px;
    margin-top: 48px;
}

.yt-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
    margin-bottom: 24px;
}

.yt-footer-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition-fast);
}

.yt-footer-link:hover {
    color: var(--color-accent);
}

.yt-footer-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    border-radius: var(--radius-pill);
    margin: 0 auto 24px;
}

.yt-footer-copyright {
    text-align: center;
    color: var(--color-text-tertiary);
    font-size: 13px;
}

.yt-footer-copyright strong {
    color: var(--color-accent);
}

/* ===========================================
   MOBILE BOTTOM NAVIGATION
   =========================================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    background: var(--color-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--color-glass-border);
    z-index: var(--z-fixed);
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    flex: 1;
    max-width: 80px;
    text-decoration: none;
    color: var(--color-text-tertiary);
    transition: all var(--transition-fast);
    position: relative;
}

.mobile-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-accent);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    transition: width var(--transition-fast);
}

.mobile-nav-item:active {
    transform: scale(0.9);
}

.mobile-nav-item.active {
    color: var(--color-accent);
}

.mobile-nav-item.active::before {
    width: 24px;
}

.mobile-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform var(--transition-spring);
}

.mobile-nav-item:active i {
    transform: scale(1.2);
}

.mobile-nav-item span {
    font-size: 10px;
    font-weight: 500;
}

/* Hide on desktop (>=1024px) */
@media (min-width: 1024px) {
    .mobile-bottom-nav {
        display: none;
    }
}

/* ===========================================
   DROPDOWNS - Modern floating menus
   =========================================== */
.yt-dropdown {
    position: relative;
}

.yt-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    padding: 8px;
    z-index: var(--z-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all var(--transition-fast);
}

.yt-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.yt-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
    transition: background var(--transition-fast);
}

.yt-dropdown-item:hover {
    background: var(--color-bg-hover);
}

.yt-dropdown-item i {
    width: 18px;
    color: var(--color-text-secondary);
}

.yt-dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 8px 0;
}

/* ===========================================
   TOAST NOTIFICATIONS
   =========================================== */
.yt-toast-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

@media (min-width: 768px) {
    .yt-toast-container {
        bottom: 24px;
    }
}

.yt-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--color-bg-elevated);
    color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    pointer-events: auto;
    animation: slideInUp 0.3s var(--ease-out-expo);
}

.yt-toast.success {
    border-color: var(--color-green);
}

.yt-toast.error {
    border-color: var(--color-accent);
}

/* ===========================================
   MODALS - Modern bottom sheet on mobile
   =========================================== */
.yt-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.yt-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.yt-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    z-index: var(--z-modal);
    transform: translateY(100%);
    transition: transform var(--transition-normal);
    overflow: hidden;
}

.yt-modal.show {
    transform: translateY(0);
}

.yt-modal-handle {
    display: flex;
    justify-content: center;
    padding: 12px;
}

.yt-modal-handle::after {
    content: '';
    width: 40px;
    height: 4px;
    background: var(--color-text-muted);
    border-radius: var(--radius-pill);
}

.yt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--color-border);
}

.yt-modal-title {
    font-size: 18px;
    font-weight: 700;
}

.yt-modal-content {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

/* Desktop modal */
@media (min-width: 768px) {
    .yt-modal {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%) scale(0.9);
        max-width: 500px;
        width: 90%;
        border-radius: var(--radius-xl);
        max-height: 85vh;
    }

    .yt-modal.show {
        transform: translate(-50%, -50%) scale(1);
    }

    .yt-modal-handle {
        display: none;
    }
}

/* ===========================================
   FORMS - Modern inputs
   =========================================== */
.yt-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: var(--color-bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    color: var(--color-text);
    font-size: 15px;
    transition: all var(--transition-fast);
}

.yt-input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: var(--color-bg-elevated);
    box-shadow: 0 0 0 4px var(--color-accent-light);
}

.yt-input::placeholder {
    color: var(--color-text-tertiary);
}

.yt-textarea {
    min-height: 100px;
    padding: 12px 16px;
    resize: vertical;
}

.yt-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.yt-input-group {
    margin-bottom: 20px;
}

/* ===========================================
   UTILITIES
   =========================================== */
.yt-divider {
    height: 1px;
    background: var(--color-border);
    margin: 16px 0;
}

.yt-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.yt-badge-accent {
    background: var(--color-accent);
    color: white;
}

.yt-link {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.yt-link:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.yt-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yt-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Avatar */
.yt-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-bg-tertiary);
    flex-shrink: 0;
}

.yt-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-avatar-sm { width: 32px; height: 32px; }
.yt-avatar-lg { width: 56px; height: 56px; }
.yt-avatar-xl { width: 80px; height: 80px; }

/* Hidden utilities */
[x-cloak] { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===========================================
   LEGACY COMPATIBILITY
   =========================================== */
/* Video card legacy */
.video-card {
    transition: all 0.3s var(--ease-out-expo);
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-4px);
}

.video-thumb-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

/* Flag Icons */
.fi.fis {
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

/* Search dropdown legacy */
.search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-dropdown);
    max-height: 320px;
    overflow-y: auto;
}

.search-dropdown__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--color-text);
    text-decoration: none;
    transition: background var(--transition-fast);
}

.search-dropdown__item:hover {
    background: var(--color-bg-hover);
}

/* Mobile menu legacy */
#mobileMenu {
    transition: transform 0.3s var(--ease-out-expo);
}

#mobileMenuOverlay {
    transition: opacity 0.3s ease;
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg,
        var(--color-bg-tertiary) 25%,
        var(--color-bg-hover) 50%,
        var(--color-bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Slots responsive (desktop/mobile) */
.gx-d { display: block; }
.gx-m { display: none; }

@media (max-width: 1019px) {
    .gx-d { display: none !important; }
    .gx-m { display: block !important; }
}

/* Search input wrapper legacy */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--color-bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    color: var(--color-text);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: var(--color-bg-elevated);
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 16px;
    color: var(--color-text-tertiary);
    pointer-events: none;
    font-size: 1.1rem;
}

.search-input-wrapper .search-icon i {
    font-size: 1.1rem;
}

/* Mobile safe area */
@media (max-width: 767px) {
    body {
        padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom)) !important;
    }

    footer {
        margin-bottom: 0 !important;
    }
}

/* ===========================================
   PAGE-SPECIFIC OVERRIDES
   =========================================== */
/* Categories page cards */
.category-card {
    transition: all 0.3s var(--ease-out-expo);
}

.category-card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.category-card:active {
    transform: scale(0.98);
}

/* Tags page */
.tag-chip {
    transition: all var(--transition-fast);
}

.tag-chip:hover {
    background: var(--color-accent);
    color: white;
    transform: translateY(-2px);
}

/* Pornstar cards */
.yt-pornstar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid var(--color-border);
}

.yt-pornstar-card:hover {
    background: var(--color-bg-tertiary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-border-hover);
}

.yt-pornstar-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--color-bg-tertiary);
    border: 3px solid var(--color-border);
    transition: border-color var(--transition-fast);
}

.yt-pornstar-card:hover .yt-pornstar-avatar {
    border-color: var(--color-accent);
}

.yt-pornstar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-pornstar-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 4px;
}

.yt-pornstar-count {
    font-size: 12px;
    color: var(--color-text-tertiary);
}

/* Watch page specifics - video container defined in watch.css */
/* Note: Do not override .video-container here - watch.css has the correct styles */

/* Override Tailwind bg-gray colors to use our theme */
.bg-gray-900 { background-color: var(--color-bg) !important; }
.bg-gray-800 { background-color: var(--color-bg-secondary) !important; }
.bg-gray-700 { background-color: var(--color-bg-tertiary) !important; }
.bg-gray-600 { background-color: var(--color-bg-elevated) !important; }

.border-gray-700 { border-color: var(--color-border) !important; }
.border-gray-600 { border-color: var(--color-border-hover) !important; }

.text-gray-400 { color: var(--color-text-secondary) !important; }
.text-gray-500 { color: var(--color-text-tertiary) !important; }

/* ============================================================
   BRAND ACCENT UNIFICATION
   Route every off-brand utility (orange / pink / purple) to the
   single theme accent (--color-accent = blue #3b82f6).
   Done at the CSS layer so markup stays untouched and it's the
   one place to change the brand color site-wide.
   ============================================================ */
/* background - solid */
.bg-orange-500, .bg-orange-600, .bg-pink-500, .bg-purple-600 { background-color: var(--color-accent) !important; }
/* background - translucent tints */
.bg-orange-500\/20, .bg-orange-600\/30 { background-color: var(--color-accent-light) !important; }
/* background - hover */
.hover\:bg-orange-500:hover, .hover\:bg-orange-600:hover, .hover\:bg-orange-700:hover,
.hover\:bg-pink-600:hover, .hover\:bg-purple-700:hover { background-color: var(--color-accent-hover) !important; }
.hover\:bg-orange-500\/10:hover, .hover\:bg-orange-500\/30:hover { background-color: var(--color-accent-light) !important; }
/* text */
.text-orange-200, .text-orange-300, .text-orange-400, .text-orange-500, .text-orange-600,
.text-pink-200, .text-pink-400, .text-pink-500, .text-purple-400 { color: var(--color-accent) !important; }
.hover\:text-orange-300:hover, .hover\:text-orange-400:hover,
.hover\:text-pink-300:hover, .hover\:text-pink-400:hover { color: var(--color-accent) !important; }
.group:hover .group-hover\:text-orange-300, .group:hover .group-hover\:text-orange-400,
.group:hover .group-hover\:text-pink-400 { color: var(--color-accent) !important; }
/* border */
.border-orange-500, .border-orange-600, .border-orange-500\/30 { border-color: var(--color-accent) !important; }
.focus\:border-orange-500:focus { border-color: var(--color-accent) !important; }
/* ring */
.ring-orange-400, .ring-orange-400\/50, .ring-orange-500 { --tw-ring-color: var(--color-accent) !important; }
.focus\:ring-orange-500:focus, .hover\:ring-orange-500:hover { --tw-ring-color: var(--color-accent) !important; }
.group:hover .group-hover\:ring-orange-400, .group:hover .group-hover\:ring-orange-400\/50,
.group:hover .group-hover\:ring-orange-500, .group:hover .group-hover\:ring-pink-500 { --tw-ring-color: var(--color-accent) !important; }
/* gradients */
.from-orange-500\/20, .from-orange-600, .from-orange-600\/20,
.from-pink-500\/20, .from-pink-600\/20, .from-purple-600\/20 { --tw-gradient-from: var(--color-accent) !important; }
.to-orange-500\/20, .to-purple-500\/20, .to-purple-600 { --tw-gradient-to: var(--color-accent-hover) !important; }
.hover\:from-orange-700:hover { --tw-gradient-from: var(--color-accent-hover) !important; }
.hover\:to-purple-700:hover { --tw-gradient-to: var(--color-accent-hover) !important; }
/* shadow color */
.hover\:shadow-orange-500\/30:hover, .hover\:shadow-pink-500\/30:hover { --tw-shadow-color: var(--color-accent-glow) !important; --tw-shadow: var(--tw-shadow-colored) !important; }

/* Active states for mobile */
@media (max-width: 767px) {
    .active\:bg-orange-600:active {
        background-color: var(--color-accent-hover) !important;
    }

    button:active, a:active {
        transform: scale(0.97);
    }
}

/* ===========================================
   GALLERY CARD - Modern YouTube-style
   =========================================== */
.yt-gallery-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.yt-gallery-card:hover {
    transform: translateY(-4px);
    z-index: 1;
}

.yt-gallery-card--small {
    min-width: 220px;
    max-width: 280px;
    flex-shrink: 0;
}

/* Thumbnail Container - natural aspect ratio for true masonry */
.yt-gallery-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.yt-gallery-thumbnail-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top;
    transition: transform var(--transition-slow);
}

.yt-gallery-card:hover .yt-gallery-thumbnail-img {
    transform: scale(1.08);
}

/* Progress bar on hover */
.yt-gallery-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-accent);
    transition: width 0.4s var(--ease-out-expo);
}

.yt-gallery-card:hover .yt-gallery-thumbnail::after {
    width: 100%;
}

/* Hover overlay */
.yt-gallery-thumbnail-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.yt-gallery-card:hover .yt-gallery-thumbnail-hover {
    opacity: 1;
}

.yt-gallery-view-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transform: scale(0.8);
    transition: transform var(--transition-spring);
}

.yt-gallery-card:hover .yt-gallery-view-icon {
    transform: scale(1);
}

/* Count badge */
.yt-gallery-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.yt-gallery-count i {
    color: var(--color-accent);
    font-size: 11px;
}

/* Gallery Info */
.yt-gallery-info {
    padding: 12px 4px 8px;
}

.yt-gallery-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    transition: color var(--transition-fast);
}

.yt-gallery-card:hover .yt-gallery-title {
    color: var(--color-accent);
}

.yt-gallery-title-link {
    text-decoration: none;
    color: inherit;
}

.yt-gallery-stats {
    font-size: 12px;
    color: var(--color-text-tertiary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.yt-gallery-stats i {
    font-size: 10px;
    margin-right: 2px;
}

.yt-gallery-stats-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
}

/* ===========================================
   GALLERY GRID - Responsive
   =========================================== */
.yt-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .yt-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .yt-gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1280px) {
    .yt-gallery-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1536px) {
    .yt-gallery-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }
}

/* ===========================================
   GALLERY MASONRY - Pinterest-style
   =========================================== */
.yt-gallery-masonry {
    column-count: 2;
    column-gap: 12px;
}

.yt-gallery-masonry-item {
    break-inside: avoid;
    margin-bottom: 12px;
}

@media (min-width: 640px) {
    .yt-gallery-masonry {
        column-count: 3;
        column-gap: 16px;
    }
    .yt-gallery-masonry-item {
        margin-bottom: 16px;
    }
}

@media (min-width: 1024px) {
    .yt-gallery-masonry {
        column-count: 4;
    }
}

@media (min-width: 1536px) {
    .yt-gallery-masonry {
        column-count: 5;
        column-gap: 20px;
    }
    .yt-gallery-masonry-item {
        margin-bottom: 20px;
    }
}

/* ===========================================
   GALLERY CAROUSEL - Horizontal scroll
   =========================================== */
.yt-gallery-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.yt-gallery-carousel::-webkit-scrollbar {
    display: none;
}

.yt-gallery-carousel-item {
    flex-shrink: 0;
}

/* ===========================================
   SECTION HEADERS - Modern
   =========================================== */
.yt-section {
    margin-bottom: 32px;
}

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

.yt-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.yt-section-title i {
    color: var(--color-accent);
    font-size: 20px;
}

@media (min-width: 768px) {
    .yt-section-title {
        font-size: 22px;
    }
    .yt-section-title i {
        font-size: 24px;
    }
}

.yt-section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-accent);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition-fast);
}

.yt-section-link:hover {
    color: var(--color-accent-hover);
}

.yt-section-link i {
    font-size: 12px;
    transition: transform var(--transition-fast);
}

.yt-section-link:hover i {
    transform: translateX(4px);
}

/* ===========================================
   EMPTY STATE
   =========================================== */
.yt-empty-state {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.4s var(--ease-out-expo);
}

.yt-empty-state i {
    font-size: 64px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.yt-empty-state h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.yt-empty-state p {
    font-size: 14px;
    color: var(--color-text-tertiary);
}

/* ===========================================
   TAGS BAR - Popular tags strip
   =========================================== */
.yt-tags-bar {
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0;
    overflow: hidden;
}

.yt-tags-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.yt-tags-section {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.yt-tags-label {
    font-size: 13px;
    color: var(--color-text-tertiary);
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.yt-tags-label i {
    color: var(--color-accent);
}

.yt-tags-friends {
    display: none;
    align-items: center;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .yt-tags-friends {
        display: flex;
    }
}

/* ===========================================
   PAGE HEADER - Modern listing pages
   =========================================== */
.yt-page-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .yt-page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.yt-page-header-content {
    flex: 1;
}

.yt-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 8px 0;
}

.yt-page-title i {
    color: var(--color-accent);
    font-size: 28px;
}

@media (min-width: 768px) {
    .yt-page-title {
        font-size: 32px;
    }
    .yt-page-title i {
        font-size: 32px;
    }
}

.yt-page-subtitle {
    font-size: 14px;
    color: var(--color-text-tertiary);
    margin: 0;
}

.yt-page-search {
    width: 100%;
}

@media (min-width: 768px) {
    .yt-page-search {
        width: 320px;
        flex-shrink: 0;
    }
}

.yt-page-search .yt-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: none;
    background: none;
    box-shadow: none;
    height: auto;
}

.yt-page-search .yt-search-input-wrapper:focus-within {
    border-color: transparent;
    background: none;
    box-shadow: none;
}

.yt-search-input-icon {
    position: absolute;
    left: 20px;
    color: var(--color-text-tertiary);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.yt-search-input-field {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 44px;
    background: var(--color-bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    color: var(--color-text);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.yt-search-input-field:focus {
    outline: none;
    border-color: var(--color-accent);
    background: var(--color-bg-elevated);
    box-shadow: 0 0 0 4px var(--color-accent-light);
}

.yt-search-input-field::placeholder {
    color: var(--color-text-tertiary);
}

/* ===========================================
   CATEGORY GRID - Modern cards
   =========================================== */
.yt-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .yt-category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 768px) {
    .yt-category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .yt-category-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ===========================================
   FILTER PILLS - Sort/filter buttons
   =========================================== */
.yt-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
}

.yt-filter-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.yt-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.yt-filter-pill:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
}

.yt-filter-pill.active {
    background: var(--color-accent);
    border-color: transparent;
    color: white;
}

.yt-filter-pill i {
    font-size: 11px;
}

@media (min-width: 640px) {
    .yt-filter-pill {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ===========================================
   PORNSTAR SLIDER - Compact Instagram-style
   =========================================== */
.pornstar-slider-section {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 10px 0;
}

.pornstar-slider-wrapper {
    position: relative;
}

/* Masques de dégradé pour cacher le contenu derrière les flèches */
.pornstar-slider-wrapper::before,
.pornstar-slider-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    z-index: 5;
    pointer-events: none;
}

.pornstar-slider-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--color-bg) 0%, var(--color-bg) 60%, transparent 100%);
}

.pornstar-slider-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--color-bg) 0%, var(--color-bg) 60%, transparent 100%);
}

.pornstar-slider-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 36px;
}

.pornstar-slider-track::-webkit-scrollbar {
    display: none;
}

.pornstar-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-fast);
    font-size: 11px;
}

.pornstar-slider-arrow:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-hover);
    color: var(--color-text);
}

.pornstar-slider-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.pornstar-slider-arrow:disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.pornstar-slider-arrow-left {
    left: 0;
}

.pornstar-slider-arrow-right {
    right: 0;
}

.pornstar-slider-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.pornstar-slider-item:hover {
    transform: scale(1.05);
}

.pornstar-slider-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    padding: 2px;
}

.pornstar-slider-item:hover .pornstar-slider-avatar {
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.pornstar-slider-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-bg);
    border: 2px solid var(--color-bg);
}

.pornstar-slider-name {
    font-size: 10px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-align: center;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pornstar-slider-videos {
    display: none;
}

/* Mobile */
@media (max-width: 640px) {
    .pornstar-slider-section {
        padding: 8px 0;
    }

    .pornstar-slider-track {
        gap: 10px;
        padding: 4px 32px;
    }

    .pornstar-slider-avatar {
        width: 48px;
        height: 48px;
    }

    .pornstar-slider-name {
        font-size: 9px;
        max-width: 50px;
    }

    .pornstar-slider-arrow {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .pornstar-slider-track {
        gap: 16px;
        padding: 4px 40px;
    }

    .pornstar-slider-avatar {
        width: 64px;
        height: 64px;
    }

    .pornstar-slider-name {
        font-size: 11px;
        max-width: 70px;
    }

    .pornstar-slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* ===========================================
   TRENDING BADGES - Compact category/tag slider
   =========================================== */
.trending-badges-section {
    margin-bottom: 16px;
    overflow: hidden;
}

.trending-badges-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}

.trending-badges-track::-webkit-scrollbar {
    display: none;
}

.trending-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.trending-badge--category {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.trending-badge--category:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.trending-badge--tag {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-tertiary);
}

.trending-badge--tag:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-hover);
    color: var(--color-text);
}

@media (max-width: 767px) {
    .trending-badges-section {
        display: none !important;
    }
}

/* ===========================================
   SKELETON LOADING - Animated placeholders
   =========================================== */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-bg-elevated) 0%,
        var(--color-bg-hover) 50%,
        var(--color-bg-elevated) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

.skeleton-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
}

.skeleton-title {
    height: 16px;
    width: 90%;
    border-radius: var(--radius-sm);
}

.skeleton-meta {
    height: 12px;
    width: 60%;
    border-radius: var(--radius-sm);
}

.skeleton-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-text-sm {
    height: 10px;
    border-radius: var(--radius-sm);
}

.skeleton-text-md {
    height: 14px;
    border-radius: var(--radius-sm);
}

/* Skeleton grid - same layout as video grid */
.skeleton-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
    .skeleton-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

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

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

/* Fade in animation for loaded content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.3s ease-out forwards;
}

/* Hide search bar on mobile below 768px (mobile) */
@media (max-width: 767px) {
    .yt-search {
        display: none !important;
    }
}

/* People directory cards - name hover (pornstars / studios / authors) */
.ppl-card .ppl-name { transition: color .15s ease; }
.ppl-card:hover .ppl-name { color: var(--color-accent); }
