/* assets/css/player.css - Custom Modern Video Player & Watch Layout */

/* ==========================================================================
   WATCH PAGE LAYOUT & THEATER MODE
   ========================================================================== */
.watch-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 0 24px;
    max-width: 1720px;
    margin: 0 auto;
    width: 100%;
}

.watch-container .player-stage-container {
    grid-column: 1;
    width: 100%;
    transition: all var(--transition-normal);
}

.watch-container .watch-columns-wrapper {
    grid-column: 1 / -1;
    display: contents;
}

.watch-container .watch-primary-column {
    grid-column: 1;
    min-width: 0;
}

.watch-container .watch-secondary-column {
    grid-column: 2;
    grid-row: 1 / span 4;
    width: 400px;
    flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────────────────────
   THEATER MODE (Cinematic Full-Width Stage)
   ────────────────────────────────────────────────────────────────────────── */
.watch-container.theater-mode {
    display: flex !important;
    flex-direction: column !important;
    max-width: 100% !important;
    margin: -16px calc(-1 * var(--content-pad-x)) 0 !important;
    width: calc(100% + 2 * var(--content-pad-x)) !important;
}

.watch-container.theater-mode .player-stage-container {
    width: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85);
}

.watch-container.theater-mode .player-outer-wrapper {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    border-radius: 0;
}

.watch-container.theater-mode .ambient-glow-canvas {
    display: none !important;
}

.watch-container.theater-mode .custom-video-player {
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    height: calc(100vh - var(--navbar-height) - 60px);
    max-height: 82vh;
    min-height: 480px;
    aspect-ratio: auto;
    background: #000000;
    box-shadow: none;
}

.watch-container.theater-mode .custom-video-player .video-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.watch-container.theater-mode .watch-columns-wrapper {
    display: flex !important;
    gap: 24px;
    max-width: 1720px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px 60px;
    box-sizing: border-box;
}

.watch-container.theater-mode .watch-primary-column {
    flex: 1;
    min-width: 0;
}

.watch-container.theater-mode .watch-secondary-column {
    width: 400px;
    flex-shrink: 0;
}

@media (max-width: 1200px) {
    .watch-container {
        display: flex !important;
        flex-direction: column !important;
        margin: 0 auto;
        width: 100%;
    }
    .watch-container .watch-columns-wrapper {
        display: flex !important;
        flex-direction: column !important;
        width: 100%;
    }
    .watch-container .watch-secondary-column {
        width: 100% !important;
        margin-top: 24px;
    }
    .watch-container.theater-mode {
        margin: -16px calc(-1 * var(--content-pad-x)) 0 !important;
        width: calc(100% + 2 * var(--content-pad-x)) !important;
    }
    .watch-container.theater-mode .watch-columns-wrapper {
        padding: 0 16px 40px;
    }
}

@media (max-width: 768px) {
    .watch-container.theater-mode {
        margin: 0 !important;
        width: 100% !important;
    }
}

/* ==========================================================================
   CUSTOM PLAYER & AMBIENT GLOW
   ========================================================================== */
.player-outer-wrapper {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

/* Effet Ambiant Glow */
.ambient-glow-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.08);
    width: 100%;
    height: 100%;
    filter: blur(60px) saturate(1.8) opacity(0.55);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.5s ease;
    border-radius: var(--radius-lg);
}

.ambient-glow-canvas.disabled {
    opacity: 0;
}

.custom-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    z-index: 2;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    user-select: none;
    transition: all var(--transition-normal);
}

.custom-video-player.fullscreen {
    border-radius: 0;
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
}

/* Plein écran simulé (navigateur sans API plein écran d'élément ni plein écran
   natif de <video>). La position fixe est indispensable : sans elle, l'élément
   restait dans le flux et poussait simplement la page. */
.custom-video-player.pseudo-fullscreen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    z-index: 2000;
    background: #000000;
}

.video-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    display: block;
}

.ctrl-theater-btn.active {
    color: var(--accent-red) !important;
}

.ctrl-theater-btn.active .icon-theater-default {
    display: none !important;
}

