/* 1. CONFIGURAÇÕES GERAIS (As cores "sedosas") */
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: #F0F4F8; /* Azul-gelo suave para não cegar no escuro */
    color: #102A43; /* Azul marinho profundo para o texto */
}

/* 2. OS CARDS (As seções explicativas) */
section {
    background: #FFFFFF;
    margin-bottom: 25px;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #D9E2EC;
    border-left: 6px solid #007acc; /* Detalhe lateral elegante */
    
    /* Transição suave para o efeito de "vir pra frente" */
    transition: all 0.3s ease-in-out; 
    cursor: default;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* 3. O EFEITO "MUSCULOSO" (Interatividade) */
section:hover {
    transform: translateY(-8px) scale(1.01); /* Sobe um pouco mais */
    box-shadow: 0 15px 30px rgba(0, 122, 204, 0.15); /* Sombra azulada e macia */
    border-color: #007acc;
    background-color: #f8fbff; /* Muda levemente a cor do card no hover */
}

/* 4. TÍTULOS */
h1 {
    text-align: center;
    color: #102A43;
    margin-bottom: 40px;
}

h2 {
    color: #007acc;
    margin-top: 0;
    font-size: 1.5rem;
    border-bottom: 2px solid #eef2f7;
    padding-bottom: 5px;
    display: block; /* Ocupa a largura toda para ficar mais moderno */
}

/* 5. O SIMULADOR (Visual Tech/Terminal) */
#terminal {
    background-color: #243B53; /* Azul bem escuro (foco total aqui) */
    color: #BCCCDC;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    border-left: 6px solid #48BB78; /* Começa com verde de "Online" */
    padding: 30px;
    border-left: 8px solid; /* Deixe sem cor fixa aqui para o JS controlar */
    transition: all 0.5s ease; /* Transição suave de 0.5 segundos */
}

#terminal h2 {
    color: #9FB3C8;
    border-bottom: 1px solid #334E68;
}

#terminal button {
    background: #007acc;
    color: white;
    border: none;
    padding: 12px 20px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    margin-top: 15px;
}

#terminal button:hover {
    background: #005a9e;
}

/* 6. ANIMAÇÕES */
@keyframes pulsar {
    0% { opacity: 1; text-shadow: 0 0 5px rgba(72, 187, 120, 0.5); }
    50% { opacity: 0.6; text-shadow: 0 0 15px rgba(72, 187, 120, 0.8); }
    100% { opacity: 1; text-shadow: 0 0 5px rgba(72, 187, 120, 0.5); }
}

/* Status Verde Vibrante (Normal) */
#server-state {
    color: #2ecc71; /* Verde bem vivo */
    font-weight: bold;
    transition: all 0.3s;
}

/* O "Quadrado" do Servidor (Terminal) */
#terminal {
    background-color: #243B53;
    color: #BCCCDC;
    padding: 30px;
    border-radius: 12px;
    border-left: 8px solid #2ecc71;
    transition: all 0.3s ease; /* Para a mudança de cor ser suave */
}

/* CLASSE DE ERRO (O JS vai ativar isso) */
.server-error {
    background-color: #7f1d1d !important; /* Vermelho intenso */
    border-left-color: #ff4d4d !important;
}

.server-error #server-state {
    color: #ff4d4d !important;
    animation: pulsar-alerta 0.8s infinite; /* Pulsar rápido de erro */
}

/* Animação de Alerta (Pulsar o texto e um pouco de brilho) */
@keyframes pulsar-alerta {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

textarea {
    width: 100%;
    height: 80px;
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #D9E2EC;
    font-family: inherit;
    resize: none; /* Trava o tamanho para não quebrar o layout */
    display: block;
}

textarea:focus {
    outline: none;
    border-color: #007acc;
    background-color: #f0f7ff;
}

.feedback {
    margin-top: 15px;
    font-size: 0.9rem;
    font-weight: bold;
}

button {
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #007acc;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* TELA DE INTRO */
#intro-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Fica acima de tudo */
    color: #00ff00;
    font-family: 'Courier New', monospace;
    transition: opacity 0.8s ease;
}

.intro-content { text-align: center; }

.menu-buttons button {
    display: block;
    width: 250px;
    margin: 10px auto;
    padding: 15px;
    background: transparent;
    border: 1px solid #00ff00;
    color: #00ff00;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.menu-buttons button:hover {
    background: #00ff00;
    color: #000;
    box-shadow: 0 0 15px #00ff00;
}

/* PAINEL DE CONFIGS */
#config-panel {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    z-index: 10000;
}

