* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1a1d23;
    font-family: 'Courier New', monospace;
}

.hud-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hud-layer {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.hud2 {
    width: 80%; height: 80%;
    z-index: 5;
    transition: transform 0.6s cubic-bezier(0.3, 0.85, 0.4, 1), filter 0.6s ease;
    transform: translate(-50%, -50%) rotate(0deg);
    filter: drop-shadow(0 0 15px rgba(138, 154, 176, 0.2));
}

.hud2 img {
    width: 100%; height: 100%;
    object-fit: contain;
    filter: brightness(0.8) sepia(1) hue-rotate(180deg) saturate(0.8);
    transition: filter 0.6s ease;
}

.hud2.glow {
    filter: drop-shadow(0 0 25px rgba(138, 154, 176, 0.5)) drop-shadow(0 0 8px rgba(138, 154, 176, 0.3));
}

.hud2.glow img {
    filter: brightness(0.9) sepia(1) hue-rotate(180deg) saturate(1);
}

.hud2.anim-enabled {
    animation: servoPulse 4s ease-in-out infinite;
}

@keyframes servoPulse {
    0%   { filter: drop-shadow(0 0 15px #8a9ab0); }
    50%  { filter: drop-shadow(0 0 25px #8a9ab0); }
    100% { filter: drop-shadow(0 0 15px #8a9ab0); }
}

.hud2.wiggle {
    animation: servoWiggle 0.6s ease-in-out;
}

@keyframes servoWiggle {
    0%   { transform: translate(-50%, -50%) rotate(0deg); }
    25%  { transform: translate(-50%, -50%) rotate(-8deg); }
    50%  { transform: translate(-50%, -50%) rotate(6deg); }
    75%  { transform: translate(-50%, -50%) rotate(-4deg); }
    100% { transform: translate(-50%, -50%) rotate(0deg); }
}

.hud2.error-state {
    filter: drop-shadow(0 0 30px rgba(255, 60, 60, 0.9)) drop-shadow(0 0 10px rgba(255, 0, 0, 0.6)) !important;
    animation: none !important;
}

.hud2.error-state img {
    filter: brightness(0.9) sepia(1) hue-rotate(300deg) saturate(2.5) !important;
}

.login-form.error-state input {
    border-color: #e54b4b !important;
    box-shadow: 0 0 14px rgba(229, 75, 75, 0.6), 0 0 6px rgba(229, 75, 75, 0.3) !important;
}

.error-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    background: rgba(180, 30, 30, 0.07);
    font-family: 'Courier New', monospace;
    font-size: 22px;
    letter-spacing: 4px;
    color: #ff4444;
    text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
    transition: opacity 0.4s ease;
}

.error-overlay.visible { opacity: 1; }

.login-form {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.toggle-animation {
    font-size: 11px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    letter-spacing: 1px;
    margin-bottom: 8px;
    user-select: none;
    transition: opacity 0.2s;
    color: #8a9ab0;
}

.toggle-animation:hover { opacity: 0.8; }
.toggle-animation .action.disable { color: #e54b4b; }
.toggle-animation .action.enable  { color: #4bc87a; }

.login-form input {
    padding: 9px 15px;
    background: rgba(26, 29, 35, 0.9);
    border: 1.5px solid #c9d6e3;
    color: #c9d6e3;
    font-size: 14px;
    outline: none;
    width: 150px;
    font-family: 'Courier New', monospace;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    transition: all 0.2s;
}

.login-form input::placeholder { color: #5a6575; }

.login-form input:focus {
    border-color: #8a9ab0;
    box-shadow: 0 0 12px rgba(138, 154, 176, 0.4), 0 0 8px rgba(138, 154, 176, 0.2);
    background: rgba(26, 29, 35, 1);
}

.hidden { display: none !important; }

#pw-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.pw-container { position: relative; }

.toggle-visibility {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #c9d6e3;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toggle-visibility:hover { opacity: 1; }

.bottom-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 260px;
    gap: 24px;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #c9d6e3;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remember-row:hover {
    color: #ffffff;
    text-shadow: 0 0 8px #8a9ab0, 0 0 12px #8a9ab0;
}

.remember-row input {
    width: 14px; height: 14px;
    padding: 0; margin: 0;
    background: transparent;
    border: 1px solid #c9d6e3;
    cursor: pointer;
    accent-color: #8a9ab0;
}

.remember-row label { cursor: pointer; white-space: nowrap; }

.login-btn {
    background: transparent;
    border: none;
    color: #c9d6e3;
    padding: 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-btn:hover {
    color: #ffffff;
    text-shadow: 0 0 8px #8a9ab0, 0 0 12px #8a9ab0;
    transform: scale(1.02);
}
.login-btn:active {
    transform: scale(0.98);
    text-shadow: 0 0 16px #c9d6e3, 0 0 20px #8a9ab0;
}
