* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    background:
        radial-gradient(circle at center, #101812 0%, #050706 60%, #000 100%);

    color: #b8ffc9;

    font-family: "Courier New", monospace;

    overflow: hidden;
}

.noise {
    position: fixed;
    inset: 0;

    pointer-events: none;

    opacity: 0.035;

    background-image:
        repeating-radial-gradient(
            circle at 20% 30%,
            white 0,
            transparent 1px,
            transparent 3px
        );

    animation: noiseMove 0.15s infinite;
}

.scanlines {
    position: fixed;
    inset: 0;

    pointer-events: none;

    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255,255,255,0.025) 0px,
            rgba(255,255,255,0.025) 1px,
            transparent 2px,
            transparent 4px
        );
}

.terminal {
    width: 90%;
    max-width: 850px;

    background: rgba(2, 8, 4, 0.96);

    border: 1px solid #1c5e31;

    box-shadow:
        0 0 30px rgba(0, 255, 90, 0.08),
        inset 0 0 40px rgba(0, 255, 90, 0.025);

    padding: 35px 40px;

    position: relative;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    padding-bottom: 20px;

    border-bottom: 1px solid #173d23;
}

.logo {
    color: #53ff7e;

    font-size: 25px;
    font-weight: bold;

    letter-spacing: 6px;

    text-shadow: 0 0 10px rgba(83,255,126,.45);
}

.archive {
    color: #477d55;

    font-size: 11px;

    letter-spacing: 2px;
}

.status-line {
    display: flex;
    justify-content: space-between;

    margin-top: 12px;

    color: #315b3c;

    font-size: 10px;

    letter-spacing: 2px;
}

.status {
    color: #46c765;
}

#puzzle,
#complete {
    padding: 55px 0 40px;
}

.classification {
    display: inline-block;

    border: 1px solid #315f3e;

    color: #60996e;

    padding: 6px 10px;

    font-size: 10px;

    letter-spacing: 3px;

    margin-bottom: 25px;
}

.difficulty {
    color: #53ff7e;

    font-size: 13px;
    font-weight: bold;

    letter-spacing: 5px;

    margin-bottom: 10px;
}

.stage {
    color: #315b3c;

    font-size: 11px;

    letter-spacing: 3px;

    margin-bottom: 25px;
}

h1 {
    color: #d2ffdc;

    font-size: 25px;
    font-weight: normal;

    line-height: 1.65;

    margin: 0 0 35px;

    text-shadow: 0 0 8px rgba(100,255,130,.15);
}

form {
    display: flex;
    gap: 12px;
}

.input-wrapper {
    flex: 1;

    display: flex;
    align-items: center;

    background: #010402;

    border: 1px solid #24482d;
}

.prompt {
    padding-left: 15px;

    color: #53ff7e;

    font-weight: bold;
}

input {
    width: 100%;

    background: transparent;

    border: 0;
    outline: 0;

    color: #8dffa9;

    padding: 16px 12px;

    font-family: inherit;
    font-size: 15px;

    text-transform: none;
}

input::placeholder {
    color: #284d32;
}

.input-wrapper:focus-within {
    border-color: #53ff7e;

    box-shadow: 0 0 12px rgba(83,255,126,.1);
}

button {
    background: transparent;

    color: #53ff7e;

    border: 1px solid #357048;

    padding: 0 22px;

    font-family: inherit;
    font-size: 11px;
    font-weight: bold;

    letter-spacing: 2px;

    cursor: pointer;
}

button:hover {
    background: #53ff7e;

    color: #020603;

    box-shadow: 0 0 15px rgba(83,255,126,.25);
}

#message {
    height: 25px;

    margin-top: 18px;

    font-size: 12px;

    letter-spacing: 2px;
}

.error {
    color: #ff4c4c;
}

.success {
    color: #53ff7e;
}

.access-granted {
    color: #53ff7e;

    font-size: 13px;

    letter-spacing: 5px;

    margin-bottom: 20px;

    animation: pulse 1.5s infinite;
}

.final-message {
    color: #63866c;

    line-height: 1.7;
}

.final-instruction {
    margin-top: 35px;

    padding: 25px;

    border: 1px solid #53ff7e;

    color: #53ff7e;

    font-size: 18px;

    line-height: 1.8;

    letter-spacing: 3px;

    text-align: center;

    box-shadow:
        0 0 20px rgba(83,255,126,.08),
        inset 0 0 20px rgba(83,255,126,.03);
}

.archive-footer {
    margin-top: 30px;

    color: #284d32;

    font-size: 10px;

    letter-spacing: 3px;
}

footer {
    border-top: 1px solid #173d23;

    padding-top: 15px;

    color: #284d32;

    font-size: 9px;

    letter-spacing: 2px;
}

.hidden {
    display: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: .45;
    }
}

@keyframes noiseMove {
    0% {
        transform: translate(0,0);
    }

    25% {
        transform: translate(1px,-1px);
    }

    50% {
        transform: translate(-1px,1px);
    }

    75% {
        transform: translate(1px,1px);
    }
}

@media (max-width: 650px) {

    .terminal {
        width: 94%;
        padding: 25px;
    }

    .archive {
        display: none;
    }

    form {
        flex-direction: column;
    }

    button {
        padding: 16px;
    }

    h1 {
        font-size: 19px;
    }
}
