/* Стили для модального окна покупки */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: rgba(16, 18, 27, 0.98);
    margin: 8% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header {
    padding: 20px 24px 0;
    position: relative;
    background: transparent;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    transform: scale(1.05);
}

.modal-body {
    padding: 10px 28px 28px;
}

.modal-description {
    text-align: center;
    margin-bottom: 32px;
}

.modal-description h4 {
    color: #FFFFFF;
    font-size: 22px;
    margin: 0 0 8px 0;
    font-weight: 600;
    background: linear-gradient(135deg, #00E6B5, #00D4AA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-description p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.4;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: rgba(0, 230, 181, 0.4);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(0, 230, 181, 0.08);
}

/* Выбор сервера */
.server-select {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.server-option {
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.server-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 230, 181, 0.3);
    transform: translateY(-1px);
}

.server-option.active {
    background: rgba(0, 230, 181, 0.08);
    border-color: rgba(0, 230, 181, 0.4);
    color: #00E6B5;
}

.server-option i {
    display: block;
    font-size: 18px;
    margin-bottom: 6px;
    opacity: 0.8;
}

/* Выбор пола */
.gender-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.gender-option {
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.gender-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 230, 181, 0.3);
    transform: translateY(-1px);
}

.gender-option.active {
    background: rgba(0, 230, 181, 0.08);
    border-color: rgba(0, 230, 181, 0.4);
    color: #00E6B5;
}

.gender-option i {
    margin-right: 6px;
}

/* Выбор срока */
.duration-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.duration-option {
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 14px;
}

.duration-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 230, 181, 0.3);
    transform: translateY(-1px);
}

.duration-option.active {
    background: rgba(0, 230, 181, 0.08);
    border-color: rgba(0, 230, 181, 0.4);
    color: #00E6B5;
}



/* Количество */
.quantity-input {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 140px;
    margin: 0 auto;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.quantity-btn:first-child {
    border-radius: 8px 0 0 8px;
}

.quantity-btn:last-child {
    border-radius: 0 8px 8px 0;
}

.quantity-btn:hover {
    background: rgba(0, 230, 181, 0.08);
    border-color: rgba(0, 230, 181, 0.3);
    color: #00E6B5;
}

.quantity-value {
    width: 60px;
    height: 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: none;
    border-right: none;
    color: #FFFFFF;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

/* Имя выбранной привилегии */
.selected-name {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(0, 230, 181, 0.08);
    border: 1px solid rgba(0, 230, 181, 0.2);
    border-radius: 8px;
    color: #00E6B5;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    min-height: 16px;
}

/* Футер модального окна */
.modal-footer {
    padding: 20px 28px 24px;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.total-price {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 600;
}

.total-price span {
    color: #00E6B5;
    font-size: 18px;
    font-weight: 700;
}

.btn-buy {
    background: linear-gradient(135deg, #00E6B5, #00D4AA);
    color: #0F1118;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(0, 230, 181, 0.25);
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 230, 181, 0.35);
    background: linear-gradient(135deg, #00F2C3, #00E6B5);
}

.btn-buy:active {
    transform: translateY(-1px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .modal-content {
        margin: 15px;
        width: calc(100% - 30px);
        max-width: none;
    }
    
    .modal-header {
        padding: 16px 20px 0;
    }
    
    .modal-body {
        padding: 8px 20px 20px;
    }
    
    .modal-footer {
        padding: 16px 20px 20px;
    }
    
    .server-select {
        grid-template-columns: 1fr;
    }
    
    .gender-select {
        grid-template-columns: 1fr;
    }
    
    .duration-select {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-buy {
        width: 100%;
        padding: 14px 24px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .modal-description h4 {
        font-size: 18px;
    }
    
    .modal-description p {
        font-size: 13px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
}