/* ========================================
   NoSub — Design System
   ========================================
   Layers:
   1. TOKENS     — CSS variables, fonts (accent neutre cyan ;
                   les couleurs Kick/Twitch vivent dans --platform-*)
   2. BASE       — Reset, typography, scrolling
   3. UTILITIES  — Helper classes
   4. LAYOUT     — Background effects, header, hero, trending,
                   how-it-works, footer, toast notifications
   5. ANIMATIONS — Keyframes
   6. RESPONSIVE — Media queries for theater mode, mobile, tablet, desktop
   ======================================== */

/* Google Fonts : chargées via <link> dans le HTML (perf : évite la chaîne
   CSS -> @import -> CSS bloquante). Familles : Inter 400-700, Space Grotesk 500-700. */

/* ========================================
   LAYER 1: TOKENS — CSS variables, fonts
   ======================================== */
:root {
    /* Colors */
    --bg-primary: #0f0f12;
    --bg-secondary: #16161a;
    --bg-card: rgba(22, 22, 26, 0.6);
    --bg-glass: rgba(255, 255, 255, 0.03);
    
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --accent-primary: #38bdf8;
    --accent-hover: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.3);
    --accent-rgb: 56, 189, 248;

    /* Identité plateforme — réservé aux badges/chips de contenu */
    --platform-kick: #53fc18;
    --platform-twitch: #9146ff;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(56, 189, 248, 0.3);

    /* Gradients */
    --gradient-accent: linear-gradient(135deg, #38bdf8 0%, #c084fc 100%);
    --gradient-dark: linear-gradient(180deg, #0f0f12 0%, #09090b 100%);

    /* Shadows */
    --shadow-glow: 0 0 60px -15px rgba(56, 189, 248, 0.4);
    --shadow-card: 0 4px 24px -4px rgba(0, 0, 0, 0.4);
    
    /* Sizing */
    --radius: 12px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    
    /* Additional UI */
    --accent-secondary: #c084fc;
    --bg-hover: rgba(255, 255, 255, 0.06);
}

/* ========================================
   LAYER 2: BASE — Reset & typography
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background: var(--gradient-dark);
    min-height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10000;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--accent-primary);
    color: #04121d;
    font-weight: 700;
    transform: translateY(-140%);
    transition: transform var(--transition-fast);
}

.skip-link:focus-visible {
    transform: translateY(0);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

main {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

.hidden {
    display: none !important;
}

.no-scroll {
    overflow: hidden !important;
}

.no-access header,
.no-access main,
.no-access footer,
.no-access .bg-grid,
.no-access .bg-glow,
.no-access .bg-glow-secondary {
    pointer-events: none;
    user-select: none;
    filter: blur(6px);
    opacity: 0.35;
}

.access-gate {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at top, rgba(120, 68, 255, 0.15), rgba(10, 10, 14, 0.9));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.access-gate.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.access-gate__card {
    width: 100%;
    max-width: 520px;
    background: linear-gradient(140deg, rgba(24, 24, 34, 0.92), rgba(12, 12, 20, 0.85));
    border: 1px solid rgba(148, 98, 255, 0.35);
    border-radius: var(--radius-lg);
    padding: 28px 30px 30px;
    box-shadow: 0 28px 70px -40px rgba(var(--accent-rgb), 0.6), var(--shadow-card);
    text-align: center;
}

.access-gate__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    margin-bottom: 10px;
}

.access-gate__text {
    color: rgba(233, 234, 245, 0.9);
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.7;
}

.access-gate__text + .access-gate__text {
    margin-top: 12px;
}

.access-gate__text:last-of-type {
    margin-bottom: 20px;
}

.access-gate__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    background: var(--gradient-accent);
    color: #0b0b0f;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.access-gate__button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

/* ========================================
   LAYER 3: UTILITIES
   ========================================
   Utility Classes
   ======================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-box {
    box-shadow: var(--shadow-glow);
}

/* ========================================
   LAYER 4: LAYOUT — Background, header, hero, footer
   ========================================
   Background Effects
   ======================================== */

.bg-grid {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: var(--accent-glow);
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.bg-glow-secondary {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 400px;
    height: 400px;
    background: rgba(var(--accent-rgb), 0.15);
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

/* Respecte le réglage système « réduire les animations » (accessibilité + perf). */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   Header
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 12px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.logo-container:hover {
    opacity: 0.8;
}

.logo-icon {
    position: relative;
}

.logo-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: var(--accent-glow);
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.logo-container:hover .logo-icon::before {
    opacity: 1;
}

.logo-icon img,
.logo-icon svg {
    width: 36px;
    height: 36px;
    position: relative;
    z-index: 1;
    display: block;
}

.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-text span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bmc-btn {
    min-width: 0; 
    font-size: 20px; 
    height: 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-shrink: 1;
    min-width: 0;
}

.nav-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link-donate {
    color: var(--accent-primary);
}

.nav-link-donate:hover {
    color: var(--accent-hover);
}

/* Language links (manual switch) */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 8px;
    border-left: 1px solid var(--border-color);
}

.lang-link {
    font-size: 0.8125rem;
    color: var(--text-muted);
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.lang-link:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.03);
}

.lang-link.active,
.lang-link[aria-current="true"] {
    color: #061006;
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    font-weight: 800;
}

/* Menu hamburger mobile */
.mobile-menu-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
}

.mobile-menu-toggle span {
	width: 24px;
	height: 2px;
	background: var(--text-primary);
	border-radius: 2px;
	transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
	transform: rotate(45deg) translateY(7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
	opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
	transform: rotate(-45deg) translateY(-7px);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    position: relative;
    min-height: 760px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 96px 24px 48px;
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

/* Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out;
}

.hero-badge svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.hero-badge span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Heading */
.hero-title {
    font-size: clamp(2.5rem, 6vw, 3.75rem);
    font-weight: 700;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-title .highlight {
    display: block;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Input Card */
.input-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-glow);
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.input-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.input-box {
    flex: 1;
    width: 100%;
    height: 48px;
    min-height: 48px;
    box-sizing: border-box;
    padding: 0 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

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

.input-box:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Select */
.select-wrapper {
    position: relative;
    min-width: 140px;
}

.quality-select {
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 0 40px 0 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    transition: all var(--transition-fast);
}

.quality-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-secondary);
    pointer-events: none;
}

.quality-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px;
}

/* Button */
/* Mode Toggle Switch */
.mode-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.mode-toggle-btn {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 480px) {
    .mode-toggle-btn {
        height: 44px;
        font-size: 0.875rem;
    }
    
    .mode-toggle-btn span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .mode-toggle-btn svg {
        width: 16px;
        height: 16px;
    }
}

.mode-toggle-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.mode-toggle-btn.active {
    color: white;
    background: var(--gradient-accent);
    box-shadow: 0 4px 20px -4px rgba(var(--accent-rgb), 0.4);
    transform: scale(1.02);
}

.mode-toggle-btn.active::before {
    opacity: 1;
}

.mode-toggle-btn:hover:not(.active) {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--text-primary);
}

.mode-toggle-btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px -8px rgba(var(--accent-rgb), 0.5);
    color: white;
}

.btn-primary:active {
    transform: scale(0.98);
}

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

/* Scroll Indicator */
.scroll-indicator {
    margin-top: 24px;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.scroll-indicator a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.scroll-indicator a:hover {
    color: var(--text-primary);
}

.scroll-indicator span {
    font-size: 0.78rem;
}

.scroll-indicator svg {
    width: 16px;
    height: 16px;
    animation: bounce 2s infinite;
}



/* ========================================
   Trending Section
   ======================================== */

.trending-section {
    position: relative;
    z-index: 1;
}

#trending-section {
    padding-top: 20px;
    padding-bottom: 40px;
    scroll-margin-top: 100px;
}

#trending-section .section-header {
    margin-bottom: 24px;
}

.trending-hero {
    padding: 120px 0 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.trending-hero h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 12px;
}

.trending-hero-subtitle {
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
}

.trending-page {
    padding: 20px 0 90px;
    position: relative;
    z-index: 1;
}

.trending-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.trending-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.trending-filter {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.trending-filter:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.trending-filter.is-active {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.trending-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.trending-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.trending-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.trending-panel-header h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
}

.trending-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: border var(--transition-fast), background var(--transition-fast);
}

.trending-item:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}

.trending-rank {
    min-width: 36px;
    font-weight: 700;
    color: var(--accent-primary);
}

.trending-meta {
    flex: 1;
    min-width: 0;
}

.trending-title {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.trending-action {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.trending-action:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.trending-more {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
}

.trending-more:hover {
    color: var(--text-primary);
}

.trending-empty {
    color: var(--text-muted);
    padding: 12px;
    text-align: center;
}

.trending-tabs {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* VOD Thumbnails Grid */
.trending-vods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .trending-vods-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.trending-vod-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.trending-vod-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

.trending-vod-thumbnail {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    text-decoration: none;
}

.trending-vod-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.trending-vod-card:hover .trending-vod-thumbnail img {
    transform: scale(1.05);
}

.trending-vod-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent-primary);
    color: #000;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    z-index: 10;
}

.trending-vod-game-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    z-index: 10;
    max-width: calc(100% - 16px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-vod-time-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    z-index: 10;
}

.trending-vod-game {
    font-size: 0.8rem;
    color: var(--accent-primary);
    margin-top: 4px;
}

.trending-vod-info {
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-top: none;
}

.trending-vod-info h3 {
    font-size: 0.95rem;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-vod-info h3 a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
    cursor: pointer;
}

.trending-vod-info h3 a:hover {
    color: var(--accent-primary) !important;
}

.trending-vod-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.trending-filter {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    background: transparent;
}

.trending-filter:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(var(--accent-rgb), 0.05);
}

.trending-filter.is-active {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
    font-weight: 600;
}

/* Tab Switch */
.trending-tabs {
    display: flex;
    gap: 12px;
    background: var(--bg-card);
    padding: 6px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.trending-tab {
    padding: 10px 24px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex: 1;
    text-align: center;
}

.trending-tab:hover {
    color: var(--text-primary);
    background: rgba(var(--accent-rgb), 0.08);
}

.trending-tab.is-active {
    background: var(--accent-primary);
    color: #000;
    font-weight: 600;
}

/* Trending Navigation Links */
.trending-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #61e8f9 100%);
    color: #000;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 16px rgba(97, 232, 249, 0.3);
}

.trending-nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(97, 232, 249, 0.5);
}

/* Load More */
.trending-load-more {
    text-align: center;
    padding: 32px 0;
}

.trending-load-more .btn-primary {
    min-width: 200px;
}

/* Home Page Trending Section */
.trending-vods-grid-home {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .trending-vods-grid-home {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .trending-vods-grid-home {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding-bottom: 12px;
        margin-bottom: 0;
    }
    
    .trending-vods-grid-home::-webkit-scrollbar {
        height: 4px;
    }
    
    .trending-vods-grid-home::-webkit-scrollbar-track {
        background: var(--bg-secondary);
        border-radius: 2px;
    }
    
    .trending-vods-grid-home::-webkit-scrollbar-thumb {
        background: var(--accent-primary);
        border-radius: 2px;
    }
}

.trending-vods-grid-home .trending-vod-card {
    overflow: hidden;
    background: var(--bg-card);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

@media (min-width: 769px) {
    .trending-vods-grid-home .trending-vod-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 40px -8px rgba(var(--accent-rgb), 0.25);
        border-color: var(--border-hover);
    }
}

@media (max-width: 768px) {
    .trending-vods-grid-home .trending-vod-card {
        flex: unset;
        scroll-snap-align: unset;
    }
}

@media (max-width: 768px) {
    .trending-vods-scroll {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 0;
    }
    
    .trending-vods-scroll::-webkit-scrollbar {
        height: 4px;
    }
    
    .trending-vods-scroll::-webkit-scrollbar-track {
        background: var(--bg-secondary);
        border-radius: 2px;
    }
    
    .trending-vods-scroll::-webkit-scrollbar-thumb {
        background: var(--accent-primary);
        border-radius: 2px;
    }
    
    .trending-vods-scroll .trending-vod-card {
        flex: 0 0 240px;
        scroll-snap-align: start;
    }
}

.trending-vods-grid-home .trending-vod-thumbnail {
    border-radius: var(--radius) var(--radius) 0 0;
}

.trending-vods-grid-home .trending-vod-info {
    padding: 10px;
}

.trending-vods-grid-home .trending-vod-info h3 {
    font-size: 0.85rem !important;
    margin-bottom: 3px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-vod-card-small {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.trending-vod-card-small:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px -8px rgba(var(--accent-rgb), 0.25);
    border-color: var(--border-hover);
}

.trending-vod-thumbnail-small {
    position: relative;
    display: block;
    overflow: hidden;
    background: #1a1a1e;
    aspect-ratio: 16 / 9;
}

.trending-vod-thumbnail-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.trending-vod-card-small:hover .trending-vod-thumbnail-small img {
    transform: scale(1.05);
}

.trending-vod-badge-small {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent-primary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
}

.trending-vod-game-badge-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    padding: 3px 6px;
    border-radius: 4px;
    z-index: 3;
    max-width: calc(100% - 60px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-vod-lang-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    z-index: 3;
    text-transform: uppercase;
}

.trending-vod-info-small .trending-vod-game {
    font-size: 11px;
    color: var(--accent-primary);
    margin: 2px 0 0 0;
}

.trending-vod-info-small {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.trending-vod-info-small h4 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    color: var(--text-primary);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    display: -webkit-box;
}

.trending-vod-info-small h4 a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.trending-vod-info-small h4 a:hover {
    color: var(--accent-primary);
}

.trending-vod-info-small p {
    font-size: 12px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-vod-info-small .small-game-tag {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--accent-primary);
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Trending Streamers Grid */
.trending-streamers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .trending-streamers-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Player actions: keep every action labeled and aligned as one toolbar. */
#player-action-btns {
    align-items: center;
    gap: 10px;
}

#player-action-btns .player-action-btn {
    min-width: 0;
    min-height: 44px;
    margin: 0 !important;
    padding: 8px 16px !important;
    border-radius: 22px !important;
    white-space: nowrap;
}

#player-action-btns .dropdown-container {
    position: relative;
    display: inline-flex;
}

