@keyframes flicker {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary);
    }
    50% {
        opacity: 0.8;
        text-shadow: 0 0 5px var(--primary), 0 0 8px var(--primary);
    }
}

@keyframes scanline {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(100%);
    }
}

body.dark {
    --background: #0a0e01;
    --on-background: #4da6ff;
    --surface: #1a2332;
    --on-surface: #4da6ff;
    --primary: #4da6ff;
    --on-primary: #0a0e1a;
    --primary-container: #002244;
    --on-primary-container: #4da6ff;
    --secondary: #4da6ff;
    --on-secondary: #0a0e1a;
    --secondary-container: #002244;
    --on-secondary-container: #4da6ff;
    --error: #ff0000;
    --on-error: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--background);
    color: var(--on-background);
    overflow: auto;
}

.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0) 100%);
    animation: scanline 10s linear infinite;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    border: 1px solid var(--primary);
    box-shadow: 0 0 15px var(--primary);
    border-radius: 16px;
    background-color: var(--surface);
    z-index: 1;
    position: relative;
}

h1.glitch {
    color: var(--primary);
    text-align: center;
    font-size: 3rem;
    animation: flicker 1.5s infinite;
    position: relative;
}

h1.glitch::before,
h1.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--surface);
    overflow: hidden;
}

h1.glitch::before {
    left: 2px;
    text-shadow: -2px 0 red;
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

h1.glitch::after {
    left: -2px;
    text-shadow: -2px 0 blue;
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(10% 0 80% 0); }
    20% { clip-path: inset(50% 0 30% 0); }
    40% { clip-path: inset(20% 0 70% 0); }
    60% { clip-path: inset(60% 0 20% 0); }
    80% { clip-path: inset(30% 0 50% 0); }
    100% { clip-path: inset(70% 0 10% 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(85% 0 5% 0); }
    20% { clip-path: inset(40% 0 55% 0); }
    40% { clip-path: inset(75% 0 15% 0); }
    60% { clip-path: inset(25% 0 65% 0); }
    80% { clip-path: inset(55% 0 35% 0); }
    100% { clip-path: inset(90% 0 2% 0); }
}


.text-field-container {
    margin: 20px 0;
}

.text-field {
    width: 100%;
    height: 150px;
    padding: 10px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    background: var(--background);
    color: var(--on-surface);
    resize: none;
}

.button-container {
    text-align: center;
    margin-bottom: 20px;
}

.filled-button {
    color: #4da6ff;
    border-radius: 28px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    background-color: #0a0e1a;
}

.filled-button:hover {
    box-shadow: 0 0 10px var(--primary);
    transform: translateY(-2px);
}

.card {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    display: none;
    border: 1px solid;
    background-color: var(--surface);
}

.threat {
    border-color: #4da6ff;
    color: #4da6ff;
    box-shadow: 0 0 10px #4da6ff;
    background-color: #0a0e1a;
}

.safe {
    border-color: #4da6ff;
    color: #4da6ff;
    box-shadow: 0 0 10px #4da6ff;
    background-color: #0a0e1a;
}

.error {
    border-color: #ffff00;
    color: #ffff00;
    box-shadow: 0 0 10px #ffff00;
}

.threat-row {
    background-color: rgba(255, 0, 0, 0.15) !important;
}
