@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
    --primary: #c9121b;
    --secondary: #00ff8c;
    --accent: #ff00ff;
    --dark: #111111;
    --light: #ffffff;
    --terminal-bg: rgba(10, 10, 10, 0.9);
    --line-height: 1.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Share Tech Mono', monospace;
}

body {
    background-color: var(--dark);
    color: var(--light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding: 20px;
    overflow: hidden;
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(10, 10, 10, 0.8) 100%);
    z-index: -1;
}

body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px
        );
    pointer-events: none;
    z-index: 1;
    animation: scanlines 8s linear infinite;
}

.container {
    width: 100%;
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.terminal {
    background-color: var(--terminal-bg);
    border-radius: 6px;
    box-shadow: 0 0 30px rgba(201, 18, 27, 0.3), 0 0 50px rgba(0, 255, 140, 0.1);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-header {
    background-color: rgba(30, 30, 30, 0.8);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-title {
    font-size: 0.9rem;
    opacity: 0.8;
}

.terminal-controls {
    display: none;
}

.terminal-body {
    padding: 15px;
    position: relative;
    color: #ddd;
    font-size: 0.95rem;
}

.line {
    margin-bottom: var(--line-height);
    position: relative;
    opacity: 0;
    transform: translateY(10px);
    animation: fade-in 0.3s ease forwards;
}

.line::before {
    content: "> ";
    color: var(--secondary);
    opacity: 0.8;
}

.typing-effect {
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid transparent;
    animation: 
        fade-in 0.3s ease forwards, 
        typing 2s steps(30) 0.5s forwards,
        blink-caret 0.5s step-end infinite alternate;
}

.delay-1 {
    animation-delay: 1s;
}

.delay-2 {
    animation-delay: 2s;
}

.delay-3 {
    animation-delay: 3s;
}

.delay-4 {
    animation-delay: 5s;
}

.highlight {
    color: var(--secondary);
    text-shadow: 0 0 5px var(--secondary);
}

.title {
    font-size: 3.5rem;
    font-weight: bold;
    line-height: 1.2;
    margin: 1.5rem 0;
    text-align: center;
}

.word-em, .word-construcao {
    display: inline-block;
    position: relative;
    opacity: 0;
}

.word-em {
    color: var(--light);
    animation: 
        glitch-in 1s forwards 3.5s,
        glitch-loop 4s infinite 4.5s;
}

.word-construcao {
    color: var(--primary);
    margin-left: 15px;
    text-shadow: 0 0 5px var(--primary);
    animation: 
        glitch-in 1s forwards 3.8s,
        glitch-loop 3s infinite 4.5s;
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--accent);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--secondary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
    animation-delay: 0.1s;
}

.cursor {
    animation: blink 1s infinite;
}

.blink {
    animation: 
        fade-in 0.3s ease forwards,
        blink-text 1.5s infinite;
}

@keyframes fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--secondary) }
}

@keyframes glitch-in {
    0% {
        transform: translateX(-20px);
        opacity: 0;
    }
    60% {
        transform: translateX(5px);
        opacity: 0.5;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes glitch-loop {
    0% {
        transform: skew(0);
    }
    20% {
        transform: skew(0);
    }
    21% {
        transform: skew(3deg);
    }
    22% {
        transform: skew(0);
    }
    90% {
        transform: skew(0);
    }
    91% {
        transform: skew(-2deg);
    }
    92% {
        transform: skew(0);
    }
}

@keyframes glitch-anim {
    0% {
        clip: rect(15px, 9999px, 10px, 0);
    }
    5% {
        clip: rect(51px, 9999px, 95px, 0);
    }
    10% {
        clip: rect(26px, 9999px, 39px, 0);
    }
    15% {
        clip: rect(8px, 9999px, 12px, 0);
    }
    20% {
        clip: rect(32px, 9999px, 54px, 0);
    }
    25% {
        clip: rect(22px, 9999px, 80px, 0);
    }
    30% {
        clip: rect(60px, 9999px, 26px, 0);
    }
    100% {
        clip: rect(60px, 9999px, 26px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(54px, 9999px, 41px, 0);
    }
    5% {
        clip: rect(6px, 9999px, 44px, 0);
    }
    10% {
        clip: rect(67px, 9999px, 29px, 0);
    }
    15% {
        clip: rect(33px, 9999px, 69px, 0);
    }
    20% {
        clip: rect(8px, 9999px, 24px, 0);
    }
    25% {
        clip: rect(20px, 9999px, 65px, 0);
    }
    30% {
        clip: rect(85px, 9999px, 10px, 0);
    }
    100% {
        clip: rect(85px, 9999px, 10px, 0);
    }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes blink-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes scanlines {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 100%;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .terminal-body {
        font-size: 0.9rem;
    }
    
    .word-construcao {
        margin-left: 8px;
    }
}