@media (max-width: 640px) {
    #player-action-btns {
        gap: 8px;
    }

    #player-action-btns .player-action-btn {
        padding: 8px 12px !important;
        font-size: 0.82rem !important;
    }
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-primary);
}

.stat-icon svg {
    width: 21px;
    height: 21px;
}

.trending-streamer-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.trending-streamer-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 16px rgba(97, 232, 249, 0.2);
    transform: translateY(-2px);
}

.streamer-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.streamer-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.streamer-initials {
    font-size: 28px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.streamer-rank {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-primary);
    color: #000;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.streamer-info {
    flex: 1;
    min-width: 0;
}

.streamer-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.streamer-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.streamer-title a:hover {
    color: var(--accent-primary);
}

.streamer-plays {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 6px 0 0 0;
}

.trending-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========================================
   Paris RP Callout
   ======================================== */

.paris-rp-callout {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.12) 0%, rgba(200, 0, 0, 0.06) 100%);
    border: 1px solid rgba(255, 68, 68, 0.4);
    padding: 14px 20px;
    border-radius: var(--radius);
    margin: 12px 0 24px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    animation: paris-rp-pulse 2s ease-in-out infinite;
}

.paris-rp-callout:hover {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.2) 0%, rgba(200, 0, 0, 0.1) 100%);
    border-color: #ff4444;
    animation: none;
}

@keyframes paris-rp-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 68, 68, 0.2); }
    50% { box-shadow: 0 0 20px rgba(255, 68, 68, 0.4); }
}

.paris-rp-callout-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 68, 68, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ff4444;
}

.paris-rp-callout-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.paris-rp-callout-text strong {
    color: #ff6666;
    font-size: 14px;
}

.paris-rp-callout-text span {
    color: var(--text-secondary);
    font-size: 12px;
}

.paris-rp-callout-arrow {
    color: #ff4444;
    flex-shrink: 0;
}

/* ========================================
   How It Works Section
   ======================================== */

.how-it-works {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    margin-bottom: 24px;
}

.section-badge svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.section-badge span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.step-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: all var(--transition-normal);
}

.step-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.step-icon-wrapper {
    position: relative;
    display: inline-flex;
    margin-bottom: 24px;
}

.step-icon-glow {
    position: absolute;
    inset: 0;
    background: var(--accent-glow);
    border-radius: var(--radius);
    filter: blur(16px);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.step-card:hover .step-icon-glow {
    opacity: 1;
}

.step-icon {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.step-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
}

.step-number {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.step-card h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.home-seo-section {
    padding: 20px 0 100px;
    position: relative;
    z-index: 1;
}

.home-seo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    max-width: 1040px;
    margin: 0 auto;
}

.home-seo-card {
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
}

.home-seo-card h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.home-seo-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.home-seo-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.home-seo-links a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid rgba(var(--accent-rgb), 0.24);
    border-radius: var(--radius-full);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.home-seo-links a:hover {
    border-color: rgba(var(--accent-rgb), 0.48);
    background: rgba(var(--accent-rgb), 0.14);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    padding: 48px 0 32px;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    width: 28px;
    height: 28px;
}

.footer-logo span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
}

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

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

.language-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.language-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 4px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.language-links a:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: rgba(168, 85, 247, 0.1);
}

.footer-copy {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-copy svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
    fill: var(--accent-primary);
}

.footer-disclaimer {
    width: 100%;
    padding-top: 32px;
    margin-top: 32px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-disclaimer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   Toast Notifications (LAYER 4: LAYOUT continued)
   ======================================== */

.toast-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 400px;
	pointer-events: none;
}

.toast {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px;
	background: var(--bg-card);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	animation: slideInRight 0.3s ease-out;
	pointer-events: auto;
}

.toast.error {
	border-color: rgba(239, 68, 68, 0.3);
	background: rgba(239, 68, 68, 0.1);
}

.toast.success {
	border-color: rgba(34, 197, 94, 0.3);
	background: rgba(34, 197, 94, 0.1);
}

.toast.warning {
	border-color: rgba(245, 158, 11, 0.3);
	background: rgba(245, 158, 11, 0.1);
}

.toast.info {
	border-color: rgba(var(--accent-rgb), 0.25);
	background: rgba(var(--accent-rgb), 0.08);
}

.toast-icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 2px;
}

.toast.error .toast-icon {
	color: #ef4444;
}

.toast.success .toast-icon {
	color: #22c55e;
}

.toast.warning .toast-icon {
	color: #f59e0b;
}

.toast.info .toast-icon {
	color: var(--accent-primary);
}

.toast-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.toast-title {
	font-weight: 600;
	color: var(--text-primary);
	font-size: 0.95rem;
}

.toast-message {
	font-size: 0.875rem;
	color: var(--text-secondary);
	line-height: 1.4;
}

.toast-action {
    align-self: flex-start;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    border-radius: 6px;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-primary);
    font-weight: 800;
    cursor: pointer;
}

.toast-action:hover {
    background: rgba(var(--accent-rgb), 0.18);
}

.toast-close {
	flex-shrink: 0;
	background: none;
	border: none;
	color: var(--text-secondary);
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color var(--transition-fast);
}

.toast-close:hover {
	color: var(--text-primary);
}

/* ========================================
   LAYER 5: ANIMATIONS — Keyframes
   ========================================
   Animations
   ======================================== */

@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(100px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes slideOutRight {
	from {
		opacity: 1;
		transform: translateX(0);
	}
	to {
		opacity: 0;
		transform: translateX(100px);
	}
}

.toast.removing {
	animation: slideOutRight 0.3s ease-out forwards;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

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

/* Responsive Design - Trending Page */

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
    .trending-toolbar {
        gap: 16px;
        margin-bottom: 24px;
    }

    .trending-filters {
        gap: 8px;
    }

    .trending-filter {
        padding: 7px 12px;
        font-size: 0.8rem;
    }

    .trending-tabs {
        gap: 8px;
        padding: 5px;
    }

    .trending-tab {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .trending-vods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .trending-list {
        gap: 8px;
    }

    .trending-item {
        padding: 8px 10px;
        gap: 10px;
    }

    .trending-title {
        font-size: 0.9rem;
    }

    .trending-sub {
        font-size: 0.75rem;
    }

    .trending-action {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .trending-load-more .btn-primary {
        min-width: auto;
        width: 100%;
    }

    .trending-hero {
        padding: 90px 0 40px;
    }

    .trending-hero h1 {
        font-size: clamp(1.5rem, 5vw, 2.2rem);
        margin-bottom: 12px;
    }

    .trending-page {
        padding: 16px 0 60px;
    }

    .trending-hero-subtitle {
        font-size: 0.95rem;
    }

    .section-badge {
        padding: 8px 14px;
        margin-bottom: 18px;
    }

    .section-badge svg {
        width: 16px;
        height: 16px;
    }

    .section-badge span {
        font-size: 0.8rem;
    }
}

/* Small Mobile (≤ 480px) */
@media (max-width: 480px) {
    .trending-toolbar {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 18px;
    }

    .trending-filters {
        gap: 6px;
        justify-content: center;
    }

    .trending-filter {
        padding: 6px 11px;
        font-size: 0.75rem;
    }

    .trending-tabs {
        width: 100%;
        gap: 6px;
        padding: 4px;
    }

    .trending-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
        flex: 1;
    }

    .trending-vods-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .trending-list {
        gap: 6px;
    }

    .trending-item {
        padding: 6px 8px;
        gap: 8px;
    }

    .trending-rank {
        min-width: 32px;
        font-size: 0.85rem;
    }

    .trending-title {
        font-size: 0.85rem;
    }

    .trending-sub {
        font-size: 0.7rem;
    }

    .trending-action {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .trending-empty {
        padding: 24px 12px;
        font-size: 0.9rem;
    }

    .trending-hero {
        padding: 70px 0 24px;
    }

    .trending-hero h1 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .trending-hero-subtitle {
        font-size: 0.9rem;
    }

    .trending-page {
        padding: 12px 0 50px;
    }

    .section-badge {
        padding: 6px 12px;
        margin-bottom: 16px;
    }

    .section-badge svg {
        width: 14px;
        height: 14px;
    }

    .section-badge span {
        font-size: 0.75rem;
    }
}

/* Desktop (≥ 1024px) */
@media (min-width: 1024px) {
    .trending-toolbar {
        gap: 24px;
        margin-bottom: 32px;
    }

    .trending-filters {
        gap: 12px;
    }

    .trending-filter {
        padding: 9px 16px;
    }

    .trending-tabs {
        gap: 12px;
    }

    .trending-tab {
        padding: 11px 28px;
    }
}

/* ========================================
   LAYER 6: RESPONSIVE — Media queries, theater mode
   ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    /* Header/nav mobile : voir le bloc @media (max-width: 1040px) plus bas,
       qui couvre déjà cette largeur (règles fusionnées pour éviter les doublons). */

    .hero {
        min-height: 720px;
        padding: 88px 16px 44px;
    }
    
    .input-row {
        flex-direction: column;
    }
    
    .select-wrapper {
        min-width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }

    .home-seo-section {
        padding: 12px 0 72px;
    }

    .home-seo-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-badge {
        padding: 6px 12px;
    }
    
    .hero-badge span {
        font-size: 0.75rem;
    }
    
    .input-card {
        padding: 16px;
    }

    .input-box {
		height: 56px !important;
		min-height: 56px !important;
		font-size: 1rem;
	}

	.quality-select {
		height: 35px !important;
		min-height: 35px !important;
	}
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Theater Mode ───────────────────────── */
body.theater-mode-active {
    overflow: hidden;
}

/* Header glisse vers le haut */
body.theater-mode-active header.header {
    transform: translateY(-100%);
}

header.header {
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-section.theater-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0 !important;      /* annule le margin-top:80px de base qui décalait l'overlay */
    padding: 0 !important;
    z-index: 10000;
    background: #000;
    overflow: hidden;
    animation: theater-enter 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes theater-enter {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

.player-section.theater-mode .container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
}

.player-section.theater-mode .player-container {
    max-width: 100% !important;
    margin: 0 !important;
    gap: 0 !important;
    height: 100vh !important;
    align-items: stretch !important;
}

.player-section.theater-mode .player-card {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    background: #000 !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
    justify-content: center !important;
}

.player-section.theater-mode .video-wrapper {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    position: relative !important;
}

.player-section.theater-mode .video-wrapper video,
.player-section.theater-mode .video-wrapper .video-js {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;   /* garde le ratio 16:9, pas d'étirement */
    background: #000 !important;
}

.player-section.theater-mode .video-info,
.player-section.theater-mode .video-meta {
    display: none !important;
}

.player-section.theater-mode .video-info-container,
.player-section.theater-mode .monetization-container,
.player-section.theater-mode #vod-game-container {
    display: none !important;
}


.player-section.theater-mode .vod-chat-sidebar {
    flex: 0 0 340px !important;
    width: 340px !important;
    min-width: 340px !important;
    max-width: none !important;
    height: 100vh !important;
    max-height: 100vh !important;
    background: #0a0a0d !important;
    border: none !important;
    border-radius: 0 !important;
    border-left: 1px solid rgba(var(--accent-rgb), 0.15) !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* Accent vert en haut du chat en mode cinéma */
.player-section.theater-mode .chat-header {
    background: rgba(var(--accent-rgb), 0.04) !important;
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.12) !important;
}

/* Bouton théâtre actif = vert */
.player-ctrl-btn.theater-active {
    color: var(--accent-primary) !important;
}

/* Badge indicateur "Mode cinéma" */
.theater-hint {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 13, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 24px;
    z-index: 10001;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    animation: theater-hint-anim 3.2s ease forwards;
}

.theater-hint kbd {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: inherit;
    font-size: 11px;
    color: var(--accent-primary);
}

@keyframes theater-hint-anim {
    0%   { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    12%  { opacity: 1; transform: translateX(-50%) translateY(0); }
    70%  { opacity: 1; }
    100% { opacity: 0; }
}

#video-wrapper-container .chapter-menu {
    position: absolute;
    top: 50px;
    right: 10px;
    width: 320px;
    max-height: 400px;
    background: rgba(28, 28, 28, 0.98);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

#video-wrapper-container .chapter-menu.open {
    display: flex;
}

.chapter-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(45, 45, 45, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chapter-menu-header span {
    font-size: 0.875rem;
    font-weight: 600;
    color: #efeff1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chapter-menu-close {
    background: none;
    border: none;
    color: #a8a8b3;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.chapter-menu-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.chapter-menu-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.chapter-menu-loading {
    padding: 24px 16px;
    text-align: center;
    color: #a8a8b3;
    font-size: 0.875rem;
}

.vod-language-tag {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.15);
    color: #efeff1;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.chapter-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.chapter-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.chapter-item.active {
    background: rgba(var(--accent-rgb), 0.15);
}

.chapter-item-time {
    min-width: 56px;
    font-size: 0.8125rem;
    color: #a8a8b3;
    font-variant-numeric: tabular-nums;
}

.chapter-item-game-img {
    width: 36px;
    height: 48px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 10px;
    flex-shrink: 0;
}

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

.chapter-item-name {
    font-size: 0.9375rem;
    color: #efeff1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chapter-item-duration {
    font-size: 0.75rem;
    color: #a8a8b3;
    margin-top: 2px;
}

.chapter-item.active .chapter-item-name {
    color: var(--accent-primary);
}

.chapter-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--accent-primary);
    transition: width 0.1s linear;
}

@media (max-width: 768px) {
    #video-wrapper-container .player-controls-overlay {
        right: 5px;
        gap: 4px;
        align-items: center;
    }

    #video-wrapper-container .theater-mode-toggle {
        padding: 0 8px;
        font-size: 0;
        height: 36px;
    }

    #video-wrapper-container .theater-mode-toggle svg {
        width: 18px;
        height: 18px;
    }

    #video-wrapper-container .theater-mode-toggle span {
        display: none;
    }

    #video-wrapper-container .chapter-select-btn {
        padding: 0 10px;
        font-size: 0;
        height: 36px;
    }

    #video-wrapper-container .chapter-select-btn svg {
        width: 18px;
        height: 18px;
    }

    #video-wrapper-container .chapter-select-btn span {
        display: none;
    }

    #video-wrapper-container .chapter-menu {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100% - 32px);
        max-width: 320px;
        max-height: 60vh;
    }

    .player-center-controls {
        gap: 8px !important;
    }

    .player-center-play {
        width: 64px !important;
        height: 64px !important;
    }

    .player-skip-btn {
        width: 52px !important;
        height: 52px !important;
    }

    .player-top-controls {
        gap: 6px !important;
    }

    .player-bottom-controls {
        padding: 0 8px 8px !important;
    }

    .player-controls-row {
        gap: 8px !important;
    }

    .player-ctrl-btn {
        width: 36px !important;
        height: 36px !important;
    }

    .player-ctrl-btn svg {
        width: 18px !important;
        height: 18px !important;
    }

    .player-volume-slider {
        display: none !important;
    }

    .player-time {
        font-size: 11px !important;
    }

    .player-chapter-btn span {
        display: none !important;
    }

    .player-chapter-btn {
        padding: 6px !important;
    }

}