.hidden { display: none !important; }

/* Camada que cobre tudo quando o config abre */
#config-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Fundo escurecido */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#config-panel {
    background: white;
    padding: 30px;
    border-radius: 15px;
    min-width: 300px;
    /* Evita que o clique dentro do painel feche ele */
}

.config-footer {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.hidden { display: none !important; }

#btn-config-flutuante {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 5000; /* Abaixo do overlay, mas acima de tudo o resto */
    background: #007acc;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: 0.3s;
}

#btn-config-flutuante:hover {
    transform: scale(1.1);
    background: #005a9e;
}

/* Garante que o botão de engrenagem suma quando a tela de Intro estiver ativa */
.hidden { display: none !important; }

.credits-menu {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-small {
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: 0.3s;
}

.btn-small:hover {
    opacity: 1;
    text-shadow: 0 0 8px #00ff00;
}

/* Modal de Créditos */
#modal-creditos {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 11000;
}

.modal-content {
    background: #0a0a0a;
    border: 1px solid #00ff00;
    padding: 30px;
    text-align: center;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

.btn-close {
    margin-top: 20px;
    background: #00ff00;
    color: black;
    border: none;
    padding: 5px 15px;
    cursor: pointer;
    font-weight: bold;
}

.top-credits-bar {
    position: absolute;
    top: 30px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 50px;
    z-index: 10001;
}

.btn-top-credit {
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    opacity: 0.6;
    transition: 0.3s;
    letter-spacing: 2px;
}

.btn-top-credit:hover {
    opacity: 1;
    text-shadow: 0 0 10px #00ff00;
    transform: scale(1.1);
}

.btn-voltar-menu {
    position: absolute;
    top: -50px; /* Sobe ele um pouco para não bater no título */
    left: 0;
    background: transparent;
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 5px 10px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    transition: 0.3s;
}

.btn-voltar-menu:hover {
    background: #00ff00;
    color: black;
}

#menu-dinamico {
    position: relative; /* Para o botão de voltar se alinhar a ele */
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lista-hacker p {
    font-size: 1.2rem;
    margin: 10px 0;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

/* Botão de voltar isolado no canto da tela toda */
.btn-voltar-fixo {
    position: fixed;
    top: 25px;
    right: 35px;
    background: transparent;
    border: 1px solid #ff4d4d; /* Vermelho para dar destaque de 'saída' */
    color: #ff4d4d;
    padding: 8px 15px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    z-index: 10005;
    transition: 0.3s;
}

.btn-voltar-fixo:hover {
    background: #ff4d4d;
    color: #000;
    box-shadow: 0 0 15px #ff4d4d;
}

/* Garante que a lista fique bem centralizada e grande na tela toda */
.lista-hacker {
    margin-top: 20px;
    font-size: 1.5rem;
    letter-spacing: 3px;
}

header h1 {
    transition: all 0.5s ease; /* Faz a cor e o brilho mudarem suavemente */
    text-align: center;
    padding: 20px;
}

:root {
    --bg-color: #F0F4F8;
    --text-color: #102A43;
    --accent-color: #48BB78; /* A cor do seu destaque */
    --box-bg: #ffffff;
}

/* Agora use essas variáveis nos seus blocos */
section {
    background-color: var(--box-bg);
    color: var(--text-color);
    border-left: 5px solid var(--accent-color);
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.5s ease; /* Transição suave para tudo */
}

/* No seu CSS */
body {
    position: relative;
    overflow-x: hidden;
}

/* O "vazio" agora ganha um brilho sutil */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(white 1px, transparent 1px);
    background-size: 50px 50px; /* Grade de "pontos" */
    opacity: 0.1; /* Bem sutil pra não atrapalhar a leitura */
    pointer-events: none; /* Não atrapalha o clique do mouse */
    z-index: -1;
}

.watermark-icon {
    position: fixed;
    bottom: 50px;
    right: 50px;
    width: 200px;
    height: 200px;
    background-image: url('caminho-da-sua-imagem.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.05; /* Quase invisível */
    pointer-events: none;
    z-index: 0;
    /* Animação de flutuação */
    animation: float 5s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

#devtools-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* Fundo bem escuro pra destacar */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

.section-explanation {
    max-width: 600px;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 5px;
    line-height: 1.6;
}