.ctrl-theater-btn.active .icon-theater-active {
    display: block !important;
}

/* Big Center Play Button (Startup / Initial State) */
.player-big-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: linear-gradient(160deg, #ff2d52 0%, #d9123a 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42), 0 2px 10px rgba(255, 30, 66, 0.35);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 6;
}

.player-big-play-btn svg {
    width: 30px;
    height: 30px;
    margin-left: 3px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
    transition: transform 0.2s ease;
}

/* Deux barres verticales : contrairement au triangle, elles n'ont pas besoin
   d'être décalées pour paraître centrées. */
.player-big-play-btn.is-pause svg {
    margin-left: 0;
}

.player-big-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.08);
    background: linear-gradient(160deg, #ff4263 0%, #e11d48 100%);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 3px 16px rgba(255, 30, 66, 0.5);
}

.player-big-play-btn:hover svg {
    transform: scale(1.06);
}

.player-big-play-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.custom-video-player.playing .player-big-play-btn {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.6);
}

/* Au doigt, le tap sur l'image ne met plus en pause : le gros bouton central
   revient donc avec le reste de l'habillage et devient le geste de pause. */
@media (hover: none) and (pointer: coarse) {
    .custom-video-player.playing.controls-active .player-big-play-btn {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Center Play Ripple & Loading Spinner */
.player-center-action {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 76px;
    height: 76px;
    border-radius: var(--radius-full);
    background: rgba(15, 17, 26, 0.82);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 7;
}

.player-center-action svg {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.player-center-action.animate {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

/* Double-Click Seek Ripples (Left & Right) */
.player-seek-ripple {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 8;
}

.player-seek-left {
    left: 0;
    border-radius: 100px 0 0 100px;
}

.player-seek-right {
    right: 0;
    border-radius: 0 100px 100px 0;
}

.player-seek-ripple.animate {
    opacity: 1;
}

.player-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -25px;
    margin-left: -25px;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    box-sizing: border-box;
    transform-origin: center center;
    animation: spin 0.8s linear infinite;
    display: none;
    z-index: 4;
}

.player-loader.active {
    display: block;
}

.player-buffering-micro-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -22px;
    margin-left: -22px;
    width: 44px;
    height: 44px;
    pointer-events: none;
    z-index: 15;
    transition: opacity 0.2s ease;
}

.player-buffering-micro-spinner svg {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    animation: spin 0.8s linear infinite;
}

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

/* Controls Overlay */
.player-controls-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0,0,0,0.1) 40%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 16px 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: none; /* Permet au clic d'atteindre la vidéo et le centre */
}

.player-controls-row,
.player-timeline-wrapper,
.settings-menu-popup,
.ctrl-btn {
    pointer-events: auto; /* Les boutons et contrôles interceptent leurs clics */
}

.custom-video-player.paused .player-controls-overlay,
.custom-video-player.controls-active .player-controls-overlay {
    opacity: 1;
}

/* Le survol ne pilote l'habillage que là où un pointeur existe. Sur iOS le
   `:hover` simulé restait collé après un appui et empêchait tout masquage
   automatique ; la visibilité y passe par la classe `controls-active`. */
@media (hover: hover) {
    .custom-video-player:hover .player-controls-overlay {
        opacity: 1;
    }
}

/* Tant que la vidéo n'a jamais été lancée, seul le gros bouton central est
   proposé. `visibility` en plus de l'opacité : les commandes gardent
   `pointer-events: auto` et resteraient cliquables une fois transparentes.
   Placée après les règles `.paused` et `:hover` pour l'emporter à
   spécificité égale. */
.custom-video-player.not-started .player-controls-overlay {
    opacity: 0;
    visibility: hidden;
}

