
/* Scope all styles to the #otpModal ID */
#otpModal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

#otpModal .modal-content {
    background-color: #ffffff;
    margin: 15% auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    width: 90%; /* Adjusted for smaller screens */
    max-width: 400px;
    position: relative;
    text-align: center;
    animation: slideDown 0.3s ease-in-out;
}

#otpModal .close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    color: #555;
    cursor: pointer;
}

#otpModal h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.8rem;
    font-weight: bold;
}

#otpModal input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

#otpModal input:focus {
    border-color: #6a11cb;
    box-shadow: 0 0 5px rgba(106, 17, 203, 0.5);
}

#otpModal button {
    background: linear-gradient(to right, #6a11cb, #2575fc);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

#otpModal button:hover {
    background: linear-gradient(to right, #2575fc, #6a11cb);
    transform: scale(1.05);
}

#otpModal .error {
    color: #ff4d4d;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: bold;
}

#otpModal .loading {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    display: none;
    z-index: 9999;
    animation: fadeInOut 3s infinite;
}

#otpModal .loading:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 4px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Animations */
@keyframes slideDown {
    0% {
        transform: translateY(-50%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    #otpModal .modal-content {
       margin-top:50%;
	   padding: 20px;
        width: 95%;
        font-size: 0.9rem;
    }

    #otpModal h2 {
        font-size: 1.5rem;
    }

    #otpModal button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    #otpModal input {
        padding: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #otpModal h2 {
        font-size: 1.2rem;
    }

    #otpModal input {
        padding: 8px;
        font-size: 0.85rem;
    }

    #otpModal button {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}

