* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    background: #0B0E14;
    color: #E6E8EF;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

input {
    font-family: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #141820;
}
::-webkit-scrollbar-thumb {
    background: #2A2F3D;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3A4050;
}

.appAlert {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1A1F2C;
    border: 1px solid #2A2F3D;
    border-left: 4px solid #5865F2;
    color: #E6E8EF;
    padding: 14px 22px;
    border-radius: 10px;
    z-index: 99999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    max-width: 480px;
    font-size: 14px;
    font-weight: 500;
    animation: alertIn 0.25s ease-out;
}
.appAlert.appAlertError {
    border-left-color: #ED4245;
}
.appAlert.appAlertSuccess {
    border-left-color: #3BA55D;
}
.appAlert.appAlertWarning {
    border-left-color: #FAA61A;
}
.appAlert.appAlertInfo {
    border-left-color: #5865F2;
}
@keyframes alertIn {
    from { opacity: 0; transform: translate(-50%, -12px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ================= HOME ================= */

#homeWrap {
    min-height: 100vh;
    background: radial-gradient(ellipse at top, #1A1F38 0%, #0B0E14 55%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

#homeMain {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
}

#homeLogo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.homeLogoSvg {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 4px 20px rgba(88,101,242,0.4));
}
#homeTitle {
    font-size: 34px;
    font-weight: 800;
    background: linear-gradient(135deg, #FFFFFF 0%, #B8BCDD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}
#homeSubtitle {
    color: #8A90A6;
    font-size: 15px;
    text-align: center;
    max-width: 380px;
}

#homeCard {
    width: 100%;
    background: #13161F;
    border: 1px solid #222736;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

#homeTabs {
    display: flex;
    border-bottom: 1px solid #222736;
}
.homeTab {
    flex: 1;
    padding: 16px 18px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #8A90A6;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    user-select: none;
}
.homeTab:hover {
    color: #C8CCDE;
    background: rgba(88,101,242,0.04);
}
.homeTab.homeTabActive {
    color: #FFFFFF;
    border-bottom-color: #5865F2;
    background: rgba(88,101,242,0.06);
}

.homeForm {
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.homeLabel {
    font-size: 13px;
    font-weight: 600;
    color: #B8BCDD;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: -8px;
}

.homeInput {
    width: 100%;
    padding: 14px 16px;
    background: #0B0E14;
    border: 1.5px solid #2A2F3D;
    border-radius: 10px;
    font-size: 15px;
    color: #E6E8EF;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.homeInput::placeholder {
    color: #5A6075;
}
.homeInput:focus {
    border-color: #5865F2;
    box-shadow: 0 0 0 3px rgba(88,101,242,0.15);
}

.homeBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.homeBtn:active {
    transform: scale(0.98);
}
.homeBtnIcon {
    width: 20px;
    height: 20px;
}
.homeBtnPrimary {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(88,101,242,0.35);
}
.homeBtnPrimary:hover {
    box-shadow: 0 6px 24px rgba(88,101,242,0.5);
    filter: brightness(1.08);
}
.homeBtnSecondary {
    background: #1E2331;
    color: #E6E8EF;
    border: 1.5px solid #2A2F3D;
}
.homeBtnSecondary:hover {
    background: #242A3B;
    border-color: #3A4050;
}

#homeInfo {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    background: rgba(88,101,242,0.05);
    border: 1px solid rgba(88,101,242,0.15);
    border-radius: 14px;
}
.homeInfoItem {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #B8BCDD;
    font-weight: 500;
}
.homeInfoIcon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* ================= TRANSMITIR ================= */

#transWrap {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0B0E14;
}

#transTopo {
    height: 62px;
    min-height: 62px;
    background: #13161F;
    border-bottom: 1px solid #222736;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