/* Pastille « Activer le son » d'une lecture automatique muette (iPhone). */
.player-unmute-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 12;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-full);
    background: rgba(15, 17, 26, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.player-unmute-btn:active {
    transform: scale(0.96);
}

/* La feuille de réglages ne doit rien avoir au-dessus d'elle. */
.custom-video-player.settings-open .player-unmute-btn {
    display: none;
}

.custom-video-player.hide-cursor {
    cursor: none;
}

/* Progress / Scrubber Bar */
.player-timeline-wrapper {
    position: relative;
    width: 100%;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.player-timeline-track {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    transition: height 0.15s ease;
}

.player-timeline-wrapper:hover .player-timeline-track {
    height: 7px;
}

.player-buffer-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
}

.player-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff1e42, #ff3355);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-red-glow);
}

.player-scrubber-handle {
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%) scale(0);
    width: 13px;
    height: 13px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    transition: transform 0.15s ease;
}

.player-timeline-wrapper:hover .player-scrubber-handle {
    transform: translateY(-50%) scale(1);
}

.player-time-tooltip {
    position: absolute;
    bottom: 28px;
    transform: translateX(-50%);
    background: rgba(12, 14, 22, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #ffffff;
    pointer-events: none;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 4px;
    z-index: 25;
    overflow: hidden;
    transition: opacity 0.15s ease;
}

.timeline-preview-thumb {
    width: 160px;
    height: 90px;
    border-radius: 4px;
    overflow: hidden;
    background: #000000;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.timeline-preview-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.timeline-preview-time {
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: #ffffff;
    padding: 1px 6px;
    letter-spacing: 0.5px;
}

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

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

.ctrl-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.08);
}

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

/* Volume Slider */
.volume-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.volume-slider-container {
    width: 0;
    overflow: hidden;
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}

.volume-group:hover .volume-slider-container {
    width: 68px;
    margin-right: 8px;
}

