@font-face {
    font-family: 'minecrafter';
    src: url("assets/Minecrafter.Reg.ttf") format("truetype");
    font-style: normal;
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'monocraft';
    src: url("assets/Monocraft.ttf") format("truetype");
    font-style: normal;
    font-weight: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0A0B11;
    color: #ffffff;
    /* Web App: trava o tamanho da tela e esconde a rolagem externa */
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* --- Container Principal --- */
.container {
    max-width: 800px;
    margin: 0 auto;
    /* Topo levemente aumentado para 32px. Fundo em 110px para proteger a navbar. */
    padding: 32px 20px 110px 20px;
    height: 100%;

    display: flex;
    flex-direction: column;
}

/* --- Cabeçalho (Header) --- */
header {
    background-color: #29264F;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    position: relative;
    border-top: 4px solid #413C88;
    border-left: 4px solid #413C88;
    border-bottom: 4px solid #000000;
    border-right: 4px solid #000000;
    flex-shrink: 0;
}

header::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 4px solid #29264F;
    pointer-events: none;
}

.header-shadow {
    height: 12px;
    flex-shrink: 0;
    background: linear-gradient(
        to bottom,
        #16143D 5px,
        #1A1733 0px,
        #000000 0px,
        #000000 12px
    );
}

.head img {
    width: clamp(56px, 6vw, 72px);
    height: clamp(56px, 6vw, 72px);
    image-rendering: pixelated;
    display: block;
    border: 4px solid #ffffff;
    position: relative;
    z-index: 1;
}

.title-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

h1 {
    font-family: 'minecrafter';
    font-size: clamp(18px, 3vw, 32px);
    line-height: 1;
}

.conectado {
    font-family: 'monocraft';
    color: #9A9A9A;
    font-size: clamp(9px, 1.2vw, 16px);
    margin-top: 4px;
}

.conectado span {
    color: #edebeb;
}

