/* ===== Play TV 4K - Styles Modernes ===== */

/* Reset et base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== CORRECTION DES INPUTS - LISIBILITÉ ===== */
/* Force les couleurs des inputs pour garantir la lisibilité */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
    /* Couleurs de fond et texte forcées */
    background-color: #2a2a2a !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Placeholder */
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="tel"]::placeholder,
input[type="url"]::placeholder,
input[type="search"]::placeholder,
input[type="date"]::placeholder,
input[type="datetime-local"]::placeholder,
textarea::placeholder,
select::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Focus states */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
    outline: none !important;
    border-color: #00E676 !important;
    box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.1) !important;
    background-color: #333333 !important;
}

/* Options dans les selects */
select option {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
}

/* Checkbox */
input[type="checkbox"] {
    background-color: #2a2a2a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ===== FIN CORRECTION INPUTS ===== */

/* Safe Area pour mobile (notch, home indicator) */
.safe-area-inset-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Scrollbar personnalisée */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Scrollbar moderne */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 230, 118, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 230, 118, 0.5);
}

/* ===== ANIMATIONS ===== */

/* Animation fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation slide up */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Animation shimmer */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Animation glow pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 230, 118, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 230, 118, 0.6);
    }
}

/* Animation float */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animation rotate gradient */
@keyframes rotateGradient {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Panneaux glassmorphism modernes */
.glass-panel {
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navigation glassmorphism */
.nav-glass {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

.gradient-text {
    background: linear-gradient(135deg, #00E676 0%, #00C853 50%, #009624 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-item {
    position: relative;
    transition: all 0.3s ease;
}

.nav-item::before {
    content: '';
    position: absolute;
    inset: -5px;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.nav-item:hover::before {
    opacity: 1;
}

.nav-item:hover {
    transform: translateY(-3px);
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-left {
    animation: slideInFromLeft 0.6s ease-out forwards;
}

@keyframes pulseSlow {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.05); }
}

.animate-pulse-slow {
    animation: pulseSlow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ===== CARTES ET CONTAINERS MODERNES ===== */

/* Animation d'apparition des cartes */
.content-card {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9) 0%, rgba(20, 20, 20, 0.95) 100%);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.content-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 230, 118, 0.15);
    border-color: rgba(0, 230, 118, 0.3);
}

/* Délai d'animation pour chaque carte */
.content-card:nth-child(1) { animation-delay: 0.1s; }
.content-card:nth-child(2) { animation-delay: 0.2s; }
.content-card:nth-child(3) { animation-delay: 0.3s; }
.content-card:nth-child(4) { animation-delay: 0.4s; }
.content-card:nth-child(5) { animation-delay: 0.5s; }

/* Channel card moderne */
.channel-card {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.8) 0%, rgba(15, 15, 15, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 0.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.channel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 230, 118, 0.1), transparent);
    transition: left 0.5s;
}

.channel-card:hover::before {
    left: 100%;
}

.channel-card:hover {
    border-color: rgba(0, 230, 118, 0.4);
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.9) 0%, rgba(25, 25, 25, 0.95) 100%);
    box-shadow: 0 15px 35px rgba(0, 230, 118, 0.2);
    transform: translateY(-2px);
}

/* ===== BOUTONS MODERNES ===== */

