/* 1. ESTILOS GERAIS (Funciona em todos os dispositivos) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000;
    color: #00ff41;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.terminal-container {
    width: 95%;
    max-width: 850px;
    height: 85vh;
    border: 1px solid #00ff41;
    background-color: #050505;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    display: flex;
    flex-direction: column;
    padding: 15px;
    position: relative;
    overflow: hidden; /* Garante que nada saia do container */
}

/* Barra de Alerta Superior */
.status-bar {
    font-size: 0.75em;
    padding: 8px;
    border-bottom: 1px solid #333;
    margin-bottom: 15px;
    text-align: center;
    color: #ff3333; /* Vermelho de alerta */
    letter-spacing: 2px;
    font-weight: bold;
}

/* A mágica do piscar */
.piscante {
    animation: pulse-alerta 1.5s infinite;
}

@keyframes pulse-alerta {
    0% { opacity: 1; }
    50% { opacity: 0.1; } /* Quase some no meio do ciclo */
    100% { opacity: 1; }
}

/* Área de Texto */
.output {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    line-height: 1.4;
    font-size: 14px;
}

.output p {
    margin-bottom: 8px;
    word-wrap: break-word;
}

/* Cores de Mensagem */
.msg-info { color: #00ff41; }
.msg-error { color: #ff3333; }
.msg-win { color: #00fbff; text-shadow: 0 0 5px #00fbff; font-weight: bold; }
.msg-death { color: #ff0000; text-shadow: 0 0 10px #ff0000; font-weight: bold; }

/* Linha de Input */
.input-line {
    display: flex;
    align-items: center;
    border-top: 1px solid #333;
    padding-top: 15px;
}

.prompt {
    color: #00fbff;
    margin-right: 8px;
    font-weight: bold;
}

input[type="number"] {
    background: transparent !important;
    border: none !important;
    color: #00ff41 !important;
    font-family: inherit;
    outline: none;
    width: 80px;
    height: 40px;
    font-size: 1.2em;
    padding: 5px;
}

/* Remove setinhas do input */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#guess-btn {
    background-color: #00ff41;
    color: #000;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
    margin-left: auto; /* Alinha à direita no PC */
}

#guess-btn:hover {
    background-color: #00fbff;
}

/* 2. AJUSTES PARA MOBILE (Abaixo de 600px) */
@media (max-width: 600px) {
    .terminal-container {
        width: 100% !important;
        height: 100vh !important;
        border: none !important;
        border-radius: 0;
        padding: 10px !important;
    }

    .input-line {
        flex-direction: column; /* Empilha input e botão */
        align-items: stretch;
        padding-bottom: 30px; 
        gap: 10px;
    }

    #guess-btn {
        width: 100%;
        margin-left: 0 !important;
        height: 50px;
    }
}