.sair {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.sair:hover {
    filter: brightness(2.0);
}

.sair img {
    width: clamp(24px, 3vw, 40px);
    height: auto;
    image-rendering: pixelated;
}

/* --- Área de Conteúdo Principal --- */
.conteudo {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

/* --- Janela (Console / Lista / Configurações) --- */
.console {
    border-top: 4px solid #413C88;
    border-left: 4px solid #413C88;
    border-bottom: 4px solid #000000;
    border-right: 4px solid #000000;
    background-color: #0c0c14;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
}

.console::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 4px solid #29264F;
    pointer-events: none;
}

.janela-titulo {
    background-color: #29264F;
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    font-family: 'monocraft', monospace;
    font-size: 16px;
    font-weight: normal;
}

.janela-titulo h2 {
    font-family: 'monocraft', monospace;
    font-size: 16px;
    font-weight: normal;
}

.fechar-btn {
    background: none;
    border: none;
    color: white;
    font-family: 'monocraft', sans-serif;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.fechar-btn:hover {
    color: #ff5555;
}

.console-body {
    flex: 1;
    padding: 16px;
    font-family: 'monocraft';
    font-size: 12px;
    color: white;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* --- Scrollbar estilo Minecraft --- */
.console-body::-webkit-scrollbar {
    width: 6px;
}
.console-body::-webkit-scrollbar-track {
    background: #0c0c14;
}
.console-body::-webkit-scrollbar-thumb {
    background: #413C88;
}

#status {
    text-align: center;
    margin-bottom: 10px;
    color: #fff;
    font-size: 14px;
    font-family: 'monocraft', monospace;
}

/* --- Customizações: Console --- */
.log-line {
    line-height: 1.4;
    word-break: break-all;
    margin-bottom: 6px;
}
.log-time { color: #7f7f7f; }
.log-status.info { color: #55ff55; }
.log-status.success { color: #55ffff; }
.log-status.warn { color: #ffaa00; }

/* --- Customizações: Lista de Jogadores --- */
.jogadores-lista { gap: 16px; }
.jogador-item { display: flex; align-items: center; gap: 12px; }
.jogador-avatar { width: 48px; height: 48px; image-rendering: pixelated; }
.jogador-info { display: flex; flex-direction: column; justify-content: center; flex: 1; gap: 6px; }
.jogador-nome { font-family: 'monocraft'; font-size: 14px; color: white; }
.jogador-controles { display: flex; align-items: center; gap: 8px; }
.jogador-volume-texto { font-family: 'monocraft'; font-size: 12px; color: #ffffff; min-width: 110px; white-space: nowrap; }
.jogador-volume-texto small { font-size: 8px; }

.volume-slider {
    -webkit-appearance: none;
    flex: 1;
    height: 4px;
    background: #413C88;
    outline: none;
    margin: 0 10px 0 0;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 8px;
    height: 12px;
    background: #c3c3c3;
    cursor: pointer;
}
.volume-slider::-moz-range-thumb {
    width: 8px;
    height: 12px;
    background: #c3c3c3;
    cursor: pointer;
    border: none;
    border-radius: 0;
}

/* --- Customizações: Configurações --- */
.configuracoes-lista { gap: 20px; }
.config-group { display: flex; flex-direction: column; gap: 10px; }
.config-label { font-family: 'monocraft'; font-size: 12px; color: white; }

.select-wrapper { position: relative; width: 100%; }
.select-wrapper::after {
    content: "V";
    font-family: 'monocraft';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: white;
    font-size: 12px;
}

.btn-iniciar-teste.testing {
    background-color: #ff5555;
}
.minecraft-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background-color: #3B3865;
    border: none;
    color: white;
    font-family: 'monocraft';
    font-size: 10px;
    padding: 10px 12px;
    cursor: pointer;
    outline: none;
}
.minecraft-select option { background-color: #29264F; }

.btn-iniciar-teste {
    background-color: #3B3865;
    border: none;
    color: white;
    font-family: 'monocraft';
    font-size: 10px;
    padding: 10px 16px;
    cursor: pointer;
    width: max-content;
    transition: filter 0.2s;
}
.btn-iniciar-teste:hover { filter: brightness(1.2); }

/* --- Botões Comuns (.btn) --- */
.botoes-container {
    display: flex;
    gap: 16px;
    height: 56px;
    flex-shrink: 0;
}
.btn {
    background-color: #29264F;
    border-top: 4px solid #413C88;
    border-left: 4px solid #413C88;
    border-bottom: 4px solid #000000;
    border-right: 4px solid #000000;
    color: white;
    font-family: 'monocraft';
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.2s;
    user-select: none;
    text-decoration: none;
}
.btn:hover { filter: brightness(1.3); }
.btn:active { filter: brightness(0.9); }
.btn-conectar { flex-grow: 1; }
.btn-icon { width: 56px; flex-shrink: 0; }
.btn-icon img { width: 28px; height: 28px; image-rendering: pixelated; }

.btn-icon.muted img {
    filter: invert(27%) sepia(91%) saturate(7406%) hue-rotate(354deg) brightness(94%) contrast(124%) !important;
}

.btn-icon.deafened img {
    filter: invert(27%) sepia(91%) saturate(7406%) hue-rotate(354deg) brightness(94%) contrast(124%) !important;
}

/* --- BARRA DE NAVEGAÇÃO INFERIOR ALINHADA AOS BOTÕES --- */
.bottom-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #29264F;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 0 32px;
    height: 56px;
    border-top: 4px solid #413C88;
    border-left: 4px solid #413C88;
    border-bottom: 4px solid #000000;
    border-right: 4px solid #000000;
    z-index: 1000;
}
.nav-btn {
    background: none;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    transition: transform 0.1s;
    text-decoration: none;
}
.nav-btn img {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    transition: filter 0.2s;
}
.nav-btn:hover img { filter: brightness(1.3); }
.nav-btn.active {
    border: 2px solid #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
}
.nav-btn.active img { filter: brightness(1.2); }

/* --- TELA DE LOGIN --- */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    height: 100dvh;
    padding: 20px;
    overflow: hidden;
}

.login-console {
    height: auto;
    width: 100%;
    max-width: 500px;
    flex: none;
}

.login-body {
    align-items: center;
    text-align: center;
    padding: 30px 20px 40px 20px;
}

.login-label {
    font-family: 'monocraft';
    font-size: 14px;
    color: white;
    margin-bottom: 24px;
}

.pin-inputs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 30px;
}

.pin-box {
    width: 60px;
    height: 70px;
    background-color: #615C98;
    border: none;
    outline: none;
    color: white;
    font-family: 'monocraft';
    font-size: 32px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.pin-box:focus { background-color: #726db4; }

.login-instruction {
    font-family: 'monocraft';
    font-size: 10px;
    color: white;
    line-height: 1.6;
    margin-bottom: 30px;
}

.login-btn-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    position: relative;
    z-index: 2;
}
.login-btn-wrapper .btn { padding: 10px 40px; }

/* --- Responsividade (Celulares) --- */
@media (max-width: 600px) {
    /* CORREÇÃO MOBILE AQUI: Topo ajustado para 24px */
    .container { padding: 24px 8px 100px 8px; }

    header { padding: 10px 12px; gap: 10px; }
    .head img { width: 64px; height: 64px; border-width: 3px; }
    h1 { font-size: 24px; }
    .conectado { font-size: 11px; margin-top: 3px; }
    .sair img { width: 32px; }
    .header-shadow { height: 10px; }
    .conteudo { margin-top: 16px; gap: 16px; }
    .botoes-container { gap: 12px; height: 48px; }
    .btn-icon { width: 48px; }

    .bottom-bar {
        bottom: 16px;
        gap: 16px;
        padding: 0 24px;
        border-width: 4px;
        height: 48px;
    }
    .nav-btn { padding: 4px; }
    .nav-btn img { width: 24px; height: 24px; }

    .jogador-avatar { width: 40px; height: 40px; }
    .jogador-nome { font-size: 12px; }
    .jogador-volume-texto { font-size: 10px; width: 85px; }
    .minecraft-select, .btn-iniciar-teste { font-size: 9px; }

    /* Login Mobile */
    .pin-inputs { gap: 10px; }
    .pin-box { width: 50px; height: 60px; font-size: 24px; }
}