.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px) saturate(180%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.popup-card {
    width: 85%;
    max-width: 500px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    padding: 40px 35px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
                0 8px 24px rgba(42, 171, 238, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);

    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.popup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2AABEE 0%, #0C52F8 100%);
    border-radius: 24px 24px 0 0;
}

.popup-overlay.show .popup-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.popup-text-block {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.popup-title {
    font-size: 1.8em;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 12px;
}

.popup-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2AABEE 0%, #0C52F8 100%);
    border-radius: 2px;
}

.popup-message {
    font-size: 1.05em;
    line-height: 1.6;
    color: #4a5568;
    padding: 0 10px;
}

.popup-message a {
    color: #2AABEE;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(42, 171, 238, 0.1);
}

.popup-message a:hover {
    color: #0C52F8;
    background: rgba(42, 171, 238, 0.2);
    transform: translateY(-1px);
}

.popup-order {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1.1em;
    padding: 14px 20px;
    background: rgba(42, 171, 238, 0.08);
    border-radius: 12px;
    border-left: 4px solid #2AABEE;
    margin-top: 10px;
}

.popup-order span {
    color: #0C52F8;
    font-weight: 800;
}

.popup-pay-button {
    margin-top: 10px;
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #2AABEE 0%, #0C52F8 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none !important;
    box-shadow: 0 10px 20px rgba(42, 171, 238, 0.3),
                0 6px 6px rgba(12, 82, 248, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.popup-pay-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
    z-index: -1;
}

.popup-pay-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(42, 171, 238, 0.4),
                0 8px 15px rgba(12, 82, 248, 0.3);
    text-decoration: none !important;
}

.popup-pay-button:hover::before {
    left: 100%;
}

.popup-pay-button:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 171, 238, 0.3);
}

.pay-icon {
    font-size: 1.4em;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.hidden {
    display: none !important;
}

body.no-scroll {
    overflow: hidden;
}

@media (max-width: 768px) {
    .popup-card {
        width: 90%;
        padding: 30px 25px;
        border-radius: 20px;
    }

    .popup-title {
        font-size: 1.6em;
    }

    .popup-message {
        font-size: 1em;
    }

    .popup-pay-button {
        padding: 16px 20px;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .popup-card {
        width: 95%;
        padding: 25px 20px;
        border-radius: 18px;
    }

    .popup-title {
        font-size: 1.4em;
    }

    .popup-message {
        font-size: 0.95em;
        padding: 0;
    }

    .popup-pay-button {
        padding: 14px 18px;
        font-size: 1em;
    }

    .popup-order {
        font-size: 1em;
        padding: 12px 16px;
    }
}

.popup-text-block > * {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.6s ease forwards;
}

.popup-text-block > *:nth-child(1) { animation-delay: 0.1s; }
.popup-text-block > *:nth-child(2) { animation-delay: 0.2s; }
.popup-text-block > *:nth-child(3) { animation-delay: 0.3s; }
.popup-pay-button { animation-delay: 0.4s; }

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-pay-button,
.popup-pay-button:hover,
.popup-pay-button:focus,
.popup-pay-button:active,
.popup-pay-button:visited {
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
    -moz-text-decoration: none !important;
    text-decoration-thickness: 0 !important;
    text-underline-offset: 0 !important;
}

.error-text {
    color: #ff4757;
    font-size: 0.85rem;
    margin-top: 6px;
    display: block;
    position: absolute;
    bottom: -22px;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    font-weight: 500;
    padding-left: 5px;
    pointer-events: none;
    z-index: 1;
}

.error-text.show {
    opacity: 1;
    transform: translateY(0);
}

.form-group {
    position: relative;
    margin-bottom: 24px;
}

.input-error {
    border-color: #ff4757 !important;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.15) !important;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}



.popup-amount {
    margin: 15px 0;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(42, 171, 238, 0.1) 0%, rgba(12, 82, 248, 0.1) 100%);
    border-radius: 12px;
    border-left: 4px solid #2AABEE;
    font-size: 1.1em;
    color: #333;
}

.popup-amount strong {
    color: #0C52F8;
}


/* ---- ПОПАп для покупки */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    padding: 16px 24px;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    z-index: 9999;
    transform: translateX(150%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-left: 5px solid #27ae60;
}

.notification.error {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    border-left: 5px solid #ff0000;
}

.notification.warning {
    background: linear-gradient(135deg, #ffa502, #ff7f00);
    border-left: 5px solid #ff7f00;
}

.notification.info {
    background: linear-gradient(135deg, #2aabee, #229ed9);
    border-left: 5px solid #229ed9;
}


.input-error {
    border-color: #ff4757 !important;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.15);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-4px); }
}


.error-text {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #ff4757;
    opacity: 0;
    transform: translateY(-6px);
    transition: all 0.3s ease;
}

.error-text.show {
    opacity: 1;
    transform: translateY(0);
}


.form-group {
    position: relative;
    margin-bottom: 20px;
}

/* ================================ ПОПАп ДЛЯ ЗАКАЗОВ ================================ */
.orders-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 10, 38, 0.7); /* темнее, как фон сайта */
    backdrop-filter: blur(8px) saturate(150%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.orders-popup.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.orders-popup-content {
    background: #12172c;
    color: #fff;
    padding: 30px 25px;
    width: 520px;
    max-width: 90%;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3),
                0 8px 24px rgba(42, 171, 238, 0.15);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.orders-popup.show .orders-popup-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.orders-popup-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0C52F8;
}

#orders-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    max-height: 320px;
    overflow-y: auto;
    border-radius: 12px;
    background: rgba(42, 171, 238, 0.05);

    scrollbar-width: thin; /* для Firefox: можно оставить thin или none */
    scrollbar-color: transparent transparent; /* Firefox */
}

#orders-list li {
    padding: 10px 12px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    transition: background 0.3s ease;
}

#orders-list li:hover {
    background: rgba(42, 171, 238, 0.1);
}

#orders-list::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

#orders-list::-webkit-scrollbar-thumb {
    background: transparent;
}

#close-orders {
    margin-top: 10px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #2AABEE 0%, #0C52F8 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

#close-orders:hover {
    transform: translateY(-2px);
    box-shadow:0 6px 20px rgba(42, 171, 238, 0.4);
}

#close-orders:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .orders-popup-content {
        width: 90%;
        padding: 20px;
        border-radius: 16px;
    }

    #orders-list li {
        font-size: 0.9rem;
        padding: 8px 10px;
    }

    #close-orders {
        padding: 8px 12px;
        font-size: 0.95rem;
    }
}
