.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    width: 500px;
    height: auto;
    display: none;
    background-color: #001f3f;
    color: #ffffff;
    border-radius: 15px;
    text-align: right;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 3;
}

.popup.active {
    display: block;
}

.popup h3 {
    color: #ffff;
    margin: 20px auto;
    justify-content: center;
    text-align: center;
    font-size: 30x;
    font-weight: bold;
    text-shadow: #f4f4f4;
}

.popup label,
.popup .switch a,
.popup .timer,
.popup .resend {
    color: #ffffff;
}

.popup .error-message {
    color: red;
    font-size: 15px;
    margin-bottom: 10px;
    display: none;
}

.popup input {
    width: 100%;
    padding: 10px 20px;
    margin: 10px 0 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    color: gray;

}

.verification-inputs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
    direction: ltr;
}

.verification-inputs input {
    width: 80px;
    height: 80px;
    text-align: center;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;

}

.popup button {
    width: 100%;
    padding: 10px 20px;
    background-color: #407995;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    font-weight: 500;
    letter-spacing: 0.5px;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.popup button:hover {
    background-color: #00509e;
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.popup button:active {
    transform: translateY(0) translateZ(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    filter: brightness(0.95);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.popup button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none translateZ(0);
    box-shadow: none;
    pointer-events: none;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.popup button.loading {
    background-color: #00509e;
    cursor: not-allowed;
    transform: scale(0.98) translateZ(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    background-image: linear-gradient(45deg, #00509e 25%, transparent 25%, transparent 50%, #00509e 50%, #00509e 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    animation: loading-shimmer 2s linear infinite, loading-glow 3s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(1px);
    position: relative;
    overflow: hidden;
    mix-blend-mode: multiply;
    will-change: transform, background-position;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
    perspective: 1000px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

@keyframes loading-shimmer {
    0% { background-position: 0 0; }
    100% { background-position: 40px 0; }
}

@keyframes loading-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.6); }
}

.popup button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    mix-blend-mode: screen;
    will-change: transform;
    animation: spin 1s linear infinite, loading-glow 2s ease-in-out infinite, bounce 2.5s ease-in-out infinite;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

@keyframes fadeInOut {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.popup button.loading span {
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.popup button .loading-text {
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    font-weight: 500;
    z-index: 2;
    transform: translate(-50%, -50%) translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.popup button.loading .loading-text {
    opacity: 1;
    animation: pulse 2s infinite;
    z-index: 2;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
    font-size: 14px;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    mix-blend-mode: screen;
    will-change: opacity;
    animation: pulse 2s infinite, loading-glow 2.5s ease-in-out infinite, bounce 3s ease-in-out infinite;
    transform: translate(-50%, -50%) translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-2px); }
    60% { transform: translateY(-1px); }
}

.popup button span {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    z-index: 1;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.popup .switch {
    text-align: center;
    margin-top: 10px;
}

.popup .switch a {
    color: #407995;
    cursor: pointer;
    text-decoration: underline;
}

.popup .timer {
    text-align: center;
    margin: 10px 0;
}

.popup .resend {
    display: none;
    color: #ffffff;
    text-align: center;
    cursor: pointer;
    margin: 20px 0;
}

label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
    color: #333;
}

.label-hidden {
    display: none;
}

.close-btnn {
    position: absolute;
    top: 10px;
    left: 30px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .popup {
        width: 80%;
        padding: 15px;
    }

    .popup h3 {
        font-size: 24px;
    }

    .popup input {
        font-size: 14px;
    }

    .verification-inputs input {
        width: 60px;
        height: 60px;
        font-size: 14px;
    }

    .popup button {
        font-size: 14px;
    }

    .popup .switch a,
    .popup .timer,
    .popup .resend {
        font-size: 14px;
    }

    .close-btnn {
        font-size: 24px;
        left: 15px;
    }
}

@media (max-width: 480px) {
    .popup {
        width: 90%;
        padding: 10px;
    }

    .popup h3 {
        font-size: 20px;
    }

    .popup input {
        font-size: 12px;
    }

    .verification-inputs input {
        width: 50px;
        height: 50px;
        font-size: 12px;
    }

    .popup button {
        font-size: 12px;
    }

    .popup .switch a,
    .popup .timer,
    .popup .resend {
        font-size: 12px;
    }

    .close-btnn {
        font-size: 22px;
        left: 10px;
    }
}

.popup-overlay {
    display: none;
    position: fixed;
    margin: 0auto;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 40px 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.popup-header h2 {
    margin: 0 auto;
    font-size: 24px;
    color: #1d1a1a;
}

.popup-header .close-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #333;
    left: 10px;
    font-weight: 600;
}

.popup-content .content-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.popup-content .content-item {
    flex: 1;
    text-align: center;
}

.popup-content .content-item img {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
    border: 1px solid gray;
}

.popup-content .content-item h3 {
    margin: 0;
    color: #407995;
    font-size: 18px;
    margin-bottom: 10px;
}

.popup-content .content-item p {
    margin: 5px 0 0;
    font-size: 16px;
    color: #555;
}

@media (max-width: 480px) {
    .popup-content {
        width: 90%;
        max-width: 90%;
        padding: 15px;
    }

    .popup-header h2 {
        font-size: 18px;
    }

    .popup-header .close-btn {
        font-size: 18px;
    }

    .popup-content .content-container {
        flex-direction: column;
        gap: 10px;
    }

    .popup-content .content-item img {
        max-width: 120px;
    }

    .popup-content .content-item h3 {
        font-size: 14px;
    }

    .popup-content .content-item p {
        font-size: 12px;
    }
}