*{
    font-family: 'Courier New', Courier, monospace;
    padding: 0px;
    margin: 0px;
    box-sizing: border-box;  
    user-select: none; 
}

button{
    color: #ffffff;
    border:dashed 2px #969696;
    border-left: solid 1px;
    border-right: solid 1px;
    position: relative;
    padding: 8px 10px;
    background-color: transparent;
    font-size: 14px;
    font-weight: 900;
    box-shadow:
        0 0 6px rgba(255,255,255,0.10),
        inset 0 0 4px rgba(255,255,255,0.08);
}


button:not(:disabled) {
    cursor: pointer;
}
button:disabled {
    opacity: 0.3;
    cursor: default;
    border-style: dotted;
}

button:not(:disabled):hover {
    background: #9e9e9e;
    border-color: #ffffff;
    border-style: solid;
    color: black;
}


body {
    background-color: #040404;
    color: #ffffff;
    height: 100vh;
    width: 100vw;
    display: grid;
    place-items: center;
    grid-template-columns: auto;
    grid-template-rows: min-content auto 150px;
    position: relative;
    overflow: hidden;
    text-shadow:
        0 0 2px rgba(255,255,255,0.16),
        0 0 6px rgba(255,255,255,0.08);
    animation: degauss 0.9s ease-out 1, crt-warp 4s ease-in-out infinite;
    animation-delay: 0s, 0.9s;
    transform-origin: center center;
}

/* CRT filter layers are defined after body::after */

body::after{
    /* Topmost CRT overlay: scanlines + vignette */
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2147483647; /* ensure above all page content */
    mix-blend-mode: normal;
    opacity: 0.6;
    background:
        /* Visible white scanlines */
        repeating-linear-gradient(
            to bottom,
            rgba(255,255,255,0.05) 0px,
            rgba(255,255,255,0.05) 2px,
            rgba(0,0,0,0) 4px,
            rgba(0,0,0,0) 4px
        ),
        /* Secondary darker scanlines for depth */
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 4px,
            rgba(0,0,0,0.1) 4px,
            rgba(0,0,0,0.1) 5px
        ),
        /* Vignette effect */
        radial-gradient(ellipse at center,
            rgba(0,0,0,0) 0%,
            rgba(0,0,0,0) 50%,
            rgba(0,0,0,0.4) 80%,
            rgba(0,0,0,1 ) 100%
        );
    animation: crt-flicker 0.15s infinite;
}

/* Chromatic aberration / RGB shift layer */
body::before{
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2147483646;
    background: 
        linear-gradient(90deg, 
            rgba(255,0,0,0.02) 0%, 
            transparent 3%, 
            transparent 97%, 
            rgba(0,255,255,0.02) 100%
        );
    animation: rgb-shift 8s ease-in-out infinite;
}

/* Subtle CRT flicker */
@keyframes crt-flicker {
    0% { opacity: 0.54; }
    5% { opacity: 0.56; }
    10% { opacity: 0.54; }
    15% { opacity: 0.57; }
    20% { opacity: 0.55; }
    50% { opacity: 0.54; }
    80% { opacity: 0.56; }
    90% { opacity: 0.54; }
    100% { opacity: 0.55; }
}

/* RGB shift animation for chromatic aberration */
@keyframes rgb-shift {
    0%, 100% { 
        transform: translateX(0); 
        opacity: 0.5;
    }
    25% { 
        transform: translateX(0.5px); 
        opacity: 0.7;
    }
    50% { 
        transform: translateX(-0.3px); 
        opacity: 0.4;
    }
    75% { 
        transform: translateX(0.4px); 
        opacity: 0.6;
    }
}

/* Horizontal distortion/warping on the whole screen */
@keyframes crt-warp {
    0%, 100% { transform: scaleX(1) skewX(0deg); }
    25% { transform: scaleX(1.001) skewX(0.02deg); }
    50% { transform: scaleX(0.999) skewX(-0.01deg); }
    75% { transform: scaleX(1.0005) skewX(0.01deg); }
}



