/* Login Modal Styles */
.login-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Higher than other elements */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    animation: fadeIn 0.3s ease-out;
}

.login-modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* 10% from the top and centered */
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 450px; /* Max width for the modal */
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    position: relative;
    animation: slideInTop 0.4s ease-out;
}

.login-close-button {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    transition: color 0.2s ease;
}

.login-close-button:hover,
.login-close-button:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.login-modal h2 {
    text-align: center;
    color: #dc2626;
    margin-bottom: 25px;
    font-size: 28px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.login-form button[type="submit"] {
    width: 100%;
    background-color: #dc2626;
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.login-form button[type="submit"]:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
}

.login-form button[type="submit"]:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.login-message {
    text-align: center;
    margin-top: 20px;
    padding: 12px;
    border-radius: 6px;
    font-size: 15px;
}

.login-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.login-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInTop {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .login-modal-content {
        margin: 5% auto; /* Adjust margin for smaller screens */
        width: 95%;
    }
    .login-modal h2 {
        font-size: 24px;
    }
    .login-form input,
    .login-form button {
        font-size: 15px;
        padding: 10px 15px;
    }
}