#transTopoEsq, #transTopoDir {
    display: flex;
    align-items: center;
    gap: 16px;
}
.transLogoSvg {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}
#transTopoTitulo {
    font-size: 18px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.3px;
}
#transSalaCod {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    background: #1A1F2C;
    border: 1px solid #2A2F3D;
    border-radius: 8px;
    font-size: 13px;
    color: #B8BCDD;
    font-family: 'SFMono-Regular', Consolas, Monaco, monospace;
}
.transSalaIco {
    width: 15px;
    height: 15px;
    color: #5865F2;
}
#transAoVivo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(237,66,69,0.12);
    border: 1px solid rgba(237,66,69,0.3);
    border-radius: 8px;
    color: #ED4245;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
}
#transPontoVermelho {
    width: 8px;
    height: 8px;
    background: #ED4245;
    border-radius: 50%;
    animation: pulseVivo 1.4s ease-in-out infinite;
}
@keyframes pulseVivo {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(237,66,69,0.5); }
    50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(237,66,69,0); }
}
#transViewers {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    background: #1A1F2C;
    border: 1px solid #2A2F3D;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #B8BCDD;
}
.transViewersIco {
    width: 16px;
    height: 16px;
    color: #5865F2;
}
#transSairBtn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background: rgba(237,66,69,0.1);
    border: 1px solid rgba(237,66,69,0.25);
    border-radius: 8px;
    color: #ED4245;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}
#transSairBtn:hover {
    background: rgba(237,66,69,0.2);
}
.transSairIco {
    width: 16px;
    height: 16px;
}

#transCorpo {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

#transVideoArea {
    flex: 1;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 0;
}
#transVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
#transVideoPlaceholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: radial-gradient(ellipse at center, #0F1320 0%, #05070B 100%);
    pointer-events: none;
}
.transPlaceholderIco {
    width: 96px;
    height: 96px;
    opacity: 0.7;
    animation: floatIco 3s ease-in-out infinite;
}
@keyframes floatIco {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
#transPlaceholderTxt {
    font-size: 18px;
    font-weight: 600;
    color: #8A90A6;
    text-align: center;
    max-width: 380px;
}

#transLateral {
    width: 360px;
    min-width: 360px;
    background: #13161F;
    border-left: 1px solid #222736;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    overflow-y: auto;
}

.transBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.transBtn:active {
    transform: scale(0.98);
}
.transBtnIcon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.transBtnPrimary {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(88,101,242,0.35);
}
.transBtnPrimary:hover {
    box-shadow: 0 6px 20px rgba(88,101,242,0.5);
    filter: brightness(1.08);
}
.transBtnPrimary.transBtnOn {
    background: linear-gradient(135deg, #3BA55D 0%, #2D8C4B 100%);
    box-shadow: 0 4px 14px rgba(59,165,93,0.35);
}
.transBtnGhost {
    background: #1A1F2C;
    color: #E6E8EF;
    border: 1.5px solid #2A2F3D;
    padding: 13px 16px;
    flex-shrink: 0;
    width: auto;
}
.transBtnGhost:hover {
    background: #242A3B;
    border-color: #3A4050;
}
.transBtnGhost.transBtnCopiado {
    background: rgba(59,165,93,0.15);
    border-color: rgba(59,165,93,0.4);
    color: #3BA55D;
}

.transChkRow {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    padding: 6px 4px;
    border-radius: 8px;
    transition: background .15s ease;
}
#transAudioArea {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 4px 4px;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin: 0 0 8px;
}
#transAudioArea:hover .transChkRow:hover {
    background: rgba(255,255,255,0.03);
}
.transChk {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    border: 2px solid #3A4050;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    background: #0B0E14;
}
.transChkIco {
    width: 14px;
    height: 14px;
    color: transparent;
    transition: color 0.15s ease;
}
.transChk.transChkOn {
    background: #5865F2;
    border-color: #5865F2;
}
.transChk.transChkOn .transChkIco {
    color: #FFFFFF;
}
.transChkLabel {
    font-size: 13px;
    color: #B8BCDD;
    font-weight: 500;
    line-height: 1.3;
}

.transLabel {
    font-size: 12px;
    font-weight: 700;
    color: #8A90A6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: -4px;
}

.transInput {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    background: #0B0E14;
    border: 1.5px solid #2A2F3D;
    border-radius: 9px;
    font-size: 13px;
    color: #E6E8EF;
    font-family: 'SFMono-Regular', Consolas, Monaco, monospace;
}
#transConviteLinha {
    display: flex;
    gap: 8px;
}