.volume-slider {
    width: 60px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.player-time-display {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin-left: 6px;
    font-family: 'JetBrains Mono', monospace;
}

/* Settings Menu Popup */
.settings-menu-popup {
    position: absolute;
    bottom: 52px;
    right: 16px;
    background: rgba(24, 24, 32, 0.95);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 0;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
    width: 220px;
    display: none;
    z-index: 30;
}

.settings-menu-popup.active {
    display: block;
    animation: fadeInDown 0.15s ease-out;
}

.settings-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.settings-menu-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.settings-menu-item.active {
    color: var(--accent-red);
    font-weight: 700;
}

/* ==========================================================================
   VIDEO DETAILS & SOCIAL BAR
   ========================================================================== */
.video-primary-details {
    margin-top: 14px;
}

.video-watch-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.video-actions-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.channel-info-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.channel-main-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.channel-text-meta {
    display: flex;
    flex-direction: column;
}

.channel-title-link {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.channel-subs-count {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Les styles de .btn-subscribe vivent dans main.css : le bouton apparaît aussi
   sur /channel/... où player.css n'est pas chargé, il s'y affichait alors sans
   fond ni forme de bouton. */

/* Action Buttons (Likes, Share, Download) */
.video-buttons-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.segmented-btn-group {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.seg-btn {
    height: 38px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.seg-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.seg-btn.active {
    color: var(--accent-red);
    background: rgba(255, 30, 66, 0.12);
}

.seg-divider {
    width: 1px;
    height: 20px;
    background: var(--border-subtle);
}

.action-pill-btn {
    height: 38px;
    padding: 0 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-pill-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

/* Description Card */
.video-description-box {
    margin-top: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.video-description-box:hover {
    background: var(--bg-surface-elevated);
}

.description-meta-stats {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
}

.description-text-content {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    overflow: hidden;
    position: relative;
}

.description-text-content.collapsed {
    max-height: 72px;
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
}

/* La marge devient du remplissage : même place à l'écran, mais une cible de
   30px de haut au lieu des 16px du seul texte « Plus ». */
.description-toggle-btn {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1px;
    padding: 7px 0;
    min-width: 44px;
    text-align: start;
}

/* Hashtag Link & Timestamps */
.hashtag-link {
    color: var(--accent-indigo);
    font-weight: 600;
    transition: color var(--transition-fast);
}

.hashtag-link:hover {
    color: #818cf8;
    text-decoration: underline;
}

.timestamp-btn {
    display: inline-block;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 2px;
    transition: background var(--transition-fast);
}

.timestamp-btn:hover {
    background: rgba(6, 182, 212, 0.25);
}

/* ==========================================================================
   COMMENTS SECTION
   ========================================================================== */
.comments-section {
    margin-top: 24px;
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}

.comments-count-title {
    font-size: 1.15rem;
    font-weight: 800;
}

.comment-input-container {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}

.comment-input-box {
    flex: 1;
}

.comment-textarea {
    width: 100%;
    min-height: 38px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 8px 0;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
    resize: none;
    outline: none;
    overflow-y: hidden;
    line-height: 1.4;
}

.comment-textarea:focus {
    border-bottom-color: var(--accent-indigo);
}

.comment-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.comment-submit-btn {
    height: 36px;
    padding: 0 16px;
    background: var(--accent-red);
    color: #ffffff;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.comment-submit-btn:hover:not(:disabled) {
    background: var(--accent-red-hover);
    box-shadow: 0 0 12px var(--accent-red-glow);
}

.comment-submit-btn:disabled {
    background: var(--bg-surface-elevated);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.comment-item {
    display: flex;
    gap: 14px;
    animation: fadeInDown 0.25s ease-out;
}

.comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content-block {
    flex: 1;
}

.comment-author-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-author-name {
    font-weight: 700;
    font-size: 0.88rem;
}

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

.comment-body {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.45;
    margin-bottom: 6px;
}

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

.comment-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.comment-action-btn:hover {
    color: var(--text-primary);
}

.comment-delete-btn {
    color: var(--accent-red) !important;
}

.comment-delete-btn:hover {
    color: var(--accent-red-hover) !important;
    text-decoration: underline;
}

/* ==========================================================================
   RECOMMENDATIONS SIDEBAR (WATCH PAGE)
   ========================================================================== */
.rec-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.rec-title {
    font-size: 1rem;
    font-weight: 800;
}

.autoplay-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    transition: .3s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-muted);
    transition: .3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
}

input:checked + .toggle-slider:before {
    transform: translateX(16px);
    background-color: #ffffff;
}

.rec-video-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rec-video-card {
    display: flex;
    gap: 10px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    padding: 4px;
}

.rec-video-card:hover {
    background: var(--bg-surface);
}

.rec-thumb-box {
    position: relative;
    width: 160px;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-surface-elevated);
}

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

.rec-video-card:hover .rec-thumb-img {
    transform: scale(1.05);
}

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

.rec-title-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    transition: color var(--transition-fast);
}

.rec-video-card:hover .rec-title-text {
    color: var(--accent-red);
}

.rec-channel-name {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.rec-views-date {
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* ==========================================================================
   MOBILE RESPONSIVE WATCH PAGE & PLAYER (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* L'espace vidéo → titre cumulait trois marges (14px sous le lecteur, 16px
       de gap et 14px au-dessus des détails), soit 44px de blanc. */
    .watch-container {
        gap: 8px;
    }

    .player-outer-wrapper {
        border-radius: 0;
        margin: -12px -12px 0 -12px;
        width: calc(100% + 24px);
    }

    .video-primary-details {
        margin-top: 6px;
    }

    .custom-video-player {
        border-radius: 0;
        box-shadow: none;
    }

    .ambient-glow-canvas {
        display: none !important; /* Save battery/GPU on mobile */
    }

    /* Player Controls Mobile Simplification */
    .ctrl-theater-btn,
    .ctrl-pip-btn,
    .volume-group {
        display: none !important;
    }

    /* Details and Action Buttons */
    .video-watch-title {
        font-size: 1.15rem;
        line-height: 1.35;
        margin-bottom: 12px;
        padding: 0 2px;
    }

    .video-actions-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 0 2px;
    }

    /* `space-between` répartissait les trois enfants (avatar, texte, bouton) sur
       toute la largeur : le nom de la chaîne se retrouvait décollé de son avatar,
       loin sur la droite. Le bouton seul est renvoyé au bord. */
    .channel-info-group {
        width: 100%;
        justify-content: flex-start;
        gap: 10px;
    }

    .channel-info-group .channel-text-meta {
        min-width: 0;
        flex: 1;
    }

    .channel-info-group .channel-title-link span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .channel-info-group .btn-subscribe {
        margin-left: auto;
        flex-shrink: 0;
    }

    .video-buttons-group {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .video-buttons-group::-webkit-scrollbar {
        display: none;
    }

    .action-pill-btn,
    .segmented-btn-group {
        flex-shrink: 0;
        height: 36px;
    }

    .video-description-box {
        padding: 12px;
        border-radius: var(--radius-md);
        margin: 0 2px 18px 2px;
    }

    .comments-section {
        padding: 0 2px;
    }

    /* 125px sur un écran de 393px : le contenu des vignettes était illisible. */
    .rec-thumb-box {
        width: clamp(150px, 44%, 200px);
    }

    .rec-title-text {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
    }

    .rec-video-card {
        gap: 12px;
        padding: 4px 0;
    }
}

/* ==========================================================================
   KEYBOARD SHORTCUTS MODAL & PLAYER POPUPS
   ========================================================================== */
.player-shortcuts-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 16px;
    animation: fadeInDown 0.2s ease-out;
}

.player-shortcuts-modal.active {
    display: flex;
}

.shortcuts-modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
}

.shortcuts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
}

.shortcuts-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.shortcuts-close-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
}

.shortcut-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.shortcut-row kbd {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Settings & Speed Menus in Player */
.settings-dropdown-wrapper {
    position: relative;
}

.player-settings-menu,
.player-speed-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: none;
    z-index: 40;
    padding: 6px 0;
    animation: fadeInDown 0.15s ease-out;
}

.player-settings-menu.active,
.player-speed-menu.active {
    display: block;
}

.settings-val-badge {
    margin-left: auto;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-elevated);
    color: var(--text-muted);
    font-weight: 600;
}

