body {
    margin: 0;
    background: black;
    color: white;
    font-family: Arial;
}

#tv {
    display: flex;
    height: 100vh;
}

iframe {
    flex: 3;
    border: none;
}

#epg {
    flex: 1;
    background: #111;
    padding: 10px;
    overflow-y: auto;
}
button {
    width: 100%;
    padding: 18px;
    margin-bottom: 10px;

    background: #222;
    color: white;

    border: 2px solid #333;
    border-radius: 10px;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}

#controls {
    position: absolute;
    bottom: 20px;
    left: 20px;

    display: flex;
    gap: 10px;
}

#controls button {
    padding: 18px 25px;
    font-size: 18px;
    background: rgba(20,20,20,0.8);
    color: white;
    border: 1px solid #333;
    border-radius: 10px;
}
#playerContainer {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: black;
}

#player {
    width: 100%;
    height: 60vh;
    border: none;
}

#channelInfo {
    padding: 10px 20px;
    background: #111;
}

#channelInfo h2 {
    margin: 0;
    font-size: 24px;
}

#channelList {
    display: flex;
    gap: 12px;

    padding: 15px;
    overflow-x: auto;

    background: #0d0d0d;
}

.channelItem {
    min-width: 220px;
    padding: 18px;

    background: #1c1c1c;
    border-radius: 12px;

    cursor: pointer;

    font-size: 18px;
    font-weight: bold;

    transition: 0.2s;
    white-space: nowrap;
}

.channelItem:hover {
    background: #333;
    transform: scale(1.05);
}

.channelItem.active {
    background: #00bcd4;
    color: black;
}

#tvLayout {
    display: flex;
    height: 100vh;
    background: black;
}

/* PLAYER À ESQUERDA */
#playerSection {
    flex: 3;
    position: relative;
    display: flex;
    flex-direction: column;
}

#player {
    width: 100%;
    height: 70vh;
    border: none;
}

/* CONTROLOS */
#controls {
    position: absolute;
    top: 10px;
    left: 10px;

    display: flex;
    flex-direction: row;   /* 🔥 garante horizontal */
    align-items: center;

    gap: 10px;

    height: auto;          /* 🔥 impede stretch vertical */
    width: auto;

    z-index: 9999;
}

#controls button {
    height: auto !important;   /* 🔥 bloqueia altura exagerada */
    width: auto !important;    /* 🔥 bloqueia largura full */

    padding: 12px 16px;

    display: inline-block;     /* 🔥 evita comportamento flex estranho */

    font-size: 16px;

    background: rgba(20,20,20,0.85);
    color: white;

    border: 1px solid #333;
    border-radius: 8px;
}

/* INFO CANAL */
#channelInfo {
    padding: 10px 20px;
    background: #111;
}

/* SIDEBAR DIREITA */
#sidebar {
    flex: 1;
    background: #111;
    padding: 15px;

    overflow-y: auto;
}

#channelList {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