.btn-primary {
    background: linear-gradient(135deg, #00E676 0%, #00C853 100%);
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 230, 118, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 230, 118, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ===== NAVIGATION MODERNE ===== */

.nav-link {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00E676, #00C853);
    transform: translateX(-50%);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.text-primary::after {
    width: 100%;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link .material-symbols-outlined {
    transition: all 0.3s ease;
}

.nav-link:hover .material-symbols-outlined {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(0, 230, 118, 0.5));
}

/* Animation pulse pour indicateurs LIVE */
.live-pulse {
    animation: pulse-opacity 2s infinite;
}

.live-pulse-glow {
    animation: pulse-opacity 2s infinite, glowPulse 2s infinite;
}

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

/* Animation equalizer pour radio */
.equalizer-bar {
    animation: equalize 1s infinite alternate;
}

.equalizer-bar:nth-child(2) { animation-delay: 0.2s; }
.equalizer-bar:nth-child(3) { animation-delay: 0.4s; }

@keyframes equalize {
    0% { height: 20%; }
    100% { height: 100%; }
}

/* ===== INPUTS ET FORMULAIRES ===== */

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #fff;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input:focus {
    outline: none;
    border-color: #00E676;
    box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ===== BADGES ===== */

.badge-live {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    color: #fff;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
    animation: live-pulse-glow 2s infinite;
}

.badge-quality {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* ===== MODAL ===== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100;
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.3s ease;
}

/* ===== PLAYER ===== */

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
}

/* ===== MODE PLEIN ÉCRAN AUTOMATIQUE ===== */

/* Le lecteur vidéo en mode plein écran */
#playerModal {
    transition: opacity 0.3s ease;
}

#playerModal:-webkit-full-screen,
#playerModal:-moz-full-screen,
#playerModal:-ms-fullscreen,
#playerModal:fullscreen {
    background: black !important;
}

#videoPlayer:-webkit-full-screen,
#videoPlayer:-moz-full-screen,
#videoPlayer:-ms-fullscreen,
#videoPlayer:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain !important;
}

/* Masquer les contrôles natifs en plein écran pour avoir notre propre interface */
#videoPlayer::-webkit-media-controls-panel {
    display: none !important;
}

#videoPlayer::-webkit-media-controls {
    display: none !important;
}

#videoPlayer[controls] {
    /* Garder les contrôles visibles pour compatibilité */
}

/* Masquer les boutons de contrôle quand la souris est inactive en plein écran */
#playerControls.idle {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Afficher les contrôles au survol ou au touch */
#playerControls:hover,
#playerControls:active {
    opacity: 1;
}

/* Masquer la scrollbar en plein écran */
:-webkit-full-screen {
    overflow: hidden !important;
}

:-moz-full-screen {
    overflow: hidden !important;
}

:fullscreen {
    overflow: hidden !important;
}

/* Orientation paysage forcée sur mobile */
@screen and (orientation: portrait) {
    #playerModal:not(.hidden) ~ * {
        display: none;
    }

    #playerModal:not(.hidden) {
        position: fixed;
        inset: 0;
        z-index: 9999;
    }
}

/* ===== BADGE VIEWERS DU LECTEUR VIDÉO ===== */

/* Badge viewers toujours visible en mode plein écran */
.player-viewers-badge {
    z-index: 99999 !important;
    pointer-events: none !important;
}

/* Assurer que le badge est visible dans tous les modes de plein écran */
:fullscreen .player-viewers-badge,
:-webkit-full-screen .player-viewers-badge,
:-moz-full-screen .player-viewers-badge,
:-ms-fullscreen .player-viewers-badge {
    z-index: 99999 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ===== CONTRÔLE DU MODAL VIDÉO ===== */

/* S'assurer que le modal caché est vraiment invisible */
#playerModal.hidden {
    display: none !important;
}

/* Le modal visible doit être au-dessus de tout */
#playerModal:not(.hidden) {
    display: block !important;
    z-index: 9999 !important;
    overflow: hidden !important;
    position: fixed !important;
    inset: 0 !important;
}

/* En mode plein écran natif, s'assurer que le contenu est visible */
:fullscreen #playerModal,
:-webkit-full-screen #playerModal,
:-moz-full-screen #playerModal,
:-ms-fullscreen #playerModal {
    display: block !important;
    background: black !important;
}

/* Vidéo en mode plein écran */
:fullscreen #videoPlayer,
:-webkit-full-screen #videoPlayer,
:-moz-full-screen #videoPlayer,
:-ms-fullscreen #videoPlayer {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain !important;
}

/* ===== MENU LISTE DES CHAÎNES DANS LE LECTEUR ===== */

/* Menu liste des chaînes */
.channel-list-menu {
    pointer-events: auto !important;
    background: #0a0a0a !important;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.channel-list-menu.visible {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 999 !important;
    flex-direction: column !important;
    background: #0a0a0a !important;
}

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

/* Container de la liste des chaînes */
.channel-list-container {
    overflow-y: auto;
    display: block;
}

.channel-list-container::-webkit-scrollbar {
    width: 12px;
    display: block !important;
}

