@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

.hn-login-wrapper {
    color: #00ff00;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(100vh - 200px);
    padding: 20px;
}

.hn-login-container {
    background-color: rgba(0, 0, 0, 0.85);
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 0 20px #00ff00;
    animation: hn-flicker 1.5s infinite alternate;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    transform: translateY(-50px);
}

.hn-login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.1), transparent);
    animation: scan 3s infinite;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes hn-flicker {
    from {
        box-shadow: 0 0 15px #00ff00;
    }
    to {
        box-shadow: 0 0 25px #00ff00, 0 0 50px #00ff00;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.hn-login-title {
    text-align: center;
    margin-bottom: 10px;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hn-login-title .material-icons {
    font-size: 28px;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 0 0 5px #00ff00; }
    to { text-shadow: 0 0 15px #00ff00, 0 0 25px #00ff00; }
}

.hn-login-subtitle {
    color: #00cc00;
    font-size: 14px;
    margin: 0;
    opacity: 0.8;
}

.login-form {
    position: relative;
    z-index: 1;
}

.hn-login-input-group {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.hn-login-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #00ff00;
    font-size: 20px;
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 0 5px #00ff00;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    line-height: 1;
    margin-top: 20px;
}

.hn-login-input-icon.material-icons {
    font-size: 20px;
    line-height: 1;
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    vertical-align: middle;
}

.hn-login-input-group:hover .hn-login-input-icon {
    color: #00cc00;
    text-shadow: 0 0 8px #00cc00;
    transform: translateY(-50%) scale(1.1) translateY(-2px);
}

.hn-login-input-group input:focus ~ .hn-login-input-icon {
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    animation: iconPulse 1s ease-in-out;
}

@keyframes iconPulse {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.2); }
}

.hn-login-label {
    display: block;
    margin-bottom: 8px;
    color: #00ff00;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 0 3px #00ff00;
}

.hn-login-input-group input[type="text"],
.hn-login-input-group input[type="password"],
.hn-login-input-group input[type="email"] {
    width: 100%;
    padding: 12px 12px 12px 45px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #00ff00;
    color: #00ff00;
    border-radius: 5px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    transform: translateY(0);
}

.hn-login-input-group:hover input,
.hn-login-input-group input:focus {
    outline: none;
    border-color: #00cc00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
}

.hn-login-input-group:hover {
    transform: translateY(-1px);
}

.hn-login-input-group input::placeholder {
    color: #00aa00;
    opacity: 0.6;
}

.hn-login-button {
    margin-top: 25px;
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #00ff00, #00cc00);
    color: #000000;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.hn-login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hn-login-button:hover::before {
    left: 100%;
}

.hn-login-button:hover {
    background: linear-gradient(45deg, #00cc00, #00ff00);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 0, 0.4);
}

.hn-login-button:active {
    transform: translateY(0);
}

.hn-login-button .material-icons {
    margin-right: 8px;
    vertical-align: middle;
    font-size: 18px;
    transition: all 0.3s ease;
}

.hn-login-button:hover .material-icons {
    transform: translateX(2px);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.hn-login-errors {
    margin-top: 20px;
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
    padding: 15px;
    border: 1px solid #ff0000;
    border-radius: 5px;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.error-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.error-header .material-icons {
    margin-right: 8px;
    font-size: 18px;
    color: #ff4444;
    text-shadow: 0 0 5px #ff0000;
    animation: errorPulse 2s ease-in-out infinite;
}

@keyframes errorPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.error-item {
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.error-item::before {
    content: '>';
    position: absolute;
    left: 0;
    color: #ff6666;
}

.hn-login-footer {
    margin-top: 30px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-links {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    text-decoration: none;
    border: 1px solid #00ff00;
    border-radius: 5px;
    font-size: 12px;
    transition: all 0.3s ease;
    font-family: 'Share Tech Mono', monospace;
}

.btn-secondary:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    color: #00cc00;
}

.btn-secondary .material-icons {
    margin-right: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-secondary:hover .material-icons {
    transform: scale(1.1);
    text-shadow: 0 0 5px #00ff00;
}

.hn-login-footer-text {
    font-size: 11px;
    color: #ff3333;
    text-shadow: 0 0 5px red;
    border-top: 1px solid rgba(255, 0, 0, 0.3);
    padding-top: 15px;
    font-style: italic;
}

@media screen and (max-width: 480px) {
    .hn-login-wrapper {
        padding: 10px;
    }
    
    .hn-login-container {
        padding: 20px;
        margin: 0 auto;
        max-width: 350px;
    }

    .hn-login-title {
        font-size: 20px;
    }

    .login-links {
        flex-direction: column;
        gap: 10px;
    }

    .btn-secondary {
        justify-content: center;
    }
}

/* Form field specific styling */
#id_username,
#id_password,
#id_email,
#id_password2,
.hn-login-input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #00ff00;
    color: #00ff00;
    border-radius: 5px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    transform: translateY(0);
}

#id_username:focus,
#id_password:focus,
.hn-login-input:focus {
    outline: none;
    border-color: #00cc00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    background: rgba(0, 0, 0, 0.9);
}

/* Field error styling */
.field-error {
    color: #ff4444;
    font-size: 12px;
    margin-top: 5px;
    padding-left: 45px;
    text-shadow: 0 0 3px #ff0000;
}

/* Error state for input fields */
.hn-login-input-group input.error {
    border-color: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.hn-login-input-group input.error:focus {
    border-color: #ff6666;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

/* Signup specific styles */
.hn-login-container.signup {
    max-width: 450px;
}

.hn-login-container.signup .hn-login-title .material-icons {
    animation: signupGlow 2s ease-in-out infinite alternate;
}

@keyframes signupGlow {
    from { text-shadow: 0 0 5px #00ff00; }
    to { text-shadow: 0 0 15px #00ff00, 0 0 25px #00ff00, 0 0 35px #00ff00; }
}

/* Email field specific icon */
.hn-login-input-group .hn-login-input-icon.material-icons[data-icon="email"] {
    color: #00aaff;
    text-shadow: 0 0 5px #00aaff;
}

.hn-login-input-group:hover .hn-login-input-icon.material-icons[data-icon="email"] {
    color: #0088cc;
    text-shadow: 0 0 8px #0088cc;
}

/* Password confirmation field specific icon */
.hn-login-input-group .hn-login-input-icon.material-icons[data-icon="lock_reset"] {
    color: #ffaa00;
    text-shadow: 0 0 5px #ffaa00;
}

.hn-login-input-group:hover .hn-login-input-icon.material-icons[data-icon="lock_reset"] {
    color: #ff8800;
    text-shadow: 0 0 8px #ff8800;
}