@media (max-width: 400px) {
    .player-center-controls {
        gap: 4px !important;
    }

    .player-center-play {
        width: 56px !important;
        height: 56px !important;
    }

    .player-center-play svg {
        width: 24px !important;
        height: 24px !important;
    }

    .player-skip-btn {
        width: 44px !important;
        height: 44px !important;
    }

    .player-skip-btn svg {
        width: 18px !important;
        height: 18px !important;
    }

    .player-skip-label {
        display: none !important;
    }

    .player-bottom-controls {
        padding: 0 4px 4px !important;
    }

    .player-controls-row {
        gap: 4px !important;
    }

    .player-ctrl-btn {
        width: 32px !important;
        height: 32px !important;
    }

    .player-ctrl-btn svg {
        width: 16px !important;
        height: 16px !important;
    }

    .player-time {
        font-size: 10px !important;
    }
}
/* Theater Mode Responsive */
@media (max-width: 1024px) {
    .player-section.theater-mode .vod-chat-sidebar {
        flex: 0 0 300px !important;
        width: 300px !important;
        min-width: 300px !important;
    }
}

@media (max-width: 768px) {
    .player-section.theater-mode .player-container {
        flex-direction: column !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }

    .player-section.theater-mode .player-card {
        flex: 0 0 auto !important;
        width: 100vw !important;
        height: calc(100vw * 9 / 16) !important;
        max-height: calc(100vh - 120px) !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .player-section.theater-mode .video-wrapper {
        width: 100vw !important;
        height: 100% !important;
    }

    .player-section.theater-mode .vod-chat-sidebar {
        flex: 1 1 auto !important;
        width: 100vw !important;
        min-width: 100vw !important;
        height: calc(100vh - 100vw * 9 / 16) !important;
        max-height: calc(100vh - 100vw * 9 / 16) !important;
        margin: 0 !important;
        padding: 0 !important;
        border-left: none !important;
        border-top: 1px solid var(--border-color) !important;
    }

    #video-wrapper-container .theater-mode-toggle {
        right: 8px;
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    #video-wrapper-container .theater-mode-toggle span {
        display: none;
    }
}

/* Theater chat adjustments */
.player-section.theater-mode .vod-chat-sidebar .chat-header-title {
    padding: 12px 16px;
    font-size: 0.95rem;
}

.player-section.theater-mode .vod-chat-sidebar .chat-messages {
    padding: 8px;
    gap: 6px;
}

.player-section.theater-mode .vod-chat-sidebar .chat-message {
    padding: 6px;
    font-size: 0.8rem;
}

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

.recent-history-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .recent-history-grid {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .recent-history-grid::-webkit-scrollbar {
        height: 4px;
    }
    
    .recent-history-grid::-webkit-scrollbar-track {
        background: var(--bg-secondary);
        border-radius: 2px;
    }
    
    .recent-history-grid::-webkit-scrollbar-thumb {
        background: var(--accent-primary);
        border-radius: 2px;
    }
}

.recent-history-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.recent-history-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px -8px rgba(var(--accent-rgb), 0.25);
    border-color: var(--border-hover);
}

.recent-history-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

.recent-history-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.recent-history-card:hover .recent-history-thumb img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .recent-history-card {
        flex: 0 0 200px;
        scroll-snap-align: start;
    }
}

.recent-history-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.recent-history-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-history-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
}

.recent-history-time-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 500;
    z-index: 3;
}

.recent-history-game-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
    z-index: 3;
    max-width: calc(100% - 60px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-history-game {
    font-size: 0.8rem;
    color: var(--accent-primary);
    margin: 2px 0 0;
}

.recent-history-owner a {
    color: var(--accent-primary);
    text-decoration: none;
}

.recent-history-owner a:hover {
    text-decoration: underline;
}

.recent-history-info {
    padding: 12px;
}

.recent-history-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

.recent-history-title:hover {
    color: var(--accent-primary);
}

.recent-history-owner {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

/* History page header */
.history-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.history-count {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.history-clear-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,80,80,0.08);
    border: 1px solid rgba(255,80,80,0.2);
    color: #ff6b6b;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
}

.history-clear-btn:hover {
    background: rgba(255,80,80,0.16);
    border-color: rgba(255,80,80,0.4);
}

/* History play overlay */
.history-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45);
    color: #fff;
    opacity: 0;
    transition: opacity 0.18s;
    z-index: 2;
}

.recent-history-card:hover .history-play-overlay {
    opacity: 1;
}

/* Placeholder icon when no image */
.history-thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    z-index: 0;
}

.recent-history-thumb img ~ .history-thumb-placeholder {
    display: none;
}

/* Miniature distante cassée : on réaffiche le placeholder même si l'<img> existe */
.recent-history-thumb.thumb-fallback .history-thumb-placeholder {
    display: flex !important;
}

/* Duration badge */
.history-duration-badge {
    position: absolute;
    bottom: 28px;
    right: 7px;
    background: rgba(0,0,0,0.82);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 3;
    letter-spacing: 0.02em;
}

/* Progress bar */
.history-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.15);
    z-index: 3;
}

.history-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 0 2px 2px 0;
    transition: width 0.3s;
}

/* Streamer avatar + name row */
.history-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 3px;
}

.history-streamer-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Relative date */
.history-date {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

/* Empty state */
.history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
    grid-column: 1 / -1;
}

.app-view-shell {
    padding-top: 96px;
    margin-top: 0;
    min-height: 80vh;
}


/* ========================================
   Video Player Section - Modern Design
   ======================================== */

.player-section {
    padding: 96px 0 40px;
    margin-top: 0;
    position: relative;
    z-index: 1;
}

.player-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.player-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a24 100%);
}

.resume-prompt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.resume-prompt-card {
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.95), rgba(15, 15, 22, 0.98));
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 20px;
    padding: 36px;
    text-align: center;
    max-width: 340px;
    animation: fadeInScale 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(var(--accent-rgb), 0.15);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.resume-prompt-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.4);
}

.resume-prompt-icon svg {
    width: 36px;
    height: 36px;
    color: white;
}

.resume-prompt-card h3 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    color: var(--text-primary);
    font-weight: 600;
}

.resume-prompt-card p {
    margin: 0 0 24px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.resume-prompt-card p span {
    color: var(--accent-primary);
    font-weight: 600;
}

.resume-prompt-buttons {
    display: flex;
    gap: 12px;
}

.btn-resume {
    flex: 1;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
}

.btn-resume:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.5);
}

/* Sur petit écran, la vidéo est basse (aspect-ratio 16/9 sur ~375px de large) :
   la carte doit rester compacte pour ne pas déborder du cadre vidéo. */
@media (max-width: 480px) {
    .resume-prompt-card {
        padding: 14px;
        max-width: 90%;
    }

    .resume-prompt-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 8px;
    }

    .resume-prompt-icon svg {
        width: 18px;
        height: 18px;
    }

    .resume-prompt-card h3 {
        font-size: 0.95rem;
        margin-bottom: 3px;
    }

    .resume-prompt-card p {
        font-size: 0.78rem;
        margin-bottom: 10px;
    }

    .btn-resume,
    .btn-start-over {
        padding: 7px 12px;
        font-size: 0.82rem;
    }
}

.btn-start-over {
    flex: 1;
    padding: 14px 24px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-start-over:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

#video-wrapper-container {
    position: relative;
}

.video-wrapper video,
.video-wrapper .video-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Plein écran natif : garde le ratio, fond noir pour les bandes */
.video-wrapper:fullscreen {
    padding-top: 0 !important;
}
.video-wrapper:fullscreen video,
.video-wrapper:fullscreen .video-js {
    object-fit: contain !important;
    background: #000 !important;
}

.video-info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 15px 24px;
    border-top: 1px solid var(--border-color);
}

.video-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.streamer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.video-meta h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.video-meta p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Modern Player Controls Overlay */
#video-wrapper-container .player-controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    pointer-events: none;
}

#video-wrapper-container .player-controls-overlay * {
    pointer-events: none;
}

#video-wrapper-container .player-controls-overlay button,
#video-wrapper-container .player-controls-overlay input,
#video-wrapper-container .player-controls-overlay select,
#video-wrapper-container .player-controls-overlay .settings-menu,
#video-wrapper-container .player-controls-overlay .chapter-menu,
#video-wrapper-container .player-center-controls,
#video-wrapper-container .player-top-controls,
#video-wrapper-container .player-bottom-controls,
#video-wrapper-container #player-seek-container,
#video-wrapper-container #player-center-play,
#video-wrapper-container .player-skip-btn,
#video-wrapper-container .player-ctrl-btn,
#video-wrapper-container .settings-menu-row,
#video-wrapper-container .settings-option,
#video-wrapper-container .settings-submenu-header {
    pointer-events: auto !important;
}

#video-wrapper-container .quality-select-wrapper {
    min-width: 100px;
}

#video-wrapper-container .quality-select-wrapper .quality-select {
    height: 36px;
    min-height: 36px;
    padding: 0 32px 0 12px;
    font-size: 0.875rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
}

/* Center Controls (Play Button) */
.player-center-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.player-center-controls.visible {
    opacity: 1;
    pointer-events: auto;
}

.player-center-play {
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 10;
}

.player-center-play:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

.player-center-play:active {
    transform: scale(0.95);
}

.player-center-play svg {
    width: 32px;
    height: 32px;
    color: white;
    margin-left: 4px;
}

.player-center-play.playing svg {
    margin-left: 0;
}

.player-center-play.playing .play-icon {
    display: none !important;
}

.player-center-play.playing .pause-icon {
    display: block !important;
}

.player-center-play:not(.playing) .play-icon {
    display: block;
}

.player-center-play:not(.playing) .pause-icon {
    display: none;
}

/* Skip Buttons */
.player-skip-btn {
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    opacity: 0;
}

.player-skip-btn.visible {
    opacity: 1;
}

.player-skip-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.player-skip-btn svg {
    width: 24px;
    height: 24px;
    color: white;
}

.player-skip-label {
    position: absolute;
    bottom: -20px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Top Controls */
.player-top-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.player-top-controls.visible {
    opacity: 1;
}

/* Bottom Controls */
.player-bottom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 16px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.player-bottom-controls.visible {
    opacity: 1;
}

/* Seek Bar */
.player-seek-container {
    margin-bottom: 8px;
    cursor: pointer;
    position: relative;
}

.player-seek-bar {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    transition: height 0.15s ease;
}

.player-seek-container:hover .player-seek-bar {
    height: 6px;
}

.player-seek-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.player-seek-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--accent-primary);
    border-radius: 2px;
}

.player-seek-thumb {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.player-seek-container:hover .player-seek-thumb {
    opacity: 1;
}

.player-seek-preview {
    position: absolute;
    bottom: 100%;
    left: 0;
    transform: translateX(-50%);
    margin-bottom: 12px;
    pointer-events: none;
    z-index: 9999;
    border-radius: 6px;
    padding: 4px;
    background: rgba(0,0,0,0.85);
    box-shadow: 0 4px 24px rgba(0,0,0,0.7);
}

.player-seek-preview-image {
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    background-repeat: no-repeat;
}

.player-seek-preview-time {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    margin-top: 4px;
    background: rgba(0,0,0,0.8);
    border-radius: 3px;
    color: #fff;
    display: inline-block;
    left: 50%;
    position: relative;
    transform: translateX(-50%);
}

/* Controls Row */
.player-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.player-ctrl-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    position: relative;
}

/* Zone de clic élargie sans changer la taille visuelle (facilite le clic,
   surtout sur mobile où les boutons descendent à 32px). */
.player-ctrl-btn::after {
    content: '';
    position: absolute;
    inset: -6px;
}

/* Sélecteur de qualité dans la barre vidéo */
.player-quality-wrap {
    display: flex;
    align-items: center;
}
.player-quality-wrap.is-hidden { display: none; }
.player-quality-select {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    padding: 5px 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    max-width: 130px;
}
.player-quality-select option { background: #14141c; color: #fff; }

.streamer-profile-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--accent-primary);
    font: inherit;
    font-weight: 800;
    padding: 0;
    cursor: pointer;
}

.streamer-profile-link:hover,
.streamer-profile-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

.clip-create-modal {
    width: min(396px, calc(100vw - 18px));
    max-width: 396px;
    max-height: calc(100vh - 18px);
    overflow-y: auto;
    padding: 12px;
    border-radius: 0;
    background: #191c1d;
    border: 0;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
}

.clip-studio-header {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.clip-studio-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f4f4f5;
    font-size: 1rem;
    font-weight: 900;
}

.clip-drag-dots {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.08rem;
    line-height: 1;
}

.clip-studio-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.clip-preview-panel {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 15px 0 12px;
    background: #050606;
}

.clip-preview-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #050606;
}

.clip-preview-video::-webkit-media-controls {
    display: none !important;
}

.clip-preview-shadow {
    position: absolute;
    inset: auto 0 0;
    height: 54px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.64), transparent);
    pointer-events: none;
}