.channel-list-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.channel-list-container::-webkit-scrollbar-thumb {
    background: #00E676;
    border-radius: 6px;
    border: 3px solid rgba(0, 0, 0, 0.2);
}

/* Carte de chaîne dans la liste */
.channel-list-item {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 8px 10px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.channel-list-item:hover {
    background: #2a2a2a;
    border-color: #00E676;
}

.channel-list-item.active {
    background: #1a3a2a;
    border-color: #00E676;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.3);
}

.channel-list-item-logo {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    border-radius: 8px;
    overflow: hidden;
}

.channel-list-item-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.channel-list-item-logo-text {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

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

.channel-list-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-list-item-category {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.channel-list-item-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    background: rgba(0, 230, 118, 0.7);
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
    color: #000;
    backdrop-filter: blur(4px);
}

.channel-list-item-badge::after {
    content: 'Vue';
    font-size: 7px;
    opacity: 0.9;
}

/* En-tête du menu */
.channel-list-menu > div:first-child {
    background: #111;
}

/* Zone tactile */
#touchOverlay {
    transition: opacity 0.3s ease;
}

#touchOverlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===== FILTER BUTTONS ===== */

.filter-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #00E676 0%, #00C853 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-btn:hover::before {
    opacity: 0.1;
}

.filter-btn.active {
    background: linear-gradient(135deg, #00E676 0%, #00C853 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.4);
    transform: scale(1.05);
}

/* ===== TOAST NOTIFICATIONS ===== */

.toast {
    position: fixed;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(20, 20, 20, 0.98) 100%);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    z-index: 200;
    animation: slideUp 0.4s ease;
    border: 1px solid rgba(0, 230, 118, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 230, 118, 0.2);
    backdrop-filter: blur(20px);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== LOADING SPINNER ===== */

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #00E676;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== PRICING CARDS ===== */

.pricing-card {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.05) 0%, rgba(15, 19, 21, 0.95) 100%);
    border: 1px solid rgba(0, 230, 118, 0.15);
    border-radius: 1.25rem;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pricing-card:hover::before {
    opacity: 1;
}

.pricing-card:hover {
    border-color: rgba(0, 230, 118, 0.4);
    box-shadow: 0 20px 60px rgba(0, 230, 118, 0.3);
    transform: translateY(-4px);
}

/* ===== RADIO CARDS ===== */

.radio-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.8) 0%, rgba(15, 15, 15, 0.9) 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.radio-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.25rem;
    padding: 2px;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.5), transparent, rgba(0, 230, 118, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.radio-card:hover::after {
    opacity: 1;
}

.radio-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.radio-card.playing {
    border: 2px solid #00E676;
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.4);
    animation: glowPulse 2s infinite;
}

/* ===== MINI PLAYER ===== */

.mini-player {
    position: fixed;
    bottom: 5rem;
    left: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, rgba(27, 36, 39, 0.95) 0%, rgba(15, 15, 15, 0.98) 100%);
    backdrop-filter: blur(30px);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 40;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 230, 118, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.4s ease;
}

/* ===== BACKGROUND EFFECTS ===== */

.bg-gradient-animated {
    background: linear-gradient(-45deg, #0f0f0f, #1a1a1a, #0f1315, #1e1e1e);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== RIPPLE EFFECT ===== */

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #00E676 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* ===== SKELETON LOADING ===== */

.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 0.5rem;
}

/* ===== TEXT GRADIENT ===== */

.text-gradient {
    background: linear-gradient(135deg, #00E676 0%, #00C853 50%, #009624 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== ICON GLOW ===== */

.icon-glow {
    filter: drop-shadow(0 0 8px rgba(0, 230, 118, 0.6));
}

/* ===== CARD HOVER EFFECT ===== */

.card-3d {
    perspective: 1000px;
}

.card-3d-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
    transform: rotateY(10deg) rotateX(5deg);
}

/* ===== BODY HEIGHT MINIMUM ===== */

body {
    min-height: max(884px, 100dvh);
}

/* ===== RESPONSIVE UTILITIES ===== */

@media (max-width: 640px) {
    .text-responsive-xl {
        font-size: 1.25rem;
    }

    .text-responsive-lg {
        font-size: 1.125rem;
    }
}

/* ===== DARK MODE THEME COLORS ===== */

:root {
    --primary: #00E676;
    --primary-dark: #00C853;
    --primary-light: #00E676;
    --bg-dark: #0f0f0f;
    --bg-card: rgba(30, 30, 30, 0.8);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
}

/* ===== REALTIME VIEWERS BADGE ===== */

.viewers-badge {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px 8px;
    background: rgba(0, 230, 118, 0.95);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 230, 118, 0.5);
    transition: all 0.2s ease;
}

.viewers-badge.hidden {
    display: none;
}

.viewers-badge.viewers-pulse {
    animation: viewersPulse 0.4s ease;
}

.viewers-badge::after {
    content: 'Vue';
    font-size: 8px;
    opacity: 0.9;
    text-transform: uppercase;
    font-weight: 600;
}

@keyframes viewersPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Animation de mise à jour du compteur */
.viewers-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12px;
}

