/* Auth Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: #ffffff;
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #000;
}

/* Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab.active {
    color: #cf0000; /* Brand Red */
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #cf0000;
}

/* Forms */
.auth-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    border-color: #cf0000;
    outline: none;
}

.auth-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #cf0000;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-form button[type="submit"]:hover {
    background-color: #a00000;
}

/* Password Requirements */
.password-requirements {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 1rem;
    text-align: left;
    padding: 0 5px;
}
.req-item {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}
.req-item.unmet {
    color: #888;
}
.req-item.unmet i {
    color: #aaa;
}
.req-item.met {
    color: #4caf50;
}
.req-item.met i::before {
    content: "\f058"; /* fa-check-circle solid */
    font-weight: 900;
}

/* Error/Success Messages */
.error-message {
    color: #d93025;
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
}

.error-message:empty {
    display: none;
}

.hint {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.5rem;
    text-align: center;
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 3000;
    animation: slideUp 0.3s ease;
}

.toast.success {
    background-color: #4caf50;
}

@keyframes slideUp {
    from { transform: translate(-50%, 20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Responsive */
@media (max-width: 480px) {
    .modal-container {
        width: 90%;
        padding: 1.5rem;
    }
}