.clip-preview-play {
    position: absolute;
    left: 11px;
    bottom: 9px;
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.clip-preview-range-label {
    position: absolute;
    right: 10px;
    top: 8px;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    text-shadow: 0 1px 2px #000;
}

.clip-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.clip-author-main {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.clip-author-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
}

.clip-author-name {
    color: #f4f4f5;
    font-size: 0.92rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clip-title-count {
    color: #9da3a7;
    font-size: 0.9rem;
    font-weight: 800;
}

.clip-title-input {
    width: 100%;
    height: 36px;
    border: 1px solid #596166;
    border-radius: 2px;
    background: transparent;
    color: #f4f4f5;
    padding: 0 12px;
    font-size: 0.92rem;
    outline: none;
}

.clip-title-input:focus {
    border-color: #b8c0c5;
}

.clip-timeline {
    position: relative;
    height: 48px;
    margin-top: 12px;
    border-radius: 4px;
    overflow: visible;
    background: #586166;
}

.clip-timeline-ruler {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 3px;
    cursor: pointer;
}

.clip-timeline-ruler span {
    width: 4px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
}

.clip-timeline-ruler span.major {
    height: 43px;
    background: rgba(255, 255, 255, 0.7);
}

.clip-selection-window {
    position: absolute;
    top: 0;
    height: 48px;
    min-width: 48px;
    border: 5px solid #f5f5f6;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
}

.clip-selection-window:active {
    cursor: grabbing;
}

.clip-selection-handle,
.clip-selection-grip {
    position: absolute;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 999px;
    background: #d9dddf;
    pointer-events: auto;
}

.clip-selection-handle {
    cursor: ew-resize;
}

.clip-selection-handle.left { left: 10px; }
.clip-selection-handle.right { right: 10px; }
.clip-selection-grip { left: 50%; transform: translateX(-50%); }

.profile-clips-section {
    margin-bottom: 28px;
}

.profile-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 1.05rem;
    color: #fff;
}

.profile-section-title span {
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.16);
    color: var(--accent-primary);
    font-size: 0.78rem;
    font-weight: 800;
}

.streamer-profile-tabs {
    display: flex;
    gap: 4px;
    margin: 12px 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.streamer-profile-tab {
    position: relative;
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 850;
    cursor: pointer;
}

.streamer-profile-tab span {
    margin-left: 6px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.streamer-profile-tab.active {
    color: #fff;
}

.streamer-profile-tab.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -1px;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: var(--accent-primary);
}

.streamer-profile-panel[hidden] {
    display: none;
}

.clip-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--accent-primary);
    color: #0b0f10;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.stream-type-badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    margin-right: 8px;
    padding: 0 7px;
    border-radius: 4px;
    background: var(--accent-primary);
    color: #04121d;
    font-size: 0.68rem;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0.06em;
    vertical-align: middle;
}

.stream-clip-range {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.clip-video-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 11;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(var(--accent-rgb), 0.48);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.clip-page-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.14), rgba(var(--accent-rgb), 0.04));
    border: 1px solid rgba(var(--accent-rgb), 0.35);
}

.clip-page-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}

.clip-page-kicker {
    color: var(--accent-primary);
    font-weight: 900;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.clip-page-title {
    color: #fff;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60vw;
}

.clip-page-meta {
    color: var(--text-secondary, #9aa3a8);
    font-variant-numeric: tabular-nums;
}

.clip-page-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.clip-page-btn {
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.clip-page-btn.primary {
    background: var(--accent-primary);
    color: #0b0f10;
}

.bookmark-list {
    margin: 14px 0 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 190px;
    overflow: auto;
}

.bookmark-list-title {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bookmark-empty {
    padding: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.bookmark-item {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.bookmark-jump {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    padding: 0 10px;
    cursor: pointer;
}

.bookmark-jump strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookmark-jump span {
    color: var(--accent-primary);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.bookmark-delete {
    width: 42px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
}

.bookmark-jump:hover,
.bookmark-delete:hover {
    border-color: rgba(var(--accent-rgb), 0.45);
    background: rgba(var(--accent-rgb), 0.08);
}

.notfound-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    gap: 18px;
    position: relative;
    z-index: 1;
}

.notfound-logo {
    border-radius: 10px;
}

.notfound-code {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: clamp(64px, 14vw, 120px);
    font-weight: 700;
    line-height: 1;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.notfound-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.notfound-hint {
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 0 8px;
}

.notfound-home {
    display: inline-flex;
    padding: 12px 24px;
    text-decoration: none;
}

@media (max-width: 480px) {
    .view-toolbar {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px;
    }

    .view-toolbar h1 {
        font-size: clamp(1.35rem, 8vw, 1.8rem);
        line-height: 1.12;
    }

    .view-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .view-actions > button {
        flex: 1 1 130px;
        justify-content: center;
    }
}

.clip-page-btn:disabled {
    opacity: 0.6;
    cursor: progress;
}

@media (max-width: 640px) {
    .clip-page-title { max-width: 100%; }
    .clip-page-actions { width: 100%; }
    .clip-page-btn { flex: 1; }
}

.clip-window-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    padding: 0 2px;
    color: #8f969c;
    font-size: 0.68rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.clip-selection-bubble {
    width: 96px;
    margin: 5px auto 0;
    padding: 8px 7px;
    border-radius: 3px;
    background: #262a30;
    text-align: center;
    color: #8f969c;
    font-size: 0.78rem;
    font-weight: 800;
}

.clip-selection-bubble strong {
    color: #fff;
    font-size: 0.9rem;
}

.clip-selection-bubble small {
    display: block;
    margin-top: 4px;
    color: #8f969c;
    font-size: 0.72rem;
}

.clip-result-panel {
    margin-top: 12px;
    padding: 10px;
    border: 1px solid rgba(var(--accent-rgb), 0.28);
    border-radius: 4px;
    background: rgba(var(--accent-rgb), 0.08);
}

.clip-result-head {
    display: grid;
    gap: 3px;
    margin-bottom: 9px;
}

.clip-result-kicker {
    color: var(--accent-primary);
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.clip-result-head strong {
    color: #fff;
    font-size: 0.92rem;
}

.clip-result-head small {
    color: #a9b1b6;
    font-weight: 800;
}

.clip-result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.clip-result-btn {
    min-height: 34px;
    border: 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.clip-result-btn.primary {
    background: var(--accent-primary);
    color: #0b0f10;
}

.clip-result-btn:disabled {
    opacity: 0.6;
    cursor: progress;
}

.clip-result-command {
    width: 100%;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.25);
    color: #b8c0c5;
    padding: 0 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
}

.clip-create-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.clip-cancel-btn,
.clip-publish-btn {
    min-width: 78px;
    height: 38px;
    border: 0;
    border-radius: 2px;
    font-weight: 900;
    cursor: pointer;
}

.clip-cancel-btn {
    background: transparent;
    color: #f4f4f5;
}

.clip-publish-btn {
    background: #33373b;
    color: rgba(255, 255, 255, 0.78);
}

.clip-publish-btn:disabled {
    color: rgba(255, 255, 255, 0.26);
    cursor: not-allowed;
}

.clip-publish-btn:not(:disabled) {
    background: var(--accent-primary);
    color: #04121d;
}

.clip-hidden-controls {
    display: none;
}

.streamer-profile-content {
    width: 100%;
}

.streamer-profile-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.streamer-profile-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.streamer-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(var(--accent-rgb), 0.28);
}

.streamer-profile-avatar-empty {
    display: block;
}

.streamer-profile-platform {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent-primary);
    font-size: 0.72rem;
    font-weight: 900;
    margin-bottom: 6px;
}
.streamer-profile-platform.kick {
    background: rgba(83, 252, 24, 0.14);
    color: var(--platform-kick);
}
.streamer-profile-platform.twitch {
    background: rgba(145, 70, 255, 0.18);
    color: #b184ff;
}

.streamer-profile-main h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2.4vw, 2.25rem);
    line-height: 1;
}

.streamer-profile-main p {
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-weight: 700;
}

.streamer-profile-official {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 6px;
    background: var(--accent-primary);
    color: #04121d;
    text-decoration: none;
    font-weight: 900;
    white-space: nowrap;
}

.streamer-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

@media (max-width: 700px) {
    .streamer-profile-hero {
        grid-template-columns: auto 1fr;
    }

    .streamer-profile-official {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* Indicateur d'utilisateurs en ligne (présence réelle) */
.online-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
    margin-left: 10px;
}
.online-indicator.is-empty { display: none; }
.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: onlinePulse 2s infinite;
}
@keyframes onlinePulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5); }
    70%  { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

/* Anti-adblock : porte de blocage plein écran */
.adblock-gate {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(6, 6, 10, 0.94);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.adblock-gate-card {
    max-width: 460px;
    text-align: center;
    background: #14141c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}
.adblock-gate-icon { font-size: 42px; margin-bottom: 12px; }
.adblock-gate-card h2 { margin: 0 0 12px; color: #fff; font-size: 1.35rem; }
.adblock-gate-card p { color: var(--text-secondary); line-height: 1.55; margin-bottom: 22px; }
body.adblock-locked { overflow: hidden; }

.player-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-primary);
}

.player-ctrl-btn svg {
    width: 22px;
    height: 22px;
}

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

.player-volume-slider input[type="range"] {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

.player-volume-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

/* Time Display */
.player-time {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-variant-numeric: tabular-nums;
}

.player-time .current {
    color: white;
}

/* Chapter Button */
.player-chapter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.player-chapter-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
}

.player-chapter-btn svg {
    width: 18px;
    height: 18px;
}

/* Theater button styles */
.theater-mode-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 50;
}

#video-wrapper-container .theater-mode-toggle {
    position: relative;
    top: auto;
    right: auto;
    z-index: auto;
}

.theater-mode-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.theater-mode-toggle.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.theater-mode-toggle svg {
    width: 16px;
    height: 16px;
}

/* Settings Menu - YouTube style */
.settings-menu {
    position: absolute;
    bottom: 60px;
    right: 60px;
    width: 280px;
    background: rgba(20, 20, 24, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
    pointer-events: auto !important;
}

.settings-menu.open {
    display: flex;
    pointer-events: auto !important;
}

.settings-menu * {
    pointer-events: auto;
}

.settings-menu-section {
    padding: 8px 0;
}

.settings-menu-section:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-menu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    pointer-events: auto;
}

.settings-menu-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.settings-menu-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-menu-row-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.settings-menu-row-value {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.settings-menu-row-arrow {
    color: rgba(255, 255, 255, 0.4);
}

.settings-submenu {
    background: rgba(20, 20, 24, 0.98);
    display: none;
    flex-direction: column;
    overflow-y: auto;
    max-height: 320px;
}

.settings-submenu.open {
    display: flex;
}

.settings-menu.open #settings-main-menu {
    display: block;
}

.settings-submenu-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.settings-submenu-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.settings-submenu-header svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.settings-submenu-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.settings-option {
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.settings-option.active {
    color: var(--accent-primary);
}

.settings-option.active::after {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2353fc18'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* VOD Chat Sidebar */
.vod-chat-sidebar {
    width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 100%;
}

.chat-header-title {
    padding: 12px 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-height: 0;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.chat-message {
    padding: 4px 12px;
    font-size: 0.8375rem;
    line-height: 1.55;
    word-break: break-word;
    border-radius: 4px;
    transition: background 0.1s;
    position: relative;
}

.chat-message:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chat-reply-context {
    margin: 0 0 4px 22px;
    padding: 5px 8px;
    border-left: 2px solid rgba(var(--accent-rgb), 0.65);
    border-radius: 0 6px 6px 0;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.25;
    max-width: 100%;
}

.chat-reply-context strong {
    color: var(--accent-primary);
    margin-right: 4px;
}

.chat-reply-context span {
    word-break: break-word;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chat-username {
    font-weight: 600;
    color: var(--accent-primary);
}

.chat-time {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: inherit;
    cursor: pointer;
}

.chat-time:hover,
.chat-time:focus-visible {
    color: var(--accent-primary);
    text-decoration: underline;
    outline: none;
}

.chat-text {
    color: var(--text-secondary);
    word-wrap: break-word;
    line-height: 1.3;
}

/* Sidebar Tabs */
.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-tab.active {
    color: var(--accent-primary);
}

.sidebar-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
}

/* Sidebar Content */
.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.tab-content {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
}

/* Comments Tab */
.comments-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.comments-count {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

#comments-count-badge {
    color: var(--text-muted);
    font-weight: 400;
}

.comments-sort-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 4px 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

.comments-sort-select:hover {
    background: rgba(255, 255, 255, 0.08);
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.comment-item {
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 600;
    color: var(--accent-primary);
}

.comment-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.comment-body {
    color: var(--text-secondary);
    word-wrap: break-word;
    line-height: 1.4;
    margin-bottom: 8px;
}

.comment-timestamp-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: var(--radius);
    background: rgba(var(--accent-rgb), 0.1);
    cursor: pointer;
    margin-bottom: 8px;
}

.comment-timestamp-link:hover {
    background: rgba(var(--accent-rgb), 0.2);
}

.comment-body .timestamp-link {
    color: var(--accent-hover);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    padding: 0 2px;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.comment-body .timestamp-link:hover {
    background: rgba(var(--accent-rgb), 0.2);
    color: #c084fc;
}

.comment-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.comment-reactions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.reaction-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reaction-pill:hover {
    background: rgba(255, 255, 255, 0.08);
}

.reaction-pill.active {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: var(--accent-primary);
}

.reaction-pill.readonly {
    cursor: default;
    opacity: 0.7;
}

.reaction-pill.readonly:hover {
    background: rgba(255, 255, 255, 0.05);
}

.reaction-emoji {
    font-size: 0.9rem;
}

.reaction-count {
    color: var(--text-secondary);
    font-weight: 500;
}

.comment-more-actions {
    margin-left: auto;
    position: relative;
}

.btn-more-actions {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius);
}

.btn-more-actions:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.comment-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius);
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 8px;
}

.comment-status-badge.pending {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
}

/* Comments Composer */
.comments-composer {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.comment-textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.85rem;
    resize: vertical;
    font-family: inherit;
}

.comment-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}

.composer-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn-timestamp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-timestamp:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-post-comment {
    margin-left: auto;
    padding: 6px 16px;
    background: var(--accent-primary);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-post-comment:hover {
    opacity: 0.9;
}

.btn-post-comment:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.char-count {
    text-align: right;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.comments-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .player-container {
        flex-direction: column;
    }
    
    .vod-chat-sidebar {
        width: 100%;
        height: 500px;
    }
    
    .reaction-pill {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
}

@media (max-width: 768px) {
    .vod-chat-sidebar {
        height: 450px;
    }
}

@media (max-width: 480px) {
    .vod-chat-sidebar {
        height: 400px;
    }
}

#logo-link, #streamer-name-link {
    transition: opacity 0.2s ease;
    display: inline-block;
    text-decoration: none;
}
#logo-link:hover, #streamer-name-link:hover {
    opacity: 0.8;
}

#share-btn:hover {
    background: var(--accent-primary) !important;
    color: white !important;
}

.view-section {
    position: relative;
    z-index: 2;
}

.player-section {
    position: relative;
    z-index: 2;
}

/* GAMES CSS */
/* ============================================================
   Games Browse Page (games.html)
   ============================================================ */

.games-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 16px;
}