.viewers-count.increasing {
    animation: countUp 0.3s ease;
}

@keyframes countUp {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== TIKTOK LIVE STYLES ===== */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes tiktokPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes tiktokGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 0, 80, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 0, 80, 0.8), 0 0 30px rgba(255, 0, 80, 0.4);
    }
}

@keyframes scrollText {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

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

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

/* TikTok Live Overlay Styles */
.tiktok-live-overlay {
    background: linear-gradient(180deg,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.1) 30%,
        rgba(0,0,0,0.3) 60%,
        rgba(0,0,0,0.7) 100%);
}

.tiktok-live-badge {
    background: linear-gradient(135deg, #FF0050 0%, #FF4081 100%);
    box-shadow: 0 0 20px rgba(255, 0, 80, 0.5);
    animation: tiktokGlow 2s ease-in-out infinite;
}

.tiktok-stat-card {
    background: linear-gradient(135deg,
        rgba(255,255,255,0.15) 0%,
        rgba(255,255,255,0.05) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    animation: fadeSlideUp 0.3s ease-out;
}

.tiktok-comment-bubble {
    background: linear-gradient(135deg,
        rgba(0,0,0,0.7) 0%,
        rgba(0,0,0,0.5) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    animation: slideInLeft 0.3s ease-out;
}

.tiktok-like-animation {
    animation: tiktokFloat 2s ease-in-out infinite;
}

.tiktok-heart-particle {
    position: absolute;
    animation: floatUp 2s ease-out forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0.5);
        opacity: 0;
    }
}

/* ============================================================
   SMART TV / ANDROID TV LAYOUT
   ============================================================ */

/* ─── Top Menu Bar ─── */
.tv-top-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 2.5vw;
    height: 72px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.3s ease;
}

.tv-menu-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 3vw;
    flex-shrink: 0;
}

.tv-menu-logo h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1;
}

.tv-menu-items {
    display: flex;
    align-items: center;
    gap: 0.25vw;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.tv-menu-items::-webkit-scrollbar {
    display: none;
}

.tv-menu-item {
    position: relative;
    flex-shrink: 0;
    padding: 10px 1.5vw;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    outline: none;
    border: 2px solid transparent;
}

.tv-menu-item .material-symbols-outlined {
    font-size: 24px;
    transition: transform 0.2s;
}

.tv-menu-label {
    display: inline-block;
}

.tv-menu-item:hover,
.tv-menu-item.tv-focused {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.tv-menu-item.tv-menu-active {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.35rem;
}

.tv-menu-item.tv-menu-active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: linear-gradient(90deg, #00E676, #00C853);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.6);
}

.tv-menu-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.tv-menu-right button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
    cursor: pointer;
    outline: none;
}

.tv-menu-right button:hover,
.tv-menu-right button.tv-focused {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ─── Channel Grid ─── */
.tv-grid-container {
    padding: 80px 2.5vw 40px;
    min-height: 100vh;
}

.tv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2vw;
    max-width: 100%;
}

/* ─── Channel Card (TV Style) ─── */
.tv-channel-card {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    outline: none;
    border: 3px solid transparent;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s,
                box-shadow 0.3s;
    background: #1a1a1a;
}

.tv-channel-card:hover,
.tv-channel-card.tv-focused {
    transform: scale(1.045);
    z-index: 5;
    border-color: #00E676;
    box-shadow:
        0 0 0 2px rgba(0, 230, 118, 0.3),
        0 8px 32px rgba(0, 230, 118, 0.25),
        0 0 60px rgba(0, 230, 118, 0.1);
}

.tv-channel-card .tv-card-bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1e1e, #111);
}

