/* auth.css */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    padding: 2rem;
    margin-top: 3rem;
}

.auth-box {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.auth-tab.active {
    border-bottom-color: var(--accent-dark);
}

.light-mode .auth-tab {
    color: var(--text-light);
}

.light-mode .auth-tab.active {
    border-bottom-color: var(--accent-light);
}

.auth-form {
    display: none;
}

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

.auth-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-family: 'Montserrat', sans-serif;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 5px;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.light-mode .input-group input {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-light);
}

.input-group label {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    font-size: 1rem;
    color: var(--text-dark);
    pointer-events: none;
    transition: all 0.3s ease;
}

.light-mode .input-group label {
    color: var(--text-light);
}

.input-group input::placeholder {
    color: transparent;
}

.light-mode .input-group input::placeholder {
    color: transparent;
}

.input-group input:focus,
.input-group input:valid,
.input-group input:not(:placeholder-shown) {
    outline: none;
    background-color: rgba(255, 255, 255, 0.2);
}

.light-mode .input-group input:focus,
.light-mode .input-group input:valid,
.light-mode .input-group input:not(:placeholder-shown) {
    background-color: rgba(0, 0, 0, 0.1);
}

.input-group input:focus + label,
.input-group input:valid + label,
.input-group input:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.5rem;
    font-size: 0.8rem;
    background-color: var(--accent-dark);
    color: var(--bg-dark);
    padding: 0 0.5rem;
    border-radius: 3px;
}

.light-mode .input-group input:focus + label,
.light-mode .input-group input:valid + label,
.light-mode .input-group input:not(:placeholder-shown) + label {
    background-color: var(--accent-light);
    color: var(--bg-light);
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
    cursor: pointer;
}

.light-mode .toggle-password {
    color: var(--text-light);
}

.auth-submit {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    background-color: var(--accent-dark);
    color: var(--bg-dark);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.light-mode .auth-submit {
    background-color: var(--accent-light);
    color: var(--bg-light);
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.forgot-password {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.light-mode .forgot-password {
    color: var(--text-light);
}

.forgot-password:hover {
    color: var(--accent-dark);
}

.light-mode .forgot-password:hover {
    color: var(--accent-light);
}


/* Custom Alerts.  */
.custom-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    animation: slideIn 0.5s ease-out;
}

.custom-alert.success {
    background-color: #4CAF50;
}

.custom-alert.error {
    background-color: #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.forgot-password-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.popup-content {
    background-color: var(--bg-dark);
    padding:30px;
    border-radius: 5px;
    text-align: center;
}

.light-mode .popup-content {
    background-color: var(--bg-light);
}

.popup-content h3 {
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.popup-content input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.popup-content button {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

#reset-submit {
    background-color: var(--accent-dark);
    color: var(--bg-dark);
}

.light-mode #reset-submit {
    background-color: var(--accent-light);
    color: var(--bg-light);
}

#reset-cancel {
    background-color: #f44336;
    color: white;
}

.input-group input.error {
    border: 1px solid #f44336;
}




@media screen and (max-width: 480px) {
    .auth-box {
        padding: 1.5rem;
    }

    .auth-tab {
        font-size: 0.9rem;
    }

    .auth-form h2 {
        font-size: 1.5rem;
    }

    .input-group input,
    .input-group label,
    .auth-submit {
        font-size: 0.9rem;
    }
}