.speed-menu-header {
    padding: 6px 12px 8px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 4px;
}

.btn-back-settings {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition-fast);
}

.btn-back-settings:hover {
    color: var(--accent-red);
}

.speed-opt {
    width: 100%;
    padding: 8px 16px;
    background: transparent;
    border: none;
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.speed-opt:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.speed-opt.active {
    color: var(--accent-red);
    font-weight: 700;
    background: var(--accent-red-subtle);
}

.speed-opt.active:hover {
    color: var(--accent-red);
    background: var(--accent-red-subtle);
}

/* ==========================================================================
   LECTEUR SUR ÉCRAN TACTILE
   Conditionné au pointeur, pas à la largeur : un téléphone en paysage dépasse
   les 768px et retombait sinon sur l'habillage desktop — commandes de 36px,
   contrôles pilotés par un survol inexistant et menu ancré débordant sous
   l'écran.
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {
    .player-controls-row {
        padding: 0 6px 6px 6px;
        height: 48px;
        gap: 4px;
    }

    .player-controls-left,
    .player-controls-right {
        gap: 2px;
    }

    /* 44px : cible tactile minimale recommandée par Apple. Les commandes
       faisaient 36px, soit en dessous du seuil confortable au pouce. */
    .ctrl-btn {
        width: 44px;
        height: 44px;
    }

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

    .player-time-display {
        font-size: 0.75rem;
        margin-left: 4px;
        white-space: nowrap;
    }

    /* La zone tactile de la barre de progression est élargie bien au-delà du
       trait visible : viser 4px à l'ongle est impraticable. */
    .player-timeline-wrapper {
        padding: 6px 10px;
        height: 30px;
    }

    .player-timeline-track {
        height: 5px;
    }

    .player-timeline-wrapper:hover .player-timeline-track,
    .player-timeline-wrapper:active .player-timeline-track {
        height: 8px;
    }

    /* Sans pointeur il n'y a pas de `:hover` : la poignée restait à scale(0),
       donc invisible, et rien n'indiquait où poser le doigt pour scruber. */
    .player-scrubber-handle,
    .player-timeline-wrapper:hover .player-scrubber-handle {
        width: 16px;
        height: 16px;
        right: -8px;
        transform: translateY(-50%) scale(1);
    }

    /* Le bouton, centré sur un lecteur d'à peine 210px de haut, recouvrait la
       timeline : on le rétrécit et on le remonte au-dessus de l'habillage. */
    .player-big-play-btn {
        width: 54px;
        height: 54px;
        top: 42%;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    }

    .player-big-play-btn svg {
        width: 23px;
        height: 23px;
        margin-left: 2px;
    }

    /* ── Menu des réglages : feuille ancrée au bas de la fenêtre ──
       Il était positionné en absolu à 52px au-dessus d'un bouton de 36px, dans
       un lecteur de ~220px de haut. Ses 309px de contenu partaient donc à -104px,
       c'est-à-dire derrière la navbar, et la moitié des vitesses était rognée
       par l'`overflow:hidden` du lecteur. */
    .settings-dropdown-wrapper {
        position: static !important;
    }

    .settings-menu-popup {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        max-height: min(70vh, 460px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        border-radius: 18px 18px 0 0;
        border-width: 1px 0 0 0;
        background: var(--bg-surface);
        padding: 8px 0 calc(10px + env(safe-area-inset-bottom, 0px)) 0;
        z-index: 1300;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.55);
    }

    .settings-menu-popup.active {
        animation: slideUpSettingsSheet 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    .settings-menu-item {
        min-height: 48px;
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    /* Le halo ambiant est coupé sur tout appareil tactile — batterie et GPU —
       et son interrupteur avec lui : il ne pilotait plus rien. Le masquage
       n'était jusqu'ici conditionné qu'à la largeur, donc inactif en paysage. */
    .ambient-glow-canvas {
        display: none !important;
    }

    .settings-ambient-row {
        display: none !important;
    }

    /* Le lecteur porte `z-index: 2` et crée donc un contexte d'empilement : le
       `z-index: 1300` de la feuille y reste confiné et passait sous la barre de
       navigation du bas (z-index 950). On remonte le lecteur lui-même, mais
       seulement le temps de la feuille et seulement jusqu'à 1000 : au-delà il
       recouvrait le voile (1050) et le tiroir de navigation (1100). */
    .custom-video-player.settings-open {
        z-index: 1000;
    }

    /* En plein écran simulé, la feuille et les contrôles doivent rester au-dessus
       du lecteur devenu fixe. */
    .custom-video-player.pseudo-fullscreen .settings-menu-popup {
        z-index: 2100;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   TÉLÉPHONE EN PAYSAGE
   En 16/9 le lecteur mesurait 479px de haut pour une fenêtre de 393px : il
   fallait faire défiler la page pour atteindre ses propres commandes.
   ────────────────────────────────────────────────────────────────────────── */
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
    .custom-video-player {
        aspect-ratio: auto;
        height: calc(100vh - var(--navbar-height));
        height: calc(100dvh - var(--navbar-height));
        max-height: none;
    }

    .player-outer-wrapper {
        margin-bottom: 8px;
    }

    .settings-menu-popup {
        max-height: 72vh;
        max-height: 72dvh;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   VIDÉO MASQUÉE — bandeau réservé à l'administrateur
   ────────────────────────────────────────────────────────────────────────── */
.watch-hidden-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.12);
    color: var(--text-primary);
    font-size: 0.86rem;
    line-height: 1.45;
}

.watch-hidden-banner svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #f59e0b;
}

/* ==========================================================================
   VOILE D'ÉCHEC DE LECTURE (assets/js/player.js, _showPlaybackError)
   Le voile est un conteneur de requêtes : sur un lecteur de téléphone, haut
   de deux cents pixels, l'icône et le texte cèdent la place aux vignettes de
   remplacement, qui restent l'essentiel.
   ========================================================================== */
.cdn-error-overlay {
    position: absolute;
    inset: 0;
    z-index: 35;
    display: flex;
    overflow-y: auto;
    padding: 12px;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: inherit;
    color: #fff;
    text-align: center;
    container-type: size;
}

/* margin:auto plutôt que justify-content:center : un contenu plus haut que le
   voile reste atteignable par le défilement au lieu d'être rogné en haut. */
.player-error-body {
    margin: auto;
    width: 100%;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.player-error-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.player-error-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.player-error-text {
    max-width: 380px;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

.player-error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.player-error-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.player-error-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.player-error-btn--primary {
    background: var(--accent-red, #ff1e42);
}

.player-error-btn--primary:hover {
    background: var(--accent-red, #ff1e42);
    transform: scale(1.03);
}

.player-error-suggest {
    width: 100%;
    max-width: 720px;
    margin-top: 6px;
}

.player-error-suggest-title {
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    color: rgba(255, 255, 255, 0.6);
}

.player-error-suggest-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.player-error-suggest-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    color: #fff;
    text-align: left;
    text-decoration: none;
}

.player-error-suggest-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.player-error-suggest-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.player-error-suggest-card:hover .player-error-suggest-thumb img,
.player-error-suggest-card:focus-visible .player-error-suggest-thumb img {
    transform: scale(1.05);
}

.player-error-suggest-thumb .video-duration-badge {
    bottom: 5px;
    right: 5px;
    font-size: 0.68rem;
}

.player-error-suggest-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.player-error-suggest-card:hover .player-error-suggest-name {
    color: var(--accent-red, #ff1e42);
}

/* Lecteur étroit : les vignettes défilent horizontalement. */
@container (max-width: 520px) {
    .player-error-suggest-list {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 40%;
        overflow-x: auto;
        scrollbar-width: none;
    }
}

/* Lecteur de hauteur moyenne (16:9 en colonne) : l'icône s'efface et les
   vignettes rétrécissent pour que l'explication tienne encore. */
@container (max-height: 460px) {
    .player-error-icon {
        display: none;
    }
    .player-error-suggest {
        max-width: 560px;
    }
}

/* Lecteur bas (téléphone) : on garde le titre, l'action et les vignettes. */
@container (max-height: 340px) {
    .player-error-text {
        display: none;
    }
}

@container (max-height: 280px) {
    .player-error-body {
        gap: 8px;
        padding: 0;
    }
    .player-error-title {
        font-size: 0.95rem;
    }
    .player-error-btn {
        padding: 6px 14px;
        font-size: 0.82rem;
    }
    .player-error-suggest {
        margin-top: 0;
    }
    .player-error-suggest-title {
        margin-bottom: 6px;
    }
    .player-error-suggest-name {
        display: none;
    }
    .player-error-suggest-list {
        grid-auto-columns: 30%;
    }
}

/* Suggestions sous le 404 d'une vidéo supprimée ou masquée (views/watch.php) */
.watch-not-found-suggestions {
    max-width: 1280px;
    margin: 0 auto 48px;
    padding: 0 16px;
}

.watch-not-found-suggestions h2 {
    margin: 0 0 16px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* ==========================================================================
   Autoplay Next Video Countdown Overlay (UX & Rétention)
   ========================================================================== */
.player-next-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(9, 10, 15, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeInOverlay 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 16px;
}

@keyframes fadeInOverlay {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.next-overlay-card {
    background: rgba(24, 27, 38, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl, 16px);
    padding: 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.next-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.next-overlay-badge {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.next-countdown-num {
    color: var(--accent-red, #ff1e42);
    font-size: 1.1rem;
    font-weight: 800;
}

.next-overlay-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.next-overlay-thumb {
    width: 130px;
    height: 73px;
    border-radius: var(--radius-md, 8px);
    object-fit: cover;
    flex-shrink: 0;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.next-overlay-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.next-overlay-channel {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.next-overlay-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.next-btn-cancel,
.next-btn-play {
    flex: 1;
    height: 40px;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.next-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.next-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.18);
}

.next-btn-play {
    background: var(--accent-red, #ff1e42);
    color: #ffffff;
}

.next-btn-play:hover {
    background: #e01638;
    transform: translateY(-1px);
}

.next-countdown-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
}

.next-countdown-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-red, #ff1e42);
}
