/* WATCH DOGS 2: DEDSEC SCREEN HIJACK */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
    --dedsec-cyan: #00f0ff;
    --dedsec-magenta: #ff0055;
    --dedsec-yellow: #fcee0a;
    --dedsec-black: #0a0a0a;
    --dedsec-white: #f0f0f0;
}

#hack-terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--dedsec-black);
    z-index: 999999;
    font-family: 'Share Tech Mono', monospace;
    overflow: hidden;
    /* cursor: none; Removido para acessibilidade */
}

/* Fundo Dazzle (Padrão Geométrico DedSec) */
.dedsec-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(45deg, #1a1a1a 25%, transparent 25%), 
        linear-gradient(-45deg, #1a1a1a 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #1a1a1a 75%), 
        linear-gradient(-45deg, transparent 75%, #1a1a1a 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.2;
    animation: bg-scroll 20s linear infinite;
    z-index: 0;
}

@keyframes bg-scroll {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Container Central */
.dedsec-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
    width: 100%;
    pointer-events: none;
}

/* ASCII Skull com Glitch */
.dedsec-ascii {
    font-size: 6px; /* Reduzido ainda mais para a arte grande */
    line-height: 5px;
    white-space: pre;
    color: var(--dedsec-white);
    font-weight: bold;
    text-shadow: 2px 0 var(--dedsec-magenta), -2px 0 var(--dedsec-cyan);
    animation: glitch-anim 0.3s infinite;
    margin: 0 auto 20px auto;
    width: 90vw; /* Largura dinâmica */
    max-width: 1000px; /* Limite máximo */
    height: 350px; /* Altura fixa */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Mantém hidden, mas o conteúdo caberá */
    transform: scale(0.7); /* Escala reduzida para garantir ajuste */
    transform-origin: center;
}

/* Texto Principal Gigante */
.dedsec-title {
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--dedsec-cyan);
    position: relative;
    display: inline-block;
}

.dedsec-title::before, .dedsec-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dedsec-black);
}

.dedsec-title::before {
    left: 2px;
    text-shadow: -1px 0 var(--dedsec-magenta);
    clip-path: inset(44% 0 61% 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.dedsec-title::after {
    left: -2px;
    text-shadow: -1px 0 var(--dedsec-yellow);
    clip-path: inset(50% 0 30% 0);
    animation: glitch-anim-2 2.5s infinite linear alternate-reverse;
}

/* Progress Bar Brutal */
.dedsec-bar-box {
    width: 60%;
    max-width: 600px;
    height: 40px;
    border: 3px solid var(--dedsec-white);
    margin: 20px auto;
    position: relative;
    background: rgba(0,0,0,0.8);
}

.dedsec-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--dedsec-magenta);
    box-shadow: 0 0 20px var(--dedsec-magenta);
    position: relative;
}

.dedsec-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 5px;
    background: var(--dedsec-white);
    box-shadow: 0 0 10px white;
}

/* Logs Caóticos */
.dedsec-logs-float {
    position: absolute;
    color: var(--dedsec-yellow);
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    background: #000;
    padding: 5px 10px;
    border: 1px solid var(--dedsec-yellow);
    z-index: 50;
    box-shadow: 5px 5px 0 var(--dedsec-cyan);
}

/* Popups Aleatórios (Eyes, Warnings) */
.dedsec-popup {
    position: absolute;
    border: 2px solid var(--dedsec-cyan);
    background: var(--dedsec-black);
    padding: 10px;
    color: var(--dedsec-white);
    z-index: 40;
    max-width: 300px;
    animation: popup-scale 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.dedsec-popup i {
    font-size: 3rem;
    color: var(--dedsec-magenta);
    display: block;
    text-align: center;
    margin-bottom: 10px;
}

/* Modal de Resultado (Sobreposto ao Caos) */
.dedsec-result-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

.dedsec-result-modal.active {
    transform: translate(-50%, -50%) scale(1);
}

.dedsec-result-title {
    font-size: 6rem;
    text-transform: uppercase;
    font-weight: 900;
    margin: 0;
    line-height: 1;
}

.result-success { color: #00ff00; text-shadow: 0 0 20px #00ff00; }
.result-fail { color: var(--dedsec-magenta); text-shadow: 0 0 20px var(--dedsec-magenta); }

.dedsec-btn {
    margin-top: 50px;
    background: transparent;
    border: 3px solid currentColor;
    color: var(--dedsec-white);
    font-size: 2rem;
    padding: 20px 60px;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.2s;
    box-shadow: 10px 10px 0 var(--dedsec-cyan);
}

.dedsec-btn:hover {
    background: var(--dedsec-white);
    color: var(--dedsec-black);
    box-shadow: 0 0 30px var(--dedsec-white);
}

/* Keyframes de Glitch */
@keyframes glitch-anim {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(80% 0 0 0); }
    20% { clip-path: inset(10% 0 60% 0); }
    40% { clip-path: inset(40% 0 40% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    100% { clip-path: inset(10% 0 80% 0); }
}

@keyframes popup-scale {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.shake-screen {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both infinite;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}