/* ===========================
   Authentication Modals - Futuristic Theme
=========================== */

/* Modal Backdrop */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Modal Content Container */
.modal-content {
    background: linear-gradient(135deg, rgba(7, 12, 20, 0.95) 0%, rgba(10, 20, 35, 0.95) 100%);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 12px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 0 60px rgba(0, 229, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    animation: slideUp 0.4s ease-out;
}

.modal-content.modal-success {
    max-width: 380px;
    text-align: center;
    padding: 50px 40px;
}

/* Close Button */
.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: rgba(0, 229, 255, 0.6);
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--neon-cyan);
    transform: scale(1.1) rotate(90deg);
}

/* Modal Title */
.modal-title {
    font-family: var(--font-title);
    font-size: 1.8rem;
    color: var(--neon-cyan);
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.modal-title i {
    margin-right: 12px;
    color: var(--neon-green);
}

/* Form Group */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition);
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: rgba(0, 229, 255, 0.3);
}

.form-group input:focus {
    outline: none;
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

.form-group input:valid {
    border-color: rgba(0, 255, 136, 0.3);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: rgba(255, 100, 100, 0.5);
}

/* Form Messages */
.form-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    display: none;
}

.form-message.show {
    display: block;
}

.form-message.success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--neon-green);
}

.form-message.error {
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #ff6464;
}

.form-message.loading {
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--neon-cyan);
}

/* Modal Footer */
.modal-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-footer a {
    color: var(--neon-cyan);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.modal-footer a:hover {
    color: var(--neon-green);
    text-decoration: underline;
}

/* Buttons inside Modal */
.modal-content .btn {
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

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

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 229, 255, 0.3);
    border-top: 2px solid var(--neon-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 767px) {
    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }

    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }

    .close-btn {
        right: 10px;
        top: 10px;
        font-size: 24px;
    }

    .form-group input {
        padding: 10px 14px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

@media (max-width: 575px) {
    .modal {
        padding: 10px;
    }

    .modal-content {
        padding: 25px 15px;
        max-width: 100%;
    }

    .modal-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .modal-content .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}