/* Modern Popup Design */
:root {
    --primary-color: #1a365d;
    --secondary-color: #c53030;
    --accent-color: #d69e2e;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
    --border-color: #e2e8f0;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10002;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.popup-overlay.active {
    opacity: 1;
}

.popup-content {
    background: transparent;
    padding: 0;
    width: 100%;
    max-width: 420px;
    margin: 0 20px;
    perspective: 1000px;
}

.form {
    background-color: #fff;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    position: relative;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.popup-overlay.active .form {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Decorative Top Bar */
.form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4a5568;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.popup-close:hover {
    background: #e53e3e;
    color: white;
    transform: rotate(90deg);
}

.form-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 5px;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-subtitle {
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.input-container {
    position: relative;
    margin-bottom: 20px;
}

.input-container input {
    width: 100%;
    padding: 14px 16px 14px 45px;
    /* Left padding for icon */
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1rem;
    color: #000000;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

.input-container i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    pointer-events: none;
}

.input-container input:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 54, 93, 0.1);
}

.input-container input:focus+i {
    color: var(--primary-color);
}

.input-container input::placeholder {
    color: #000000;
    font-weight: 500;
}

.submit {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--secondary-color), #9b2c2c);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(197, 48, 48, 0.3);
}

.submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(197, 48, 48, 0.4);
}

.submit:active {
    transform: translateY(0);
}

/* Subtle pattern on background */
.form::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background-image: radial-gradient(circle, var(--accent-color) 1px, transparent 1px);
    background-size: 15px 15px;
    opacity: 0.1;
    border-radius: 0 0 0 100%;
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 480px) {
    .form {
        padding: 30px 20px;
    }

    .form-title {
        font-size: 1.4rem;
    }
}

/* Success Modal Styles */
.success-modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-overlay.active .success-modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Tick Animation */
.checkmark-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e6ffFA;
}

.checkmark {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #38b2ac;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #38b2ac;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #38b2ac;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {

    0%,
    100% {
        transform: none;
    }

    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #e6ffFA;
    }
}

.success-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.success-message {
    color: #718096;
    margin-bottom: 25px;
    line-height: 1.5;
}

.success-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.success-btn:hover {
    background: #102a4e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}