#transListaPessoas {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
}
.transPessoa {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    background: #1A1F2C;
    border: 1px solid #222736;
    border-radius: 9px;
}
.transPessoaAvatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
}
.transPessoaNome {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #E6E8EF;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.transPessoaBadge {
    padding: 3px 8px;
    background: rgba(88,101,242,0.15);
    border-radius: 5px;
    font-size: 10px;
    font-weight: 800;
    color: #5865F2;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.transPessoaHost .transPessoaBadge {
    background: rgba(240,178,50,0.15);
    color: #F0B232;
}

#transStatusArea {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #222736;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
#transStatusIco {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8A90A6;
    margin-top: 6px;
    flex-shrink: 0;
}
#transStatusIco.transStatusConectando {
    background: #FAA61A;
    animation: pulseStatus 1s ease-in-out infinite;
}
#transStatusIco.transStatusOk {
    background: #3BA55D;
}
#transStatusIco.transStatusErro {
    background: #ED4245;
}
@keyframes pulseStatus {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
#transStatusTexto {
    font-size: 12px;
    color: #8A90A6;
    line-height: 1.5;
    font-weight: 500;
}

/* ================= ASSISTIR ================= */

#viewWrap {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #05070B;
}

#viewTopo {
    height: 62px;
    min-height: 62px;
    background: #13161F;
    border-bottom: 1px solid #222736;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    z-index: 10;
}
#viewTopoEsq, #viewTopoDir {
    display: flex;
    align-items: center;
    gap: 16px;
}
.viewLogoSvg {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}
#viewTopoTitulo {
    font-size: 18px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.3px;
}
#viewSalaCod {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    background: #1A1F2C;
    border: 1px solid #2A2F3D;
    border-radius: 8px;
    font-size: 13px;
    color: #B8BCDD;
    font-family: 'SFMono-Regular', Consolas, Monaco, monospace;
}
.viewSalaIco {
    width: 15px;
    height: 15px;
    color: #5865F2;
}
#viewAoVivo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(237,66,69,0.12);
    border: 1px solid rgba(237,66,69,0.3);
    border-radius: 8px;
    color: #ED4245;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
}
#viewPontoVermelho {
    width: 8px;
    height: 8px;
    background: #ED4245;
    border-radius: 50%;
    animation: pulseVivo 1.4s ease-in-out infinite;
}
#viewVoltarBtn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background: #1A1F2C;
    border: 1px solid #2A2F3D;
    border-radius: 8px;
    color: #B8BCDD;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, color 0.15s ease;
}
#viewVoltarBtn:hover {
    background: #242A3B;
    color: #FFFFFF;
}
.viewVoltarIco {
    width: 16px;
    height: 16px;
}

#viewCorpo {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #000;
    overflow: hidden;
    min-height: 0;
}

#viewVideoArea {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    min-height: 0;
}
#viewVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
#viewVideoPlaceholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: radial-gradient(ellipse at center, #0F1320 0%, #05070B 100%);
    padding: 20px;
    text-align: center;
}
.viewPlaceholderIco {
    width: 88px;
    height: 88px;
    opacity: 0.6;
    animation: spin 2s linear infinite;
    transform-origin: center;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
#viewPlaceholderTxt {
    font-size: 20px;
    font-weight: 700;
    color: #B8BCDD;
    max-width: 440px;
}
#viewPlaceholderSub {
    font-size: 14px;
    color: #5A6075;
    max-width: 440px;
}

#viewControles {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px 10px 16px;
    background: rgba(19,22,31,0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-width: calc(100% - 40px);
}
.viewCtrlBtn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 11px;
    background: #1E2331;
    border: 1px solid #2A2F3D;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E6E8EF;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, transform 0.08s ease;
}
.viewCtrlBtn:hover {
    background: #2A2F3D;
}
.viewCtrlBtn:active {
    transform: scale(0.94);
}
.viewCtrlBtn.viewCtrlMudo {
    background: rgba(237,66,69,0.18);
    border-color: rgba(237,66,69,0.35);
    color: #ED4245;
}
.viewCtrlIco {
    width: 20px;
    height: 20px;
}
#viewStatusTxt {
    font-size: 13px;
    font-weight: 600;
    color: #8A90A6;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#viewClickOverlay {
    position: absolute;
    inset: 0;
    background: transparent;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 20;
}
#viewClickOverlay.viewClickShow {
    display: none !important;
}