.tv-channel-card .tv-card-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: blur(16px) brightness(0.4);
    transform: scale(1.2);
}

.tv-channel-card .tv-card-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.tv-channel-card .tv-card-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tv-channel-card .tv-card-logo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: opacity 0.4s;
}

.tv-channel-card .tv-card-logo img {
    width: 30%;
    max-width: 120px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
}

.tv-channel-card .tv-card-logo-text {
    font-size: 3vw;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.9);
    letter-spacing: 2px;
}

.tv-channel-card .tv-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 40%,
        rgba(0, 0, 0, 0.3) 70%,
        rgba(0, 0, 0, 0.85) 100%
    );
    z-index: 3;
    pointer-events: none;
}

.tv-channel-card .tv-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tv-card-info .tv-card-channel-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tv-card-info .tv-card-channel-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tv-card-info .tv-card-channel-logo-text {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

.tv-card-info .tv-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    flex: 1;
}

.tv-card-info .tv-card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.tv-card-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(255, 0, 0, 0.85);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tv-card-badge-live .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: pulse-opacity 1.5s infinite;
}

.tv-card-badge-quality {
    padding: 3px 6px;
    background: rgba(0, 230, 118, 0.2);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #00E676;
}

/* Loading indicator on card */
.tv-channel-card .tv-card-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.tv-channel-card .tv-card-loading .spinner-ring {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(0, 230, 118, 0.2);
    border-top-color: #00E676;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ─── TV Focus System ─── */
.tv-focusable {
    outline: none;
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tv-focusable.tv-focused {
    border-color: #00E676 !important;
    box-shadow:
        0 0 0 3px rgba(0, 230, 118, 0.25),
        0 0 20px rgba(0, 230, 118, 0.15) !important;
}

/* TV focused card has a different style (handled above) */
.tv-channel-card.tv-focusable.tv-focused {
    /* Inherited from .tv-channel-card.tv-focused above */
}

/* ─── Channel list items in player — TV focus ─── */
.channel-list-item.tv-focusable.tv-focused {
    background: #1a3a2a !important;
    border-color: #00E676 !important;
    border-width: 2px !important;
}

/* ─── Responsive Grid ─── */
@media (max-width: 1200px) {
    .tv-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5vw;
    }
}

@media (max-width: 900px) {
    .tv-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2vw;
    }
    .tv-menu-item {
        font-size: 0.95rem;
        padding: 8px 1.5vw;
    }
    .tv-menu-item.tv-menu-active {
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    .tv-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5vw;
    }
    .tv-top-menu {
        height: 56px;
        padding: 0 12px;
    }
    .tv-menu-item {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    .tv-menu-item.tv-menu-active {
        font-size: 0.95rem;
    }
    .tv-grid-container {
        padding-top: 64px;
    }
    .tv-menu-logo h1 {
        font-size: 1.2rem;
    }
}

/* ─── TV body: no scrollbar, dark ─── */
body.tv-mode {
    overflow-x: hidden;
    background: #0a0a0a;
}

body.tv-mode::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* ─── Player focus styles ─── */
#playerModal button.tv-focused {
    background: rgba(0, 230, 118, 0.3) !important;
    border-color: #00E676 !important;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.4) !important;
}

/* ─── Keyframe for focus glow pulse ─── */
@keyframes focusGlow {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2), 0 0 15px rgba(0, 230, 118, 0.1);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.35), 0 0 25px rgba(0, 230, 118, 0.2);
    }
}

.tv-focused {
    animation: focusGlow 2s ease-in-out infinite;
}

/* Channel Preview Mini-Player */
.channel-preview-container {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 230, 118, 0.1);
}

.channel-preview-container.show {
    display: block !important;
    opacity: 1 !important;
    transform: scale(1) !important;
}
