/* --- General Styles --- */
:root {
    --primary-color: rgb(255, 0, 0); /* Hacker-style red */
    --background-color: #0a0a0a;
    --dark-color: #050505;
    --glow-color: rgba(255, 0, 8, 0.5);
    --glow-color-light: rgba(255, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--background-color);
    color: var(--primary-color);
    font-family: 'Source Code Pro', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-shadow: 0 0 5px var(--glow-color);
    overflow: hidden;
}

/* --- Scanline Effect (CRT) --- */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    z-index: 2;
    pointer-events: none;
    animation: scan 10s linear infinite;
}

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

/* --- Main Container --- */
.container {
    text-align: center;
    padding: 20px;
    z-index: 1;
}

h1 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.flicker {
    animation: flicker 3s linear infinite;
}

@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow:
            0 0 4px var(--primary-color),
            0 0 11px var(--primary-color),
            0 0 19px var(--primary-color),
            0 0 40px var(--glow-color),
            0 0 80px var(--glow-color),
            0 0 90px var(--glow-color);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

p {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

/* --- Encrypted Text Box --- */
#encrypted-box {
    border: 2px solid var(--primary-color);
    padding: 20px 30px;
    background-color: var(--dark-color);
    box-shadow: 0 0 15px var(--glow-color-light) inset;
    margin-bottom: 2rem;
}

#encrypted-text {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    min-height: 48px;
    user-select: none;
}

#encrypted-text:hover {
    background-color: var(--glow-color-light);
    color: #fff;
}

#encrypted-text.decrypted {
    color: #fff;
    text-shadow: 0 0 10px #fff, 0 0 20px var(--primary-color);
    cursor: default;
}

/* --- Footer --- */
.footer {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
}

.footer p {
    font-size: 0.8rem;
    opacity: 0.5;
    letter-spacing: 2px;
}

/* --- General Input/Button Styles --- */
.button-link {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--primary-color);
    background-color: var(--dark-color);
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.2s ease-in-out;
}

.button-link:hover {
    background-color: var(--glow-color-light);
    color: #fff;
    text-shadow: 0 0 5px #fff;
}

.input-area input {
    background-color: var(--dark-color);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px;
    font-family: 'Source Code Pro', monospace;
    text-align: center;
    font-size: 1.2rem;
    margin-right: 10px;
}

.input-area button {
    padding: 10px 20px;
    border: 1px solid var(--primary-color);
    background-color: var(--dark-color);
    color: var(--primary-color);
    font-family: 'Source Code Pro', monospace;
    cursor: pointer;
    text-transform: uppercase;
}

.input-area button:hover {
    background-color: var(--glow-color-light);
    color: #fff;
}