/* Old-school terminal look */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: #000; /* Black background */
    color: #33ff33; /* Green text like an old CRT */
    font-family: "Courier New", Courier, monospace;
    max-width: 620px;
    margin: auto;
    padding: 32px 20px 48px;
    text-align: left;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}

body.crt-boot {
    animation: crt-warmup 1.8s ease-out forwards;
    filter: brightness(0.05) contrast(220%);
}

/* Add a CRT scanline effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translateX(-50%);
    background: 
        linear-gradient(rgba(0, 0, 0, 0) 50%, rgba(0, 255, 0, 0.05) 50%);
    background-size: 100% 4px;
    pointer-events: none;
}

body.crt-boot::after {
    content: "";
    position: fixed;
    left: 50%;
    top: 0;
    width: 100vw;
    height: 100vh;
    transform: translateX(-50%);
    background: radial-gradient(circle at center, rgba(102, 255, 102, 0.2), transparent 65%);
    opacity: 0;
    pointer-events: none;
    animation: crt-flash 1.8s ease-out forwards;
}

/* Blinking cursor effect */
@keyframes blink {
    50% { opacity: 0; }
}
.blinking-cursor::after {
    content: "_";
    animation: blink 1s infinite;
}

/* Terminal-style input fields */
label {
    display: block;
    margin-top: 16px;
}

input, select, textarea {
    background-color: #000;
    color: #33ff33;
    border: 2px solid #33ff33;
    font-family: "Courier New", Courier, monospace;
    width: 100%;
    padding: 8px 10px;
    margin-top: 6px;
    margin-bottom: 4px;
    font-size: 16px;
}

/* Remove default input styles */
input:focus, select:focus, button:focus, textarea:focus {
    outline: none;
    border-color: #66ff66;
}

/* Make buttons look like terminal commands */
button {
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    border: 2px solid #33ff33;
    background: transparent;
    padding: 10px 14px;
}

button[type="submit"] {
    width: 100%;
    margin-top: 18px;
}

button:hover {
    background-color: #33ff33;
    color: #000;
}

/* Terminal border effect */
form {
    border: 2px solid #33ff33;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.9);
    position: relative;
    margin-top: 24px;
}

/* Flashing message effect */
@keyframes flash {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}
#response-message {
    font-weight: bold;
    color: #66ff66;
    animation: flash 1s infinite;
}

/* Add a green glow to everything */
input, select, button, label, h2 {
    text-shadow: 0 0 5px #33ff33;
}

@keyframes crt-warmup {
    0% {
        filter: brightness(0.05) contrast(400%);
    }
    35% {
        filter: brightness(0.2) contrast(260%);
    }
    55% {
        filter: brightness(0.45) contrast(220%);
    }
    70% {
        filter: brightness(1.3) contrast(320%);
    }
    80% {
        filter: brightness(0.75) contrast(180%);
    }
    100% {
        filter: brightness(1) contrast(130%);
    }
}

@keyframes crt-flash {
    0% {
        opacity: 0;
    }
    40% {
        opacity: 0.4;
    }
    60% {
        opacity: 0.9;
    }
    80% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.05;
    }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    color: #66ff66;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 0.85rem;
}

.back-link:hover {
    text-decoration: underline;
}

.close-form {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 38px;
    height: 38px;
    border-radius: 0;
    border: 2px solid #33ff33;
    background: #000;
    color: #33ff33;
    font-size: 22px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-form:hover {
    background: #33ff33;
    color: #000;
}