/* MS DOS STYLE */
#header{
    min-height: 50px;
    width: 100%;
    border-bottom: 2px solid rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.2s ease-in-out 1 forwards;
    animation-delay: 0.5s;
}
#content{
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: fadeIn 0.2s ease-in-out 1 forwards;
    animation-delay: 0.6s;
}

#password_container{
    border: 3px solid rgba(255,255,255,0.85);
    padding: 20px 18px;
    width: 480px;
    max-width: 100%;
    background: rgba(0,0,0,0.9);
    box-shadow:
        0 0 18px rgba(255,255,255,0.06),
        0 0 32px rgba(255,255,255,0.04),
        inset 0 0 0 1px rgba(255,255,255,0.06);
    color: #ffffff;
    letter-spacing: 1px;
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: min-content auto;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100%;
    max-height: 350px;
    overflow: hidden;
}


.password_info{
    font-size: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
    text-align: center;
    margin-top:20px;
}

.small{
    font-size: 14px;
    margin-top: -8px;
    margin-bottom: 12px;
    text-transform: uppercase;
    text-align: center;
    color:#c2c2c2aa;
}

#password_inputs{
    display: grid;
    gap: 8px;
    justify-self: flex-end;
    align-items: center;
    justify-content: center;
    width: 100%;
    grid-template-columns: auto 50px;
}

#file_password{
    background: black;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.7);
    padding: 8px 10px;
    font-size: 15px;
    outline: none;
    flex: 1;
    width: 100%;
    height: 100%;
    box-shadow:
        0 0 6px rgba(255,255,255,0.10),
        inset 0 0 4px rgba(255,255,255,0.08);
    caret-color: transparent; /* hide native caret so only custom caret shows */
}
#submit_password{
    grid-column: span 2;
    margin-top: 18px;
    height: 100%;
}

input[type="password"]:focus{
    box-shadow:
        0 0 10px rgba(255,255,255,0.14),
        inset 0 0 6px rgba(255,255,255,0.12);
}



@media (max-width:520px){
    #password_container{ width: 100%; padding: 16px; }
    #password_info{ font-size: 14px }
}

/* PROGRESS BAR */



#progress_bar{
    width: 100%;
    height: 40px;
    border-top: 2px solid rgba(255,255,255,0.7);
    background: black;
    justify-self: baseline;
    box-shadow:
        0 0 10px rgba(255,255,255,0.10),
        inset 0 0 6px rgba(255,255,255,0.10);
}

/* MS-DOS style blinking underscore caret inside inputs */
.msdos-caret{
    position: absolute;
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    transform: translateY(0);
    animation: msdos-blink 1s steps(1) infinite;
    text-shadow: 0 0 4px rgba(255,255,255,0.08);
}
button{
    text-transform: uppercase;
    height: 100%;
}

.red{
    color: #ff4c4c !important;
}
.green{
    color: #4cff4c !important;
}

@keyframes msdos-blink{
    0% { opacity: 1 }
    50% { opacity: 0 }
    100% { opacity: 1 }
}

@keyframes fadeIn {
    0% { opacity: 0 }
    100% { opacity: 1 }
}

@keyframes degauss {
    0% {
        transform: scale(10) rotate(5.5deg);
        filter: saturate(0.2) brightness(2) contrast(1.8);
    }
    18% {
        transform: scale(10) rotate(0.25deg);
        filter: saturate(1.7) brightness(1.35) contrast(1.2);
    }
    36% {
        transform: scale(1.10) rotate(0.5deg);
        filter: saturate(0.1) brightness(2.3) contrast(1.9);
    }
    58% {
        transform: scale(1.0) rotate(-0.15deg);
        filter: saturate(1.4) brightness(1.15) contrast(1.1);
    }
    78% {
        transform: scale(1.02) rotate(0deg);
        filter: saturate(1.05) brightness(1.02) contrast(1.02);
    }
    100% {
        transform: scale(1) rotate(0deg);
        filter: none;
    }
}