@media (min-width: 768px) {
	.games-grid {
		grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
	}
}

.game-card {
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.game-card-featured {
	border-color: #ff4444;
	box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
	position: relative;
}

.game-card-featured:hover {
	border-color: #ff6666;
	box-shadow: 0 0 30px rgba(255, 68, 68, 0.5);
}

.game-card-hot-label {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	background: #ff4444;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
	letter-spacing: 0.5px;
}

.game-card-artwork-featured {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #1a0000, #440000);
}

.game-card:hover {
	transform: translateY(-4px);
	border-color: var(--accent-primary);
	box-shadow: 0 8px 24px rgba(145, 70, 255, 0.15);
}

.game-card-link {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
}

.game-card-artwork {
	position: relative;
	width: 100%;
	aspect-ratio: 188 / 250;
	overflow: hidden;
	background: var(--bg-secondary);
}

.game-card-artwork img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.game-card-artwork-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--accent-primary), #6441a5);
	color: white;
}

.game-card-info {
	padding: 12px 14px;
}

.game-card-name {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.game-card-count {
	margin: 0;
	color: var(--text-secondary);
	font-size: 12px;
}

/* ============================================================
   Game Detail Page (game.html) — Search Bar
   ============================================================ */

.game-search-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	padding: 8px 14px;
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	transition: border-color 0.2s;
}

.game-search-bar:focus-within {
	border-color: var(--accent-primary);
}

.game-search-icon {
	flex-shrink: 0;
	color: var(--text-secondary);
	opacity: 0.5;
}

.game-search-input {
	flex: 1;
	border: none;
	background: none;
	color: var(--text-primary);
	font-size: 14px;
	outline: none;
	padding: 0;
}

.game-search-input::placeholder {
	color: var(--text-secondary);
	opacity: 0.5;
}

.game-search-clear {
	display: none;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border: none;
	background: none;
	color: var(--text-secondary);
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	opacity: 0.5;
	transition: opacity 0.2s;
}

.game-search-clear:hover {
	opacity: 1;
}

/* ============================================================
   Game Detail Page (game.html) — Toolbar
   ============================================================ */

.game-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.game-toolbar-group {
	display: flex;
	align-items: center;
	gap: 6px;
}

.game-toolbar-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	background: var(--bg-card);
	color: var(--text-secondary);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s ease;
	white-space: nowrap;
}

.game-toolbar-btn:hover {
	border-color: var(--accent-primary);
	color: var(--text-primary);
	background: rgba(145, 70, 255, 0.08);
}

.game-toolbar-btn.active {
	border-color: var(--accent-primary);
	background: var(--accent-primary);
	color: #fff;
}

.game-toolbar-btn svg {
	flex-shrink: 0;
}

/* ============================================================
   Game Detail Page (game.html) — Language Dropdown
   ============================================================ */

.game-lang-dropdown {
	position: relative;
}

.game-lang-btn {
	min-width: 160px;
	justify-content: space-between;
}

.game-lang-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 160px;
	background: rgb(22, 22, 26);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	padding: 6px;
	z-index: 100;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.game-lang-option {
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.1s;
	color: var(--text-secondary);
}

.game-lang-option:hover {
	background: rgba(145, 70, 255, 0.1);
	color: var(--text-primary);
}

.game-lang-option.active {
	background: var(--accent-primary);
	color: #fff;
}

.game-lang-option .lang-flag {
	margin-right: 6px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.game-lang-option .lang-count {
	float: right;
	opacity: 0.5;
	font-size: 12px;
}

/* ============================================================
   Paris RP — Day Dropdown
   ============================================================ */

.rp-day-dropdown {
	position: relative;
}

.rp-day-btn {
	min-width: 120px;
	justify-content: space-between;
}

.rp-day-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 140px;
	background: rgb(22, 22, 26);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	padding: 6px;
	z-index: 100;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	max-height: 300px;
	overflow-y: auto;
}

.rp-day-option {
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.1s;
	color: var(--text-secondary);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.rp-day-option:hover {
	background: rgba(145, 70, 255, 0.1);
	color: var(--text-primary);
}

.rp-day-option.active {
	background: var(--accent-primary);
	color: #fff;
}

.rp-day-option .day-label {
	font-weight: 500;
}

.rp-day-option .day-count {
	opacity: 0.5;
	font-size: 12px;
	margin-left: 8px;
}

/* ============================================================
   Paris RP — Description
   ============================================================ */

.rp-description {
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 16px 20px;
	margin-bottom: 4px;
}

.rp-description p {
	margin: 0;
	color: var(--text-secondary);
	font-size: 13px;
	line-height: 1.6;
}

/* ============================================================
   Paris RP — Streamers Page & Streamer Tag
   ============================================================ */

.rp-streamers-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 12px;
}

.rp-streamer-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.rp-streamer-card:hover {
	transform: translateY(-2px);
	border-color: var(--accent-primary);
	box-shadow: 0 4px 16px rgba(145, 70, 255, 0.12);
}

.rp-streamer-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: linear-gradient(135deg, #ff4444, #cc0000);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	overflow: hidden;
}

.rp-streamer-initials {
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.rp-streamer-avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.rp-streamer-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.rp-streamer-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--text-primary);
}

.rp-streamer-character {
	font-size: 12px;
	color: var(--text-secondary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rp-streamer-arrow {
	color: var(--text-secondary);
	opacity: 0.4;
	flex-shrink: 0;
	transition: opacity 0.2s;
}

.rp-streamer-card:hover .rp-streamer-arrow {
	opacity: 0.8;
}

.rp-streamer-list-btn {
	background: rgba(255, 68, 68, 0.08) !important;
	border-color: rgba(255, 68, 68, 0.3) !important;
	color: #ff4444 !important;
	text-decoration: none !important;
    padding: 6px 15px;
	gap: 6px;
	transition: background 0.2s, border-color 0.2s !important;
}

.rp-streamer-list-btn:hover {
	background: rgba(255, 68, 68, 0.18) !important;
	border-color: rgba(255, 68, 68, 0.5) !important;
}

.rp-streamer-tag {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	background: rgba(255, 68, 68, 0.1);
	border: 1px solid rgba(255, 68, 68, 0.3);
	border-radius: 8px;
	font-size: 13px;
	color: var(--text-primary);
}

.rp-streamer-tag strong {
	color: #ff4444;
}

.rp-streamer-tag-clear {
	display: inline-flex;
	align-items: center;
	color: var(--text-secondary);
	opacity: 0.5;
	transition: opacity 0.2s;
}

.rp-streamer-tag-clear:hover {
	opacity: 1;
	color: #ff4444;
}
	color: #fff;
}

/* ============================================================
   Game Detail Page (game.html) — VOD Cards (uniform height)
   ============================================================ */

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 640px) {
	.game-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 6px;
	}

	.game-toolbar-group {
		justify-content: center;
		flex-wrap: wrap;
		gap: 4px;
	}

	.game-toolbar-btn {
		padding: 8px 12px;
		font-size: 12px;
		white-space: nowrap;
	}

	.game-toolbar-btn svg {
		width: 13px;
		height: 13px;
	}
}


/* ========================================
   Stream Info Bar (below video)
   ======================================== */

.stream-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15);
    flex-shrink: 0;
}

.stream-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stream-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stream-meta {
    display: flex;
    gap: 14px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

/* Quality selector inside player info bar */
.stream-quality-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.stream-quality-ctrl label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.quality-select-player {
    height: 34px;
    padding: 0 28px 0 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: all var(--transition-fast);
    min-width: 90px;
}

.quality-select-player:focus {
    outline: none;
    border-color: var(--accent-primary);
    background-color: rgba(var(--accent-rgb), 0.06);
}

.quality-select-player option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ========================================
   Chat Enhancements
   ======================================== */

.chat-sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: rgba(var(--accent-rgb), 0.15);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.chat-sync-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.chat-sync-badge.chat-sync-badge-off {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-color);
    color: var(--text-muted);
}

.chat-sync-badge.chat-sync-badge-off .chat-sync-dot {
    background: var(--text-muted);
}

.chat-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-align: center;
}

.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    opacity: 0.7;
    animation: pulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.chat-status-empty {
    flex-direction: column;
    gap: 10px;
    padding: 36px 20px;
}

.chat-status-empty::before {
    content: none;
}

.chat-status-empty svg {
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    opacity: 0.5;
}

.chat-status-empty strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.chat-status-empty span {
    color: var(--text-muted);
    font-size: 0.75rem;
    max-width: 220px;
}

.chat-content {
    color: var(--text-primary);
    word-break: break-word;
}

.chat-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-right: 2px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.chat-username {
    font-weight: 700;
    margin-right: 3px;
}

.chat-scroll-btn {
    position: sticky;
    bottom: 8px;
    display: none;
    align-self: center;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent-primary);
    color: #000;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.35);
    transition: all var(--transition-fast);
    z-index: 5;
}

.chat-scroll-btn.visible {
    display: inline-flex;
}

.chat-scroll-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.45);
}

.chat-scroll-btn svg {
    width: 13px;
    height: 13px;
}

/* ========================================
   Loading Button State
   ======================================== */

.btn-primary.is-loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-primary.is-loading svg {
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   Video Player
   ======================================== */

.video-player {
    width: 100%;
    height: 100%;
    background-color: #000;
}

/* Hide native browser controls */
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel { display: none !important; }

/* ── Click zone ── */
.player-click-zone {
    position: absolute;
    inset: 0;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    z-index: 1;
}

.player-buffering {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: grid;
    place-items: center;
    gap: 10px;
    pointer-events: none;
}

.player-buffering[hidden] {
    display: none;
}

.player-buffering-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.35));
}

.player-buffering-label {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.tap-seek-feedback {
    position: absolute;
    top: 50%;
    z-index: 8;
    transform: translateY(-50%);
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    pointer-events: none;
    animation: tapSeekPulse 0.65s ease forwards;
}

.tap-seek-left {
    left: 18%;
}

.tap-seek-right {
    right: 18%;
}

@keyframes tapSeekPulse {
    0% { opacity: 0; transform: translateY(-50%) scale(0.82); }
    20% { opacity: 1; transform: translateY(-50%) scale(1); }
    100% { opacity: 0; transform: translateY(-50%) scale(1.18); }
}

/* ── Seek tooltip ── */
.player-seek-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
    opacity: 0;
    transition: opacity 0.15s;
}

/* ── Overlay d'aide des raccourcis clavier ── */
.shortcuts-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.18s ease-out;
}

.shortcuts-card {
    position: relative;
    background: linear-gradient(145deg, rgba(24, 24, 32, 0.98), rgba(14, 14, 20, 0.98));
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 460px;
    width: calc(100% - 40px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(var(--accent-rgb), 0.08);
    animation: fadeInScale 0.22s ease-out;
}

.shortcuts-card h3 {
    margin: 0 0 18px;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 700;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 16px;
    align-items: center;
}

.shortcuts-grid kbd {
    justify-self: start;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom-width: 2px;
    border-radius: 6px;
    padding: 3px 9px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    white-space: nowrap;
}

.shortcuts-grid span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.shortcuts-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s;
}

.shortcuts-close:hover { color: var(--text-primary); }

/* ── Aperçu image au survol de la barre ── */
.seek-preview {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    transform: translateX(-50%);
    width: 160px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease;
    z-index: 6;
}

.seek-preview canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.seek-preview-time {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 4px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ── Volume group ── */
.player-volume-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.player-volume-track {
    width: 0;
    overflow: hidden;
    transition: width 0.2s ease;
}

.player-volume-group:hover .player-volume-track,
.player-volume-group:focus-within .player-volume-track {
    width: 76px;
}

.player-vol-range {
    -webkit-appearance: none;
    appearance: none;
    width: 72px;
    height: 4px;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    display: block;
}

.player-vol-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.player-vol-range::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.player-vol-range::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.2);
}

/* ── Ensure center/bottom controls sit above click-zone ── */
.player-center-controls { z-index: 2; }
.player-bottom-controls { z-index: 2; }

/* Skip buttons visible with their parent center controls */
.player-center-controls.visible .player-skip-btn { opacity: 1; }

/* ── Search mode tabs ─────────────────── */
.search-mode-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 4px;
}

/* Sélecteur de plateforme (Kick / Twitch) dans la recherche par streamer */
.platform-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 4px;
}
.platform-opt {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.platform-opt:hover { color: var(--text-primary); }
.platform-opt.active {
    background: var(--accent-primary);
    color: #06060a;
}
.platform-opt[data-platform="twitch"].active {
    background: #9147ff;
    color: #fff;
}

.search-mode-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    background: none;
    border: none;
    border-radius: 9px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}

.search-mode-tab:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

.search-mode-tab.active {
    background: var(--accent-primary);
    color: #000;
}

.search-mode-tab.active svg {
    stroke: #000;
}

