/* ===== HackerEdu - Estilo terminal hacker ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    background: #000;
    overflow: hidden;
}

body {
    font-family: 'Courier New', Courier, monospace;
    color: #00ff41;
    display: flex;
    height: 100vh;
}

.crt {
    flex: 1;
    display: flex;
    padding: 12px;
    position: relative;
}

/* leve efeito de "scanlines" de monitor antigo */
.crt::after {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0,0,0,0) 0px,
        rgba(0,0,0,0) 2px,
        rgba(0,0,0,0.15) 3px
    );
    pointer-events: none;
    z-index: 5;
}

.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid #00ff41;
    border-radius: 6px;
    padding: 14px;
    box-shadow: 0 0 18px rgba(0,255,65,0.25) inset, 0 0 12px rgba(0,255,65,0.15);
    background: rgba(0, 15, 0, 0.6);
    overflow: hidden;
}

.topbar {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #00ff41;
    padding-bottom: 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #7CFF9B;
    flex-wrap: wrap;
    gap: 4px;
}

.banner {
    color: #00ff41;
    font-size: 0.8rem;
    line-height: 1.1;
    white-space: pre;
    text-shadow: 0 0 6px rgba(0,255,65,0.5);
    margin-bottom: 6px;
}

.output {
    flex: 1;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 1rem;
    line-height: 1.35;
    text-shadow: 0 0 4px rgba(0,255,65,0.35);
    scrollbar-width: thin;
    scrollbar-color: #00ff41 #001a00;
}
.output::-webkit-scrollbar { width: 8px; }
.output::-webkit-scrollbar-thumb { background: #00ff41; border-radius: 4px; }
.output::-webkit-scrollbar-track { background: #001a00; }

.output .linha { display: block; }
.output .alerta { color: #ff5555; text-shadow: 0 0 6px rgba(255,80,80,0.6); }
.output .destaque { color: #ffe600; }
.output .eco { color: #7CFF9B; }

.input-line {
    display: flex;
    align-items: center;
    border-top: 1px dashed #00ff41;
    padding-top: 10px;
    margin-top: 8px;
}

.prompt {
    color: #00ff41;
    margin-right: 8px;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(0,255,65,0.5);
}

.cmd-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #00ff41;
    font-family: inherit;
    font-size: 1rem;
    caret-color: #00ff41;
    text-shadow: 0 0 4px rgba(0,255,65,0.4);
}

/* cursor piscante quando o input está vazio */
@keyframes blink { 0%,49%{opacity:1} 50%,100%{opacity:0} }

@media (max-width: 600px) {
    .output { font-size: 0.9rem; }
    .banner { font-size: 0.6rem; }
    .topbar { font-size: 0.7rem; }
}

/* ─── Cores semânticas do output ────────────────────────────────────────── */
.c-ok   { color: #00ff66; text-shadow: 0 0 6px rgba(0,255,102,0.5); }
.c-err  { color: #ff4d4d; text-shadow: 0 0 6px rgba(255,77,77,0.5); }
.c-warn { color: #ffe600; text-shadow: 0 0 6px rgba(255,230,0,0.4); }
.c-dim  { color: #4a8a5a; }

/* ─── Autocomplete dropdown ──────────────────────────────────────────────── */
.autocomplete-box {
    background: #001a00;
    border: 1px solid #00cc44;
    border-radius: 6px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 20px rgba(0,255,65,0.2);
    margin-top: 4px;
    scrollbar-width: thin;
    scrollbar-color: #00ff41 #001a00;
}

.autocomplete-item {
    padding: 7px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #003300;
    font-size: 0.92rem;
    transition: background 0.1s;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover,
.autocomplete-item.active {
    background: #003300;
    color: #00ff66;
}

.ac-nome  { color: #a5dfb9; }
.autocomplete-item.active .ac-nome { color: #00ff66; }
.ac-turma { color: #4a8a5a; font-size: 0.78rem; white-space: nowrap; }
.autocomplete-item.active .ac-turma { color: #00cc44; }

/* Versão do autocomplete para o formulário de crachá */
.badge-autocomplete {
    position: absolute;
    left: 0; right: 0;
    border: 1px solid rgba(0,204,68,0.5);
    border-radius: 6px;
    z-index: 200;
}
