:root {
    color-scheme: dark;
    font-family: "Courier New", Courier, monospace;
    background: #000000;
    color: #00ff41;
    font-synthesis: none;
    --accent: #00ff41;
    --accent-glow: rgba(0, 255, 65, 0.6);
    --panel: #050a05;
    --border: #00ff41;
}

* {
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: #000000;
    color: #00ff41;
}

/* Scanline overlay across the viewport */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.04), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.04));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Subtle CRT flicker animation */
@keyframes flicker {
    0% { opacity: 0.97; }
    5% { opacity: 0.95; }
    10% { opacity: 0.99; }
    15% { opacity: 0.92; }
    20% { opacity: 0.98; }
    25% { opacity: 0.94; }
    30% { opacity: 0.97; }
    100% { opacity: 0.96; }
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 24px 16px;
    display: grid;
    place-items: center;
    animation: flicker 0.15s infinite alternate;
}

.container {
    width: min(100%, 640px);
    padding: 24px;
    border: 2px solid var(--border);
    border-radius: 0;
    background: var(--panel);
    box-shadow:
        0 0 25px rgba(0, 255, 65, 0.15),
        inset 0 0 25px rgba(0, 255, 65, 0.05);
    position: relative;
    overflow: hidden;
}

/* Scanlines on the panel */
.container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}

header {
    margin-bottom: 24px;
    text-align: left;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 12px;
    text-shadow: 0 0 8px var(--accent-glow);
}

h1 {
    margin: 0;
    font-size: clamp(24px, 6vw, 32px);
    color: var(--accent);
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--accent-glow);
}

.subtitle {
    margin: 8px 0 0;
    color: var(--accent);
    font-size: 14px;
    line-height: 1.4;
    text-shadow: 0 0 6px var(--accent-glow);
}

.module-section,
.form-section,
.output-section {
    margin-top: 24px;
}

h2 {
    margin: 0 0 12px;
    font-size: 16px;
    color: var(--accent);
    text-shadow: 0 0 6px var(--accent-glow);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 13px;
}

input[type="text"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 0;
    background: #000000;
    color: var(--accent);
    font: inherit;
    font-family: inherit;
}

input[type="text"],
select {
    min-height: 40px;
    padding: 8px 10px;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 12px var(--accent-glow);
    border-color: var(--border);
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-field label {
    margin: 0;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

button {
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: #000000;
    color: var(--accent);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover:not(:disabled) {
    background: var(--accent);
    color: #000000;
    box-shadow: 0 0 18px var(--accent-glow);
}

button:disabled,
select:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    border-color: #003300;
    color: #003300;
}

textarea {
    min-height: 140px;
    padding: 10px;
    resize: vertical;
    font-family: inherit;
}

#status {
    min-height: 1.5em;
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--accent);
    text-shadow: 0 0 6px var(--accent-glow);
}

.notice {
    margin: 24px 0 0;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    font-size: 12px;
    text-align: center;
    color: #00cc33;
}