.streamer-suggestion-panel {
    display: grid;
    gap: 6px;
    margin: -8px 0 14px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(12, 12, 18, 0.96);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.streamer-suggestion-panel[hidden] {
    display: none;
}

.streamer-suggestion-item {
    width: 100%;
    min-height: 46px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.streamer-suggestion-item:hover,
.streamer-suggestion-item:focus-visible,
.streamer-suggestion-item.active {
    background: rgba(var(--accent-rgb), 0.1);
    outline: none;
}

.streamer-suggestion-item img,
.streamer-suggestion-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    object-fit: cover;
}

.streamer-suggestion-main {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.streamer-suggestion-main strong,
.streamer-suggestion-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.streamer-suggestion-main small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.streamer-suggestion-platform {
    color: var(--accent-primary);
    font-size: 0.68rem;
    font-weight: 800;
}

.streamer-suggestion-state {
    padding: 10px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ── VOD results ──────────────────────── */
.vods-status {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-size: 0.9rem;
}

.vods-status.vods-error {
    color: #ff5f57;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vods-streamer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.vods-streamer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(var(--accent-rgb), 0.3);
}

.vods-streamer-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.vods-streamer-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.vods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

.vods-grid::-webkit-scrollbar { width: 4px; }
.vods-grid::-webkit-scrollbar-track { background: transparent; }
.vods-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

.vod-result-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.vod-result-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--accent-rgb), 0.35);
    box-shadow: 0 6px 24px rgba(var(--accent-rgb), 0.08);
}

.vod-result-card:hover .vod-result-play-overlay {
    opacity: 1;
}

.vod-result-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #111;
    overflow: hidden;
}

.vod-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vod-result-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.82);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.vod-result-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.18s;
    color: #fff;
}

.vod-result-info {
    padding: 10px 12px;
}

.vod-result-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 5px;
}

.vod-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Chat badges ─────────────────────── */
.chat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-right: 3px;
    line-height: 0;
}

.chat-badge svg {
    display: block;
}

.chat-badge-text {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
}

/* ── Chat emotes ─────────────────────── */
.chat-emote {
    display: inline-block;
    vertical-align: middle;
    height: 22px;
    width: auto;
    max-width: 60px;
    margin: 0 1px;
    object-fit: contain;
}

/* Badges de chat Twitch (images) */
.chat-badge-img {
    display: inline-block;
    vertical-align: middle;
    height: 18px;
    width: 18px;
    margin: 0 3px 2px 0;
    border-radius: 3px;
    object-fit: contain;
}

/* ── Playback speed selector ──────────── */
.player-speed-wrap {
    position: relative;
}

.player-speed-btn {
    min-width: 38px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.player-speed-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 50%;
    transform: translateX(50%);
    background: rgba(15, 15, 20, 0.96);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    min-width: 80px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    z-index: 100;
}

.player-speed-menu.open {
    display: flex;
}

.speed-opt {
    padding: 8px 16px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    font-size: 0.875rem;
    cursor: pointer;
    text-align: center;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}

.speed-opt:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.speed-opt.active {
    color: var(--accent-primary);
    font-weight: 700;
}

/* ── Related VODs panel (below player) ── */
.related-vods-section {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.related-vods-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.related-vods-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.related-vods-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.related-vods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

@media (max-width: 600px) {
    .related-vods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ── VOD switch loading overlay ─────────── */
.vod-switch-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(6, 6, 10, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: inherit;
    animation: vod-overlay-in 0.22s ease;
}

@keyframes vod-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.vod-switch-spinner {
    filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.5));
}

.vod-switch-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    letter-spacing: 0.02em;
}

.vod-switch-title {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
    max-width: 320px;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Miniature dans l'overlay de switch */
.vod-switch-thumb {
    width: 120px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(var(--accent-rgb),0.3);
    flex-shrink: 0;
}
.vod-switch-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Skeleton loaders ──────────────────── */
@keyframes skeleton-pulse {
    0%   { opacity: 0.5; }
    50%  { opacity: 1;   }
    100% { opacity: 0.5; }
}

.vods-skeleton {
    background: rgba(255,255,255,0.07);
    border-radius: 6px;
    animation: skeleton-pulse 1.4s ease-in-out infinite;
}

/* Skeleton dans la thumb de miniature (caché quand l'image charge) */
.vod-result-thumb .vod-skeleton {
    position: absolute;
    inset: 0;
    border-radius: 0;
    z-index: 0;
}

/* Miniature distante cassée/bloquée : logo en filigrane plutôt qu'une case vide */
.vod-result-thumb.thumb-fallback .vod-skeleton {
    background: url('/static/logo.png') center / 26px no-repeat;
    opacity: 0.35;
}

.vod-result-thumb img {
    position: relative;
    z-index: 1;
}

/* Skeleton header streamer */
.vods-skeleton-header {
    pointer-events: none;
}
.vods-skeleton-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
}
.vods-skeleton-name  { width: 120px; height: 14px; margin-bottom: 6px; }
.vods-skeleton-count { width: 80px;  height: 11px; }

/* Skeleton card entière */
.vod-skeleton-card {
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
}
.vod-skeleton-thumb {
    aspect-ratio: 16/9;
    animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.vod-skeleton-info  { padding: 10px 12px; }
.vods-skeleton-title { height: 13px; margin-bottom: 8px; width: 85%; }
.vods-skeleton-meta  { height: 10px; width: 55%; }

/* ── Toast retry button ────────────────── */
.toast-retry-btn {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(var(--accent-rgb),0.12);
    border: 1px solid rgba(var(--accent-rgb),0.3);
    color: var(--accent-primary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.18s;
}
.toast-retry-btn:hover {
    background: rgba(var(--accent-rgb),0.22);
}

/* ════════════════════════════════════════════
   AUTO-NEXT OVERLAY
   ════════════════════════════════════════════ */
.autonext-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}
.autonext-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    background: rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 90%;
}
.autonext-thumb {
    width: 160px;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}
.autonext-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.autonext-label {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 500;
}
.autonext-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.autonext-countdown-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}
#autonext-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(var(--accent-rgb), 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 8px;
}
.autonext-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.autonext-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.autonext-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}
.autonext-btn-now {
    background: var(--accent-primary);
    color: #000;
}
.autonext-btn-now:hover {
    background: #4ae015;
    transform: scale(1.02);
}

@media (max-width: 600px) {
    .autonext-inner {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    .autonext-thumb {
        width: 100%;
        max-width: 200px;
    }
    .autonext-countdown-row {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ════════════════════════════════════════════
   PLAYER ACTION BUTTONS (Copy, Share, Fav)
   ════════════════════════════════════════════ */
.player-action-btns {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    flex-wrap: wrap;
}

/* Le panneau de raccourcis clavier n'a pas d'utilité sur un écran tactile */
@media (pointer: coarse) {
    #btn-shortcuts {
        display: none;
    }

    #video-wrapper-container .player-seek-container {
        min-height: 24px;
        flex-basis: 24px;
        padding-top: 10px;
        margin-top: -10px;
    }

    #video-wrapper-container .player-seek-bar,
    #video-wrapper-container .player-seek-container:hover .player-seek-bar {
        height: 6px;
    }

    #video-wrapper-container .player-seek-thumb {
        width: 18px;
        height: 18px;
        opacity: 1;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    }
}
.player-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.player-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.player-action-btn.active {
    background: rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.4);
    color: #ff3b30;
}
.player-action-btn.active svg {
    fill: currentColor;
}

/* ════════════════════════════════════════════
   FAVORITES BADGE & BUTTON
   ════════════════════════════════════════════ */
.fav-count-badge {
    background: #ff3b30;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
}
.fav-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    z-index: 10;
}
.recent-history-card:hover .fav-remove-btn {
    opacity: 1;
}
.fav-remove-btn:hover {
    background: #ff3b30;
    transform: scale(1.1);
}

/* ════════════════════════════════════════════
   STATS DASHBOARD
   ════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.stat-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}
.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}
.stat-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}
.stat-chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-top: 8px;
}
.stat-chart-title {
    margin: 0 0 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}
.stat-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.stat-bar-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-bar-name {
    width: 120px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}
.stat-bar-track {
    flex-grow: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
}
.stat-bar-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 6px;
    transition: width 0.5s ease-out;
}
.stat-bar-count {
    width: 40px;
    text-align: right;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

/* ════════════════════════════════════════════
   HISTORY FILTER & EXPORT/IMPORT
   ════════════════════════════════════════════ */

/* ════════════════════════════════════════════
   FAVORITES BADGE & BUTTON
   ════════════════════════════════════════════ */
.fav-count-badge {
    background: #ff3b30;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
}
.mini-fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    z-index: 10;
}
.vod-result-card:hover .mini-fav-btn,
.recent-history-card:hover .mini-fav-btn {
    opacity: 1;
}
.mini-fav-btn:hover {
    background: #ff3b30;
    transform: scale(1.1);
}
.mini-fav-btn.active {
    color: #ff3b30;
}

/* ════════════════════════════════════════════
   STATS DASHBOARD
   ════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.stat-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}
.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}
.stat-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}
.stat-chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-top: 8px;
}
.stat-chart-title {
    margin: 0 0 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}
.stat-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.stat-bar-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-bar-name {
    width: 120px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}
.stat-bar-track {
    flex-grow: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
}
.stat-bar-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 6px;
    transition: width 0.5s ease-out;
}
.stat-bar-count {
    width: 40px;
    text-align: right;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

/* ════════════════════════════════════════════
   HISTORY FILTER & EXPORT/IMPORT
   ════════════════════════════════════════════ */
.history-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
    background: var(--bg-card);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.history-search-input {
    flex-grow: 1;
    min-width: 200px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
.history-search-input:focus {
    border-color: var(--accent-primary);
}
.history-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.history-io-btns {
    display: flex;
    gap: 8px;
}
.history-import-label {
    margin: 0;
}

/* ════════════════════════════════════════════
   BEAUTIFUL PLAYER ACTION BUTTONS OVERRIDE
   ════════════════════════════════════════════ */
.player-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 24px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    backdrop-filter: blur(8px) !important;
}
.player-action-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.player-action-btn svg {
    margin-bottom: 1px;
}

/* ════════════════════════════════════════════
   SPA VIEW TRANSITIONS
   ════════════════════════════════════════════ */
@keyframes viewFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-section.active {
    animation: viewFadeIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.player-section {
    animation: viewFadeIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* ════════════════════════════════════════════
   MODAL (Download popup)
   ════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out forwards;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

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

/* ════════════════════════════════════════════
   MONETIZATION (Ads & Support)
   ════════════════════════════════════════════ */

/* Emplacements pub : espace réservé (zéro CLS), iframe sandbox remplie en lazy. */
.ad-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 112px; /* 90px de bannière + libellé */
}

.ad-slot[hidden] {
    display: none;
}

.ad-slot-label {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.55;
    user-select: none;
}

.ad-slot iframe {
    border: 0;
    max-width: 100%;
    background: transparent;
}

.ad-slot-local-preview iframe {
    display: none;
}

.ad-slot-local-preview::after {
    content: attr(data-ad-preview);
    width: min(100%, 728px);
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(var(--accent-rgb), 0.45);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(var(--accent-rgb), 0.16), rgba(255, 255, 255, 0.045)),
        rgba(0, 0, 0, 0.18);
    color: var(--accent-primary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ad-slot-local-preview[data-ad-size="300x250"]::after {
    width: min(100%, 300px);
    height: 250px;
}

.ad-slot-home {
    margin: 0 auto 48px;
}

.ad-slot-sidebar {
    min-height: 272px; /* 250px + libellé */
    padding: 10px 0 12px;
    border-top: 1px solid var(--border-color);
}

/* Le chat prime : pas de pub quand la place manque ou en immersion. */
@media (max-width: 900px) {
    .ad-slot-sidebar {
        display: none;
    }
}

.player-section.theater-mode .ad-slot-sidebar,
.vod-chat-sidebar.is-overlay .ad-slot-sidebar {
    display: none;
}

@media (max-width: 767px) {
    .ad-slot-player,
    .ad-slot-home {
        min-height: 272px; /* format 300x250 sur mobile */
    }
}

.support-banner {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Overrides for mobile support banner */
@media (max-width: 768px) {
    .support-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
        border-left: none;
        border-top: 4px solid var(--accent-primary);
    }
    .support-banner .player-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Chat Overlay Mode */
.vod-chat-sidebar.is-overlay {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 320px;
    z-index: 20;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.85) 40%);
    border: none;
    border-radius: 0;
    pointer-events: none;
}
.vod-chat-sidebar.is-overlay * { pointer-events: auto; }
.vod-chat-sidebar.is-overlay .chat-header-title { background: transparent; border: none; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.vod-chat-sidebar.is-overlay .chat-messages { mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent); }
.vod-chat-sidebar.is-overlay .chat-message { background: transparent; text-shadow: 0 1px 2px rgba(0,0,0,0.8); color: #fff; border: none !important; }
.vod-chat-sidebar.is-overlay .chat-message:hover { background: rgba(255,255,255,0.1); }
@media (max-width: 768px) { .vod-chat-sidebar.is-overlay { width: 250px; } }

/* Platform Badge on Cards */
.platform-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 4px;
    color: #fff;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.platform-badge.kick {
    background-color: var(--platform-kick);
    color: #000;
}
.platform-badge.twitch {
    background-color: var(--platform-twitch);
}
/* Variante en flux (barre meta lecteur, en-tête profil) */
.platform-badge.inline {
    position: static;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

/* Accessibility Improvements */
:focus-visible { outline: 2px solid var(--accent-primary) !important; outline-offset: 2px; border-radius: 4px; }
.player-ctrl-btn:focus-visible { outline-color: #fff !important; }


/* Skeleton Loader */
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }
.skeleton-card { background: #1a1a24; background-image: linear-gradient(to right, #1a1a24 0%, #2a2a35 20%, #1a1a24 40%, #1a1a24 100%); background-repeat: no-repeat; background-size: 1000px 100%; display: inline-block; position: relative; animation: shimmer 2s infinite linear; border-radius: var(--radius); width: 100%; aspect-ratio: 16/9; }
.skeleton-text { height: 16px; margin-top: 10px; border-radius: 4px; width: 80%; }


/* Dropdown Menu & Touch Targets */
.dropdown-menu { position: absolute; bottom: 100%; left: 0; margin-bottom: 8px; background: #1a1a24; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 50; min-width: 150px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.dropdown-item { background: transparent; border: none; color: #ccc; cursor: pointer; padding: 10px 12px; border-radius: 6px; display: flex; align-items: center; gap: 8px; font-size: 0.9rem; text-align: left; width: 100%; min-height: 44px; transition: all 0.2s ease; }
.dropdown-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.player-action-btn { min-height: 44px; min-width: 44px; justify-content: center; }
.player-ctrl-btn.chat-overlay-btn-visible { display: inline-flex !important; }
.vod-result-card h3 { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }


.vod-error-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; border-radius: 12px; padding: 20px; backdrop-filter: blur(4px); }

.status-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.status-pill-ok { color: #00e676; font-weight: 700; }
.status-pill-down { color: #ff4444; font-weight: 700; }
.status-pill-warn { color: #f59e0b; font-weight: 700; }

.site-support-fallback {
    margin: 10px 16px 0;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(255,255,255,0.035);
}

.site-support-fallback a {
    color: var(--accent-primary);
    font-weight: 700;
    white-space: nowrap;
}

.adblock-notice {
    padding: 10px 12px;
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    border-radius: 8px;
    background: rgba(var(--accent-rgb), 0.06);
    color: var(--text-secondary);
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.adblock-notice a {
    color: var(--accent-primary);
    font-weight: 800;
    white-space: nowrap;
}

/* Kick-like player chrome: compact, dark, icon-first controls. */
#video-wrapper-container {
    background: transparent;
}

#video-wrapper-container .player-controls-overlay {
    font-family: Inter, Arial, sans-serif;
}

#video-wrapper-container .player-bottom-controls {
    min-height: 45px;
    padding: 0 14px 2px;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    transition: opacity 0.16s ease;
    border-bottom: 0;
}

#video-wrapper-container .player-seek-container {
    width: calc(100% + 28px);
    margin: 0 0 0 -14px;
    padding: 0;
    height: 3px;
    flex: 0 0 3px;
}

#video-wrapper-container .player-seek-bar {
    height: 3px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.34);
    transition: height 0.12s ease;
}

#video-wrapper-container .player-seek-container:hover .player-seek-bar {
    height: 3px;
}

