/* ============================================
   modal.css — Стили для модального окна покупки
   ============================================ */

/* Затемнение фона */
.buy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.3s ease;
}

/* Окно */
.buy-modal-content {
    background: linear-gradient(145deg, #1a1a2e, #0f0f1f);
    border-radius: 25px;
    padding: 40px;
    max-width: 450px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(252, 148, 4, 0.2);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
    animation: modalSlideUp 0.4s ease;
}

/* Кнопка закрытия */
.buy-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 40px;
    color: #666;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
}

.buy-modal-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* Картинка товара */
.buy-product-image {
    width: 100%;
    height: 200px;
    border-radius: 15px;
    background: linear-gradient(135deg, #2a2a4e, #1a1a3e);
    background-size: cover;
    background-position: center;
    margin-bottom: 20px;
    border: 2px solid rgba(252, 148, 4, 0.2);
}

/* Название */
.buy-modal-content h2 {
    font-size: 30px;
    color: #fff;
    text-align: center;
    margin-bottom: 5px;
    font-weight: 700;
}

/* Цена */
.buy-price {
    text-align: center;
    font-size: 34px;
    font-weight: bold;
    color: #fc9404;
    margin-bottom: 20px;
}

/* Описание */
.buy-description {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.buy-description ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.buy-description ul li {
    padding: 8px 0;
    color: #ccc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 15px;
}

.buy-description ul li:last-child {
    border-bottom: none;
}

.buy-description ul li::before {
    content: "▸ ";
    color: #fc9404;
    font-weight: bold;
}

/* Поле ввода ника */
.buy-nick {
    margin-bottom: 20px;
}

.buy-nick label {
    display: block;
    color: #aaa;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.buy-nick input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transition: 0.3s;
    box-sizing: border-box;
}

.buy-nick input:focus {
    outline: none;
    border-color: #fc9404;
    background: rgba(252, 148, 4, 0.05);
    box-shadow: 0 0 20px rgba(252, 148, 4, 0.1);
}

.buy-nick input::placeholder {
    color: #555;
}

/* Кнопка оплаты */
.buy-pay-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #fc9404, #e08500);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.buy-pay-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 35px rgba(252, 148, 4, 0.4);
}

.buy-pay-btn:active {
    transform: scale(0.97);
}

.buy-pay-btn i {
    font-size: 22px;
}

/* Соглашение */
.buy-agreement {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-top: 15px;
}

.buy-agreement a {
    color: #fc9404;
    text-decoration: none;
}

.buy-agreement a:hover {
    text-decoration: underline;
}

/* ===== АНИМАЦИИ ===== */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== СКРОЛЛ В МОДАЛКЕ ===== */
.buy-modal-content::-webkit-scrollbar {
    width: 4px;
}

.buy-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.buy-modal-content::-webkit-scrollbar-thumb {
    background: #fc9404;
    border-radius: 10px;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 480px) {
    .buy-modal-content {
        padding: 25px 20px;
        width: 95%;
    }
    
    .buy-modal-content h2 {
        font-size: 24px;
    }
    
    .buy-price {
        font-size: 28px;
    }
    
    .buy-product-image {
        height: 150px;
    }
    
    .buy-pay-btn {
        font-size: 17px;
        padding: 15px;
    }
}