/* WRAPPER GERAL */
.canais-wrapper {
    display: grid;
    grid-template-columns: 280px 480px 1fr;
    height: calc(100vh - 80px);
    gap: 15px;
    padding: 15px;
    background: url('https://lazerplay.org/wp-content/themes/lazer-play/assets/backgrounds/mosaic.webp') center/cover no-repeat fixed;
}

/* ---------- COLUNA 1 — CATEGORIAS ---------- */
.col-categorias {
    background: rgba(10, 15, 30, 0.70);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    padding: 15px;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.05);
}

.col-categorias h2 {
    color: #97C1FF;
    font-size: 18px;
    margin-bottom: 10px;
}

.col-categorias ul li {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: rgba(18, 25, 45, 0.85);
    border: 1px solid rgba(255,255,255,0.04);
    color: #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: .2s;
}

/* Hover apenas destaca temporariamente */
.col-categorias ul li:hover {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* Apenas UM item ativo */
.col-categorias ul li.active {
    background: #0d6efd !important;
    color: white !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 10px rgba(13,110,253,0.4);
}


/* ---------- COLUNA 2 — LISTA DE CANAIS ---------- */
.col-canais {
    background: rgba(10, 15, 30, 0.70);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    padding: 15px;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.05);
}

.channel-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.channel-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 25, 45, 0.85);
    border: 1px solid rgba(255,255,255,0.04);
    padding: 14px 15px;
    color: #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: .2s;
}

.channel-card:hover {
    background: #0d6efd;
    color: white;
    transform: scale(1.02);
}

/* ---------- COLUNA 3 — PLAYER ---------- */
.col-player {
    background: rgba(0, 0, 0, 0.85);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    position: relative;
}

.player-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* ---------- SCROLLBAR ESTILO IPTV ---------- */
.col-categorias::-webkit-scrollbar,
.col-canais::-webkit-scrollbar {
    width: 6px;
}

.col-categorias::-webkit-scrollbar-thumb,
.col-canais::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 10px;
}

.col-categorias::-webkit-scrollbar-track,
.col-canais::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

.canais-wrapper {
    position: relative;
    z-index: 1;
}

.canais-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55); /* ESCURECIMENTO */
    backdrop-filter: blur(2px); /* opcional - fica mais moderno */
    z-index: -1; /* fica atrás do conteúdo */
}

.col-categorias ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.col-categorias ul li::marker {
    content: "";
}

/* ============================================
   RESPONSIVIDADE MOBILE — FIX FINAL + PLAYER NO TOPO + SEM ZOOM
============================================ */
@media (max-width: 768px) {

    html, body {
        width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Wrapper vira coluna e nunca estoura a tela */
    .canais-wrapper {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        padding: 10px;
        gap: 12px;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    /* PLAYER NO TOPO */
    .col-player {
        order: -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 260px !important;
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 12px;
        box-sizing: border-box !important;
    }

    .player-frame {
        width: 100% !important;
        height: 100% !important;
    }

    /* CATEGORIAS */
    .col-categorias {
        order: 1;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 230px;
        padding: 12px;
        overflow-y: auto;
        box-sizing: border-box !important;
    }

    /* LISTA DE CANAIS */
    .col-canais {
        order: 2;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 320px;
        padding: 12px;
        overflow-y: auto;
        box-sizing: border-box !important;
    }

    /* CARDS 100% sem ultrapassar */
    .channel-card {
        padding: 12px 15px;
        font-size: 15px;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}