#video-wrapper-container .player-seek-buffered {
    border-radius: 0;
    background: rgba(255, 255, 255, 0.48);
}

#video-wrapper-container .player-seek-progress {
    border-radius: 0;
    background: var(--accent-primary);
}

#video-wrapper-container .player-seek-thumb {
    width: 0;
    height: 0;
    background: #fff;
    box-shadow: none;
}

#video-wrapper-container .player-controls-row {
    height: 42px;
    gap: 10px;
    align-items: center;
}

#video-wrapper-container .player-controls-left,
#video-wrapper-container .player-controls-right {
    gap: 0;
    align-items: center;
}

#video-wrapper-container #skip-back-btn,
#video-wrapper-container #skip-fwd-btn {
    display: none;
}

#video-wrapper-container .player-ctrl-btn {
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0;
    background: transparent;
    color: #fff;
    opacity: 0.96;
    transform: none;
    overflow: hidden;
}

#video-wrapper-container .player-ctrl-btn::after {
    inset: 0;
    pointer-events: none;
}

#video-wrapper-container .player-ctrl-btn:hover,
#video-wrapper-container .player-ctrl-btn:focus-visible {
    background: transparent;
    color: #fff;
    opacity: 1;
    transform: none;
}

#video-wrapper-container .player-ctrl-btn svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.65));
}

#video-wrapper-container .player-time {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 42px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

#video-wrapper-container .player-time .sep {
    color: rgba(255, 255, 255, 0.72);
    padding: 0 3px;
}

#video-wrapper-container .player-volume-group {
    height: 42px;
}

#video-wrapper-container .player-volume-track {
    height: 42px;
    display: flex;
    align-items: center;
}

#video-wrapper-container .player-vol-range {
    height: 3px;
    background: rgba(255, 255, 255, 0.42);
    accent-color: var(--accent-primary);
}

#video-wrapper-container .player-quality-wrap,
#video-wrapper-container .player-speed-wrap {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#video-wrapper-container .player-speed-btn #speed-label {
    font-size: 0;
}

#video-wrapper-container .player-speed-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

#video-wrapper-container .player-quality-wrap {
    position: relative;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    justify-content: center;
    color: #fff;
}

#video-wrapper-container .player-quality-icon {
    width: 40px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#video-wrapper-container .player-quality-icon svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.65));
}

#video-wrapper-container .player-quality-select {
    display: none;
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

#video-wrapper-container .player-control-menu,
#video-wrapper-container .player-speed-menu {
    bottom: 42px;
    right: 0;
    min-width: 92px;
    padding: 6px;
    gap: 2px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(12, 12, 14, 0.98);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.58);
}

#video-wrapper-container .player-quality-menu {
    position: absolute;
    display: none;
    flex-direction: column;
    z-index: 100;
}

#video-wrapper-container .player-quality-menu.open {
    display: flex;
}

#video-wrapper-container .speed-opt,
#video-wrapper-container .quality-opt {
    min-height: 34px;
    border-radius: 3px;
    padding: 0 12px;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

#video-wrapper-container .speed-opt.active,
#video-wrapper-container .speed-opt:hover,
#video-wrapper-container .quality-opt.active,
#video-wrapper-container .quality-opt:hover {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-primary);
}

#video-wrapper-container .player-center-play {
    width: 72px;
    height: 72px;
    border: 0;
    background: rgba(0, 0, 0, 0.56);
    box-shadow: none;
}

#video-wrapper-container .player-center-play:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: scale(1.04);
}

@media (max-width: 640px) {
    #video-wrapper-container .player-bottom-controls {
        min-height: 46px;
        padding: 0 6px;
    }

    #video-wrapper-container .player-ctrl-btn {
        flex-basis: 38px;
        width: 38px;
        min-width: 38px;
        max-width: 38px;
        height: 40px;
        min-height: 40px;
    }

    #video-wrapper-container .player-quality-wrap,
    #video-wrapper-container .player-speed-wrap {
        flex-basis: 38px;
        width: 38px;
        min-width: 38px;
        max-width: 38px;
        height: 40px;
    }

    #video-wrapper-container .player-time {
        font-size: 12px;
    }

    #video-wrapper-container .player-quality-select {
        max-width: 76px;
        font-size: 11px;
    }
}

/* Final UX polish: compact first screen, larger hit targets, cleaner clip/profile flows. */
.header-content {
    gap: 10px;
}

.nav-links {
    gap: 14px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
}

.mobile-menu-toggle {
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.hero {
    min-height: 680px;
    padding: 84px 24px 30px;
}

.hero-badge {
    margin-bottom: 18px;
}

.hero-title {
    font-size: clamp(2.35rem, 5vw, 3.35rem);
    margin-bottom: 16px;
    line-height: 1.04;
}

.hero-subtitle {
    margin-bottom: 26px;
}

.input-card {
    padding: 20px;
}

.streamer-suggestion-panel {
    max-height: min(360px, 42vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.streamer-suggestion-panel::-webkit-scrollbar {
    width: 6px;
}

.streamer-suggestion-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.streamer-suggestion-item {
    min-height: 52px;
}

#video-wrapper-container .player-bottom-controls {
    min-height: 54px;
    padding-inline: 12px;
}

#video-wrapper-container .player-seek-container {
    height: 11px;
    flex-basis: 11px;
    padding-top: 4px;
    margin-top: -4px;
}

#video-wrapper-container .player-seek-container:hover .player-seek-bar {
    height: 5px;
}

#video-wrapper-container .player-controls-row,
#video-wrapper-container .player-volume-group,
#video-wrapper-container .player-volume-track {
    height: 44px;
}

#video-wrapper-container .player-ctrl-btn,
#video-wrapper-container .player-quality-wrap,
#video-wrapper-container .player-speed-wrap {
    flex-basis: 46px;
    width: 46px;
    min-width: 46px;
    max-width: 46px;
    height: 44px;
    min-height: 44px;
}

#video-wrapper-container .player-time {
    line-height: 44px;
}

.stream-title.is-clip-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stream-title.is-clip-title .stream-type-badge {
    margin-right: 0;
}

.stream-title-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clip-page-banner {
    padding: 14px 16px;
    border-radius: 8px;
    background: rgba(14, 18, 16, 0.92);
    border-color: rgba(var(--accent-rgb), 0.28);
}

.clip-page-info {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4px 10px;
}

.clip-page-kicker {
    min-height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    background: var(--accent-primary);
    color: #04121d;
    letter-spacing: 0.08em;
}

.clip-page-title {
    max-width: min(56vw, 680px);
    font-size: 1.05rem;
}

.clip-page-meta {
    grid-column: 2;
    color: var(--text-secondary);
}

.clip-page-btn {
    min-height: 44px;
}

.streamer-profile-official,
.streamer-profile-tab {
    min-height: 44px;
}

.mini-fav-btn {
    min-width: 36px;
    min-height: 36px;
}

.stat-sub {
    line-height: 1.35;
}

@media (max-width: 900px) {
    .online-indicator {
        margin-left: 4px;
        padding: 0 8px;
        min-height: 32px;
    }

    .online-label {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 640px;
        padding: 80px 16px 28px;
    }

    .hero-title {
        font-size: clamp(2.2rem, 11vw, 3rem);
        margin-bottom: 14px;
    }

    .hero-subtitle {
        margin-bottom: 22px;
    }

    .search-mode-tab {
        min-height: 44px;
    }

    .streamer-suggestion-panel {
        max-height: min(330px, 38vh);
    }

    .lang-switch {
        gap: 6px;
    }

    .lang-link {
        min-width: 52px;
    }
}

@media (max-width: 700px) {
    .streamer-profile-shell {
        gap: 12px;
    }

    .streamer-profile-hero {
        padding: 14px;
    }

    .streamer-profile-avatar {
        width: 58px;
        height: 58px;
    }

    .streamer-profile-grid {
        gap: 10px;
    }

    .streamer-profile-grid .vod-result-card {
        display: grid;
        grid-template-columns: 128px minmax(0, 1fr);
        min-height: 86px;
    }

    .streamer-profile-grid .vod-result-thumb {
        aspect-ratio: auto;
        height: 100%;
        min-height: 86px;
    }

    .streamer-profile-grid .vod-result-info {
        padding: 9px 10px;
    }

    .streamer-profile-grid .vod-result-title {
        -webkit-line-clamp: 3;
        margin-bottom: 6px;
    }

    .streamer-profile-grid .mini-fav-btn {
        right: 6px;
        top: 6px;
    }
}

@media (max-width: 640px) {
    .clip-page-info {
        grid-template-columns: 1fr;
    }

    .clip-page-meta {
        grid-column: 1;
    }

    .clip-page-title {
        max-width: 100%;
    }
}

/* Audit polish: real contrast, stable surfaces, clear empty/error states. */
.bg-glow {
    opacity: 0.45;
}

.bg-glow-secondary {
    opacity: 0.6;
}

.btn-primary {
    color: #050608;
}

.btn-primary:hover {
    color: #050608;
}

.btn-secondary {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: rgba(var(--accent-rgb), 0.12);
    border-color: rgba(var(--accent-rgb), 0.38);
    color: var(--accent-primary);
    outline: none;
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.input-box.is-invalid {
    border-color: #ff5f57;
    box-shadow: 0 0 0 3px rgba(255, 95, 87, 0.18);
}

.recent-history-card,
.vod-result-card,
.stat-card,
.stat-chart-card,
.streamer-profile-hero,
.streamer-profile-tabs,
.streamer-profile-grid .vod-result-card {
    background: rgba(18, 18, 22, 0.9);
}

.chat-status-empty {
    margin: auto 0;
}

.streamer-suggestion-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 0.84rem;
    font-weight: 800;
}

.empty-state-cta,
.related-vods-more {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 0 16px;
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    border-radius: 7px;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-primary);
    font-weight: 800;
    cursor: pointer;
}

.empty-state-cta:hover,
.empty-state-cta:focus-visible,
.related-vods-more:hover,
.related-vods-more:focus-visible {
    background: rgba(var(--accent-rgb), 0.16);
    outline: none;
}

.related-vods-more-wrap {
    display: flex;
    justify-content: center;
}

/* ── FAQ : accordéon natif <details>/<summary> ──────────── */
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    list-style: none;
    cursor: pointer;
    padding: 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: background var(--transition-fast);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::marker {
    content: '';
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq-question::after {
    content: '';
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
    transform: rotate(-135deg);
}

.faq-item[open] .faq-answer {
    animation: faqReveal 180ms ease-out;
}

.faq-answer {
    margin: 0;
    padding: 0 20px 20px;
    color: var(--text-muted);
}

@keyframes faqReveal {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1040px) {
    body.mobile-menu-open {
        overflow: hidden;
    }

    body.mobile-menu-open::before {
        content: '';
        position: fixed;
        inset: 64px 0 0;
        z-index: 89;
        background: rgba(0, 0, 0, 0.56);
        backdrop-filter: blur(2px);
    }

    .header-content {
        padding: 0 16px;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 3;
    }

    .online-indicator {
        order: 2;
        margin-left: auto;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: #0f0f12;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        display: none;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
        z-index: 90;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        justify-content: center;
        padding: 12px;
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.03);
    }

    .lang-switch {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-top: 12px;
        justify-content: center;
    }
}

#video-wrapper-container .speed-opt,
#video-wrapper-container .quality-opt {
    min-height: 40px;
}

@media (pointer: coarse) {
    #video-wrapper-container .player-seek-container {
        min-height: 24px;
        flex-basis: 24px;
        padding-top: 10px;
        margin-top: -10px;
    }

    #video-wrapper-container .player-seek-bar,
    #video-wrapper-container .player-seek-container:hover .player-seek-bar {
        height: 6px;
    }

    #video-wrapper-container .player-seek-thumb {
        width: 18px;
        height: 18px;
        opacity: 1;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    }
}

.mini-fav-btn {
    min-width: 40px;
    min-height: 40px;
}

