:root {
    --bg: #071019;
    --panel: #101b26;
    --panel-hover: #172635;
    --line: rgba(255,255,255,.08);
    --text: #f5f8fb;
    --muted: #8b9aa7;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, sans-serif;
}

.telegram-app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Lista lateral */

.channels-panel {
    width: 360px;
    flex-shrink: 0;
    background: var(--panel);
    border-right: 1px solid var(--line);
}

.channels-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 22px;
}

.channels-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.channels-list {
    padding: 8px;
}

/* Item do canal */

.channel-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    transition: .18s ease;
}

.channel-item:hover {
    background: var(--panel-hover);
}

.channel-item > img,
.channel-item > span {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    display: grid;
    place-items: center;
    background: #245b78;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.channel-item div {
    min-width: 0;
    flex: 1;
}

.channel-item strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 20px;
}

.channel-item small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 14px;
    line-height: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Área direita */

.channel-container {
    flex: 1;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.empty-channel {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
    transform: none;
}

.empty-channel h2 {
    margin: 0 0 10px;
    color: #9bb8cc;
}

.empty-channel p {
    margin: 0;
}


/* Transição do canal */

#channel-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--bg);
    transform: translateX(100%);
    transition: transform .25s ease;
}

#channel-frame.active {
    transform: translateX(0);
}


/* Botão voltar */

.back-button {
    position: absolute;
    top: 16px;
    left: 18px;
    z-index: 5;

    width: 42px;
    height: 42px;

    border: 0;
    border-radius: 50%;

    background: #162b3b;
    color: white;

    font-size: 22px;
    cursor: pointer;

    opacity: 0;
    pointer-events: none;

    transition: .2s;
}

.back-button.active {
    opacity: 1;
    pointer-events: auto;
}


/* Mobile */

@media(max-width:700px) {

    .telegram-app {
        width: 100%;
    }

    .channels-panel {
        width: 100%;
        border-right: 0;
    }

    /*
       No mobile o Telegram mostra somente a lista.
       A tela "Escolha um canal" não deve ocupar espaço.
    */
    .empty-channel {
        display: none;
    }

    .channels-header {
        height: 60px;
        padding: 0 18px;
    }

    .channels-header h1 {
        font-size: 20px;
    }

    .channel-item {
        padding: 12px;
    }

.channel-item > img,
.channel-item > span {
        width: 54px;
        height: 54px;
    }

    .telegram-app.open .channels-panel {
        display: none;
    }
}

/* Ajuste: emojis premium dentro do nome do canal */
.channel-item strong {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    min-width: 0;
}

.channel-item strong .vt-premium-emoji {
    width: 18px;
    height: 18px;
    display: inline-block;
    flex: 0 0 auto;
    vertical-align: middle;
    margin: 0 2px;
}
