.purchase-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.purchase-modal-overlay.active {
    opacity: 1;
}

.purchase-modal {
    background: #1e1e2e;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.purchase-modal-overlay.active .purchase-modal {
    transform: scale(1);
}

.purchase-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 2px solid #2a2a3e;
}

.purchase-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
    width: 32px;
    height: 32px;
}

.close-btn:hover {
    color: #fff;
}

.purchase-modal-body {
    padding: 24px;
}

.current-balance {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.balance-value {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.package-card {
    background: #2a2a3e;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.package-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
}

.package-card.featured {
    border-color: #ffd700;
    background: linear-gradient(135deg, #2a2a3e 0%, #3a3a4e 100%);
}

.bonus-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b6b;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.package-name {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 12px;
}

.package-currency {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
}

.currency-icon {
    font-size: 32px;
}

.currency-amount {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
}

.package-price {
    font-size: 24px;
    font-weight: bold;
    color: #4ade80;
    margin: 12px 0;
}

.package-description {
    color: #aaa;
    font-size: 13px;
    margin: 8px 0;
}

.buy-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.buy-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
}

.buy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
