:root {
    --terminal_color: #00FF00;
    --alt_terminal_color: rgb(0, 0, 0); 
}

body {
    background-color: var(--alt_terminal_color);
    background-attachment: fixed;
    color: var(--terminal_color);
    font-family: "Courier New", Courier, monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 40px 20px;
    margin: 0;
    text-align: center;
    overflow-y: auto;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}


.ascii-art {
    font-size: 2vw; 
    line-height: 1.2; 
    white-space: pre; 
    color: var(--terminal_color);
    font-weight: bold;
    display: inline-block;
    margin: 0 auto;
    max-width: 100%;
}

@media screen and (min-width: 800px) {
    .ascii-art {
        font-size: 14px;
    }
}

.list {
    display: inline-grid;
    justify-items: start; 
    text-align: left;
    padding: 0;
    margin: 20px auto;
    min-width: 180px; 
    list-style-type: none;
}

.list li {
    visibility: hidden;
    margin-bottom: 20px;
    font-size: 24px;
}

a {
    color: var(--terminal_color);
    text-decoration: none;
    font-weight: bold;
    word-wrap: break-word;
    border: 1px solid transparent; 
}

a:hover {
    color: var(--alt_terminal_color) !important;
    background-color: var(--terminal_color) !important;
    border: 1px solid var(--terminal_color);
}

.terminal-text {
    font-size: 16px;
    line-height: 1.5;
}

.line-reveal {
    visibility: hidden;
}

.terminal-rule {
    width: 0%;
    height: 1px;
    background-color: var(--terminal_color);
    border: none;
    margin: 20px auto;
    transition: width 0.01s ease-in;
}

.ascii-box-wrapper {
    min-height: 90px;
    width: 100%;
    display: flex;
    justify-content: center;
}


/* Flex container framing that horizontally centers the square passcode fields */
.digit-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
}

/* Individual terminal styled numeric entry square fields */
.digit-input {
    width: 45px;
    height: 50px;
    background-color: var(--alt_terminal_color);
    border: 1px solid var(--terminal_color);
    color: var(--terminal_color);
    text-align: center;
    font-family: "Courier New", Courier, monospace;
    font-size: 16px;
    font-weight: bold;
    box-sizing: border-box;
    
    /* CRITICAL FOR ENGINE: Hides boxes natively so the class script can reveal them box-by-box */
    visibility: hidden; 
}

/* Interactive contextual accent shift when clicking inside an active field box */
.digit-input:focus {
    outline: none;
    background-color: #0A0A0A; /* Deep dark terminal background fill variant change */
}

.terminal-cursor {
    display: inline-block;
    width: 10px;               /* Force a block width */
    height: 1.2em;             /* Scales perfectly with your current text font size */
    background-color: #00FF00; /* Hardcoded green fallback color shield */
    background-color: var(--terminal_color); 
    margin-left: 6px;
    vertical-align: middle;
    visibility: hidden;        /* Keeps it hidden until the engine turns it on */
    animation: terminal-blink 1s steps(2, start) infinite;
}

@keyframes terminal-blink {
    50% { opacity: 0; }
}
/* Container aligning prompt symbol and the text field */
/* FIXED VERSION IN style.css */
.terminal-input-wrapper {
    display: flex;
    align-items: center;
    width: 100%;             /* Allow fluid scaling container bounds */
    max-width: 90%;          /* MATCHES RESPONSE: Same width restriction */
    margin: 10px auto;       /* MATCHES RESPONSE: Same identical center margins */
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    text-align: left;        /* Force left alignment parity */
    visibility: hidden; /* Start hidden until the script engine reveals it */
}

.terminal-prompt-arrow {
    color: var(--terminal_color);
    margin-right: 10px;
    font-weight: bold;
    user-select: none;
}

/* New custom class box input style sheet mappings */
.terminal-box-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--terminal_color);
    font-family: inherit;
    font-size: inherit;
    outline: none;
    padding: 0;
    caret-color: var(--terminal_color);
}

.terminal-log-output {
    text-align: left;
    max-width: 90%;
    margin: 10px auto;
    font-size: 14px;
    color: var(--terminal_color);
}

.terminal-error-pulse {
    animation: error-flash 0.2s ease-in-out 2;
}

@keyframes error-flash {
    0%, 100% { color: var(--terminal_color); }
    50% { color: #FF0000; }
}