@media (max-width: 640px) {
    #video-wrapper-container .player-bottom-controls {
        padding: 0 6px 4px;
        min-height: 45px;
    }

    #video-wrapper-container .player-controls-row {
        width: 100%;
        min-width: 0;
        gap: 2px;
        justify-content: space-between;
        overflow: hidden;
    }

    #video-wrapper-container .player-controls-left,
    #video-wrapper-container .player-controls-right {
        min-width: 0;
        gap: 0;
    }

    #video-wrapper-container .player-controls-left {
        flex: 1 1 auto;
        overflow: hidden;
    }

    #video-wrapper-container .player-controls-right {
        flex: 0 0 auto;
        justify-content: flex-end;
    }

    #video-wrapper-container .player-volume-track {
        display: none;
    }

    #video-wrapper-container .player-ctrl-btn,
    #video-wrapper-container .player-quality-wrap,
    #video-wrapper-container .player-speed-wrap {
        flex: 0 0 34px;
        width: 34px;
        min-width: 34px;
        max-width: 34px;
        height: 40px;
        min-height: 40px;
    }

    #video-wrapper-container .player-time {
        flex: 1 1 auto;
        min-width: 66px;
        max-width: 82px;
        font-size: 11px;
        line-height: 40px;
        white-space: nowrap;
        overflow: hidden;
    }

    #video-wrapper-container .player-ctrl-btn svg,
    #video-wrapper-container .player-quality-icon svg {
        width: 18px;
        height: 18px;
    }

    #video-wrapper-container .player-quality-icon {
        width: 34px;
        height: 40px;
    }

    #video-wrapper-container .player-control-menu,
    #video-wrapper-container .player-speed-menu,
    #video-wrapper-container .player-quality-menu {
        position: absolute;
        left: auto;
        right: 0;
        bottom: 44px;
        z-index: 1000;
        width: min(258px, calc(100vw - 24px));
        min-width: 0;
        max-width: none;
        display: none;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        padding: 10px;
        border-radius: 10px;
        background: rgba(12, 14, 15, 0.98);
    }

    #video-wrapper-container .player-speed-menu.open,
    #video-wrapper-container .player-quality-menu.open {
        display: grid;
    }

    #video-wrapper-container .speed-opt,
    #video-wrapper-container .quality-opt {
        min-height: 44px;
        text-align: center;
        border-radius: 7px;
        padding: 0 8px;
    }

    #video-wrapper-container .seek-preview,
    #video-wrapper-container .player-seek-tooltip {
        max-width: calc(100vw - 24px);
    }

    .streamer-profile-grid .vod-result-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .streamer-profile-grid .vod-result-thumb {
        aspect-ratio: 16 / 9;
        height: auto;
        min-height: 0;
    }

    .streamer-profile-grid .vod-result-info {
        padding: 10px 12px 12px;
    }

    .streamer-profile-grid .vod-result-title {
        -webkit-line-clamp: 2;
        font-size: 0.88rem;
        line-height: 1.32;
    }

    .streamer-profile-grid .vod-result-meta {
        font-size: 0.76rem;
    }

    .clip-page-banner {
        margin: 8px 0 10px;
        padding: 12px;
        gap: 10px;
    }

    .clip-page-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
    }

    .clip-page-btn {
        width: 100%;
        min-width: 0;
        padding: 0 10px;
        white-space: normal;
        line-height: 1.12;
    }
}

@media (max-width: 430px) {
    #video-wrapper-container #pip-btn,
    #video-wrapper-container #theater-btn {
        display: none;
    }

    #video-wrapper-container .player-time {
        max-width: 92px;
    }
}

/* Final UX polish: clip/mobile/touch stability. */
.seek-preview,
.player-seek-tooltip {
    left: 50%;
    visibility: hidden;
}

.seek-preview.is-visible,
.player-seek-tooltip.is-visible {
    visibility: visible;
}

.clip-studio-close {
    min-width: 44px;
    min-height: 44px;
    margin-right: -6px;
}

.clip-preview-play {
    width: 44px;
    height: 44px;
    left: 2px;
    bottom: 0;
}

.clip-create-modal {
    display: flex;
    flex-direction: column;
}

.clip-create-actions {
    position: sticky;
    bottom: -12px;
    z-index: 2;
    margin-inline: -12px;
    padding: 10px 12px 12px;
    background: linear-gradient(to top, #191c1d 72%, rgba(25, 28, 29, 0));
}

.streamer-profile-link {
    min-height: 32px;
    margin-block: -6px;
    padding-block: 6px;
}

.mini-fav-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
}

@media (max-width: 640px) {
    .bg-glow {
        top: 12%;
        width: min(340px, calc(100vw - 28px));
        height: min(340px, calc(100vw - 28px));
        filter: blur(82px);
    }

    .bg-glow-secondary {
        left: 0;
        width: min(280px, calc(100vw - 28px));
        height: min(280px, calc(100vw - 28px));
        filter: blur(78px);
    }

    #video-wrapper-container .player-ctrl-btn::after,
    #video-wrapper-container .player-quality-icon::after,
    #video-wrapper-container .player-speed-btn::after {
        inset: -7px -5px;
    }

    #video-wrapper-container .player-bottom-controls {
        min-height: 50px;
    }

    #video-wrapper-container .player-ctrl-btn,
    #video-wrapper-container .player-quality-wrap,
    #video-wrapper-container .player-speed-wrap,
    #video-wrapper-container .player-quality-icon {
        height: 42px;
        min-height: 42px;
    }

    .clip-page-banner {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        margin: 6px 0 8px;
        padding: 9px 10px;
        gap: 7px;
        border-radius: 8px;
    }

    .clip-page-info {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        column-gap: 8px;
        row-gap: 2px;
        width: 100%;
    }

    .clip-page-kicker {
        min-height: 22px;
        display: inline-flex;
        align-items: center;
    }

    .clip-page-title {
        max-width: none;
        font-size: 0.92rem;
    }

    .clip-page-meta {
        grid-column: 1 / -1;
        font-size: 0.76rem;
    }

    .clip-page-actions {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        width: 100%;
    }

    .clip-page-btn {
        min-height: 34px;
        font-size: 0.78rem;
    }
}

@media (max-width: 380px) {
    #video-wrapper-container #skip-back-btn,
    #video-wrapper-container #skip-fwd-btn {
        display: none;
    }

    #video-wrapper-container .player-time {
        min-width: 78px;
    }
}

/* Final product polish: cleaner player text, clip page, menus, and mobile touch. */
.video-info,
.stream-details {
    min-width: 0;
    max-width: 100%;
}

.stream-details {
    overflow: hidden;
}

.stream-title,
.stream-title-text {
    min-width: 0;
    max-width: 100%;
}

.stream-title {
    display: block;
    line-height: 1.25;
}

.stream-title-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stream-meta {
    min-width: 0;
    max-width: 100%;
}

.stream-meta > span {
    min-width: 0;
}

.player-section.clip-mode .stream-title {
    display: none;
}

.player-section.clip-mode .video-info {
    align-items: center;
}

.player-section.clip-mode .stream-meta {
    gap: 10px 14px;
}

.player-section.clip-mode .monetization-container {
    display: none !important;
}

.player-section.clip-mode .site-support-fallback {
    display: none !important;
}

#video-wrapper-container .player-control-menu,
#video-wrapper-container .player-speed-menu,
#video-wrapper-container .player-quality-menu {
    z-index: 1200;
}

#video-wrapper-container .player-speed-wrap,
#video-wrapper-container .player-quality-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#video-wrapper-container .player-speed-menu,
#video-wrapper-container .player-quality-menu {
    bottom: 46px;
    right: 0;
    min-width: 188px;
    max-width: min(260px, calc(100vw - 24px));
    padding: 8px;
    border-radius: 8px;
    background: rgba(12, 14, 15, 0.99);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.62);
}

#video-wrapper-container .speed-opt,
#video-wrapper-container .quality-opt {
    min-height: 42px;
    border-radius: 6px;
    text-align: center;
}

.clip-page-banner {
    margin-bottom: 12px;
}

.clip-page-title {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clip-page-actions {
    align-items: center;
}

.streamer-profile-shell {
    gap: 20px;
}

.streamer-profile-hero {
    margin-top: 0;
}

footer .kns-s54,
footer .kns-s56,
#api-status-link,
#btn-open-legal {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}

@media (min-width: 900px) {
    .stream-title-text {
        max-width: min(100%, 720px);
    }

    .stream-meta {
        overflow: hidden;
    }
}

@media (max-width: 640px) {
    .hero-section,
    .hero {
        padding-top: 78px;
    }

    .hero h1,
    .hero-title {
        font-size: clamp(2.4rem, 10vw, 3.35rem);
        line-height: 1.02;
        margin-bottom: 16px;
    }

    .hero-subtitle,
    .subtitle {
        font-size: 1rem;
        line-height: 1.45;
        margin-bottom: 24px;
    }

    #video-wrapper-container .player-controls-row {
        gap: 4px;
        min-height: 46px;
    }

    #video-wrapper-container .player-controls-left,
    #video-wrapper-container .player-controls-right {
        min-width: 0;
        gap: 0;
    }

    #video-wrapper-container .player-controls-left {
        flex: 1 1 auto;
    }

    #video-wrapper-container .player-controls-right {
        flex: 0 1 auto;
        justify-content: flex-end;
    }

    #video-wrapper-container .player-ctrl-btn,
    #video-wrapper-container .player-quality-wrap,
    #video-wrapper-container .player-speed-wrap {
        flex: 0 0 40px;
        width: 40px;
        min-width: 40px;
        max-width: 40px;
        height: 44px;
        min-height: 44px;
    }

    #video-wrapper-container .player-ctrl-btn::after,
    #video-wrapper-container .player-quality-icon::after,
    #video-wrapper-container .player-speed-btn::after {
        inset: -8px -5px;
    }

    #video-wrapper-container .player-time {
        flex: 1 1 auto;
        min-width: 82px;
        max-width: 112px;
        overflow: hidden;
        font-size: 12px;
    }

    #video-wrapper-container .player-volume-track,
    #video-wrapper-container #skip-back-btn,
    #video-wrapper-container #skip-fwd-btn,
    #video-wrapper-container #pip-btn,
    #video-wrapper-container #theater-btn {
        display: none;
    }

    #video-wrapper-container .player-speed-menu,
    #video-wrapper-container .player-quality-menu {
        position: fixed !important;
        left: 12px !important;
        right: 12px !important;
        bottom: 76px;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        transform: none !important;
        display: none;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        padding: 10px;
    }

    #video-wrapper-container .player-speed-menu.open,
    #video-wrapper-container .player-quality-menu.open {
        display: grid;
    }

    .video-info-container {
        padding-inline: 24px;
    }

    .video-info {
        width: 100%;
        overflow: hidden;
    }

    .stream-title-text {
        white-space: nowrap;
        max-width: calc(100vw - 150px);
    }

    .stream-meta {
        display: grid;
        grid-template-columns: minmax(0, auto) minmax(0, auto);
        gap: 6px 12px;
        align-items: center;
    }

    .stream-meta > span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .streamer-profile-link {
        min-width: 44px;
        text-align: left;
    }

    .player-section.clip-mode .stream-meta {
        grid-template-columns: minmax(0, 1fr);
    }

    .player-section.clip-mode .vod-chat-sidebar {
        height: 360px;
        margin-top: 4px;
    }

    .clip-page-banner {
        margin: 8px 0 8px;
        padding: 10px;
    }

    .clip-page-actions {
        grid-template-columns: 1fr 1fr;
    }

    .clip-page-btn {
        min-height: 40px;
    }

    .clip-page-meta {
        line-height: 1.3;
    }

    .streamer-profile-hero {
        margin-top: 2px;
    }

    footer {
        padding-bottom: 22px;
    }

    #api-status-link,
    #btn-open-legal {
        min-width: 44px;
        justify-content: center;
    }
}

/* Final UX polish: safer taps, lighter mobile player, cleaner profile grids */
.btn-delete-history {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: -10px -12px -10px 0;
    border-radius: 999px;
}

.btn-delete-history:hover {
    background: rgba(255, 68, 68, 0.1) !important;
}

.streamer-profile-link {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    margin-block: -10px;
    padding: 0 8px;
    border-radius: 8px;
}

.trending-tab,
.platform-opt {
    min-height: 44px;
}

.vod-thumb-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(var(--accent-rgb), 0.14), rgba(255, 255, 255, 0.04)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    color: var(--accent-primary);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vod-thumb-empty span {
    min-width: 48px;
    height: 48px;
    padding: 0 10px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
}

.profile-show-all-vods {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--accent-rgb), 0.26);
    border-radius: 10px;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-primary);
    font-weight: 800;
    cursor: pointer;
}

.profile-show-all-vods:hover {
    background: rgba(var(--accent-rgb), 0.14);
}

.app-view-shell .view-toolbar {
    gap: 16px;
    flex-wrap: wrap;
}

.app-view-shell .view-actions {
    flex-wrap: wrap;
}

#history-filter-bar,
#favorites-filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    align-items: center;
    gap: 12px;
}

#history-search,
#favorites-search {
    width: 100%;
    max-width: none;
}

#favorites-sort {
    width: 100%;
    max-width: 240px !important;
    justify-self: end;
}

@media (max-width: 768px) {
    .player-section:not(.clip-mode) .monetization-container {
        padding: 0 14px 10px !important;
        gap: 0 !important;
    }

    .player-section:not(.clip-mode) .support-banner {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        text-align: left !important;
        gap: 10px !important;
        padding: 10px 12px !important;
        border-left: 3px solid var(--accent-primary) !important;
        border-top: 0 !important;
    }

    .player-section:not(.clip-mode) .support-banner h4 {
        margin: 0 !important;
        font-size: 0.92rem !important;
        line-height: 1.2 !important;
    }

    .player-section:not(.clip-mode) .support-banner p {
        display: none !important;
    }

    .player-section:not(.clip-mode) .support-banner .player-action-btn {
        width: auto !important;
        min-width: 104px !important;
        padding: 7px 12px !important;
        white-space: nowrap !important;
    }

    .app-view-shell .view-toolbar {
        align-items: stretch !important;
    }

    .app-view-shell .view-actions {
        width: 100%;
    }

    #history-filter-bar,
    #favorites-filter-bar {
        grid-template-columns: 1fr;
    }

    #favorites-sort {
        justify-self: stretch;
        max-width: none !important;
    }
}

@media (max-width: 640px) {
    .streamer-profile-panel:not(.show-all-profile-vods) .profile-extra-vod {
        display: none;
    }

    .streamer-profile-panel:not(.show-all-profile-vods) .profile-show-all-vods {
        display: flex;
    }
}
