/* ===== HackerEdu :: Estilo da Tela de Abertura CTF Kids ===== */

:root {
    --cyber-green: #00ff66;
    --cyber-glow: rgba(0, 255, 102, 0.4);
    --cyber-cyan: #00f2fe;
    --cyber-dark: #03080e;
    --cyber-card-bg: rgba(6, 18, 12, 0.78);
    --cyber-border: rgba(0, 255, 102, 0.3);
}

body.hacker-abertura {
    background-color: var(--cyber-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: 'Fira Code', 'Courier New', monospace;
    color: #e0f9ea;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Canvas da Chuva Matrix */
#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    opacity: 0.35;
    pointer-events: none;
}

/* Imagem de Fundo Cyberpunk Suave */
.cyber-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2;
    background: 
        radial-gradient(circle at 80% 20%, rgba(0, 242, 254, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(0, 255, 102, 0.15) 0%, transparent 60%),
        linear-gradient(180deg, rgba(3, 8, 14, 0.85) 0%, rgba(3, 8, 14, 0.95) 100%),
        url('../img/banner.jpg') no-repeat center center / cover;
    pointer-events: none;
}

/* Barra Superior da Agência */
.agency-header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 30px;
    background: rgba(0, 20, 10, 0.5);
    border-bottom: 1px solid var(--cyber-border);
    backdrop-filter: blur(8px);
}

.agency-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.agency-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 0 15px var(--cyber-glow);
    border: 1px solid var(--cyber-green);
    object-fit: cover;
}

.agency-title-wrap h1 {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    text-shadow: 0 0 10px var(--cyber-glow);
}

.agency-title-wrap span {
    font-size: 0.72rem;
    color: var(--cyber-green);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-cyber-nav {
    background: rgba(0, 255, 102, 0.08);
    border: 1px solid var(--cyber-border);
    color: #a8ffd0;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.btn-cyber-nav:hover {
    background: rgba(0, 255, 102, 0.2);
    border-color: var(--cyber-green);
    color: #fff;
    box-shadow: 0 0 12px var(--cyber-glow);
    transform: translateY(-1px);
}

/* Conteúdo Principal */
.main-stage {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px 20px;
}

.agent-console-box {
    width: 100%;
    max-width: 900px;
    background: var(--cyber-card-bg);
    border: 1px solid var(--cyber-border);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 255, 102, 0.15);
    backdrop-filter: blur(14px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Barra de Abas do Terminal */
.console-tab-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 30, 15, 0.6);
    border-bottom: 1px solid var(--cyber-border);
    padding: 10px 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.tab-buttons {
    display: flex;
    gap: 8px;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #7acc9c;
    padding: 7px 15px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tab-btn.active {
    background: rgba(0, 255, 102, 0.18);
    border-color: var(--cyber-green);
    color: #00ff66;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.3);
}

.system-status {
    font-size: 0.7rem;
    color: #00ff66;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff66;
    box-shadow: 0 0 8px #00ff66;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Área do Console de Terminal */
.terminal-view {
    padding: 20px;
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.terminal-view .screen {
    background: rgba(0, 12, 5, 0.85);
    border: 1px solid rgba(0, 255, 102, 0.25);
    min-height: 380px;
}

/* Área do Card Visual de Acesso (Crachá do Agente) */
.badge-view {
    padding: 30px;
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.badge-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    align-items: center;
}

.badge-card-mockup {
    background: linear-gradient(135deg, rgba(0, 255, 102, 0.1) 0%, rgba(0, 242, 254, 0.05) 100%);
    border: 2px solid var(--cyber-border);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.badge-chip {
    width: 44px;
    height: 34px;
    background: linear-gradient(135deg, #d4af37, #f3e5ab);
    border-radius: 6px;
    margin: 0 auto 16px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
    border: 1px solid #b8860b;
}

.badge-avatar-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: 0 auto 12px;
    border: 2px solid var(--cyber-green);
    box-shadow: 0 0 20px var(--cyber-glow);
    overflow: hidden;
    background: #000;
}

.badge-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-title-agent {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.badge-subtitle-agent {
    font-size: 0.75rem;
    color: var(--cyber-green);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Formulário do Crachá */
.badge-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #8affc0;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-control-cyber {
    width: 100%;
    background: rgba(0, 10, 5, 0.8);
    border: 1px solid var(--cyber-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: #00ff66;
    font-family: inherit;
    font-size: 0.95rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
    outline: none;
    transition: all 0.25s ease;
}

.form-control-cyber:focus {
    border-color: var(--cyber-green);
    box-shadow: 0 0 15px var(--cyber-glow), inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.btn-cyber-submit {
    background: linear-gradient(135deg, #00ff66 0%, #00f2fe 100%);
    border: none;
    border-radius: 14px;
    padding: 14px;
    color: #041208;
    font-weight: 900;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.btn-cyber-submit:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px var(--cyber-glow);
}

/* Modal Explicativo CTF */
.cyber-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(2, 6, 10, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.cyber-modal.active {
    display: flex;
}

.modal-content {
    background: #06160d;
    border: 1px solid var(--cyber-green);
    border-radius: 20px;
    max-width: 650px;
    width: 100%;
    padding: 28px;
    box-shadow: 0 0 40px var(--cyber-glow);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: 1px solid var(--cyber-border);
    color: var(--cyber-green);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-weight: bold;
}

.modal-close-btn:hover {
    background: var(--cyber-green);
    color: #000;
}

/* Rodapé */
.agency-footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 16px;
    font-size: 0.72rem;
    color: #4b8062;
    border-top: 1px solid rgba(0, 255, 102, 0.1);
}

@media (max-width: 768px) {
    .agency-header { padding: 12px 16px; }
    .badge-grid { grid-template-columns: 1fr; gap: 20px; }
    .terminal-view { padding: 10px; }
    .badge-view { padding: 18px; }
}
