/* FUSION MODAL - REDESIGN PREMIUM */

/* Modal Overlay */
.fusion-modal-redesign {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    animation: fadeInModal 0.3s ease-out forwards;
}

/* Modal Container */
.fusion-container-redesign {
    background: linear-gradient(135deg, rgba(20, 30, 50, 0.98) 0%, rgba(10, 20, 40, 0.99) 100%);
    border-radius: 30px;
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 100px rgba(171, 71, 188, 0.3);
    border: 4px solid rgba(171, 71, 188, 0.4);
    position: relative;
    animation: slideUpModal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Close Button */
.fusion-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(244, 67, 54, 0.9);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.5);
    z-index: 10;
}

.fusion-close-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 25px rgba(244, 67, 54, 0.7);
}

/* Header */
.fusion-header-redesign {
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, rgba(171, 71, 188, 0.3) 0%, rgba(123, 31, 162, 0.3) 100%);
    border-radius: 30px 30px 0 0;
    border-bottom: 3px solid rgba(171, 71, 188, 0.4);
}

.fusion-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-shadow: 0 4px 20px rgba(171, 71, 188, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.fusion-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    line-height: 1.6;
}

/* Rarity Selector */
.fusion-rarity-selector-redesign {
    padding: 30px 40px;
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.8) 0%, rgba(20, 30, 50, 0.9) 100%);
    border-bottom: 2px solid rgba(171, 71, 188, 0.3);
}

.fusion-selector-label {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: block;
}

.fusion-rarity-select {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(171, 71, 188, 0.4);
    border-radius: 16px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fusion-rarity-select:hover {
    border-color: rgba(171, 71, 188, 0.7);
    background: rgba(171, 71, 188, 0.1);
}

.fusion-rarity-select:focus {
    outline: none;
    border-color: rgba(171, 71, 188, 0.9);
    box-shadow: 0 0 20px rgba(171, 71, 188, 0.4);
}

/* Selection Info */
.fusion-selection-info-redesign {
    padding: 25px 40px;
    background: linear-gradient(135deg, rgba(171, 71, 188, 0.2) 0%, rgba(123, 31, 162, 0.2) 100%);
    border-bottom: 2px solid rgba(171, 71, 188, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fusion-selected-count {
    font-size: 1.3rem;
    font-weight: 900;
    color: #fff;
}

.fusion-selected-count strong {
    color: #ce93d8;
    font-size: 1.5rem;
}

.fusion-available-count {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
}

/* Cards Grid */
.fusion-cards-grid-redesign {
    padding: 30px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    min-height: 300px;
}

.fusion-card-wrapper {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fusion-card-wrapper:hover {
    transform: translateY(-8px);
}

.fusion-card-wrapper.selected {
    transform: scale(1.05);
}

.fusion-card-wrapper.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #66bb6a 0%, #388e3c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 4px 15px rgba(102, 187, 106, 0.6);
    z-index: 5;
}

.fusion-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Actions */
.fusion-actions-redesign {
    padding: 30px 40px;
    display: flex;
    gap: 15px;
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.8) 0%, rgba(20, 30, 50, 0.9) 100%);
    border-radius: 0 0 30px 30px;
}

.fusion-action-btn {
    flex: 1;
    padding: 18px 30px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    border: 3px solid;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: 1px;
}

.fusion-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fusion-action-btn.primary {
    background: linear-gradient(135deg, #ce93d8 0%, #ab47bc 100%);
    border-color: rgba(171, 71, 188, 0.6);
    color: #fff;
    box-shadow: 0 6px 20px rgba(171, 71, 188, 0.4);
}

.fusion-action-btn.primary:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(171, 71, 188, 0.6);
}

.fusion-action-btn.secondary {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.3) 0%, rgba(0, 188, 212, 0.3) 100%);
    border-color: rgba(79, 195, 247, 0.5);
    color: #4fc3f7;
}

.fusion-action-btn.secondary:hover {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.4) 0%, rgba(0, 188, 212, 0.4) 100%);
    transform: translateY(-3px);
}

.fusion-action-btn.all {
    background: linear-gradient(135deg, #ffd54f 0%, #ffa726 100%);
    border-color: rgba(255, 193, 7, 0.6);
    color: #fff;
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.fusion-action-btn.all:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.6);
}

/* Result Modal */
.fusion-result-redesign {
    text-align: center;
    padding: 40px;
}

.fusion-result-title {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 30px;
    text-shadow: 0 4px 20px rgba(171, 71, 188, 0.6);
}

.fusion-result-card {
    margin: 0 auto 30px;
    max-width: 300px;
}

.fusion-result-info {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Responsive */
@media (max-width: 1024px) {
    .fusion-cards-grid-redesign {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .fusion-header-redesign,
    .fusion-rarity-selector-redesign,
    .fusion-selection-info-redesign,
    .fusion-cards-grid-redesign,
    .fusion-actions-redesign {
        padding: 25px 20px;
    }
    
    .fusion-title {
        font-size: 1.8rem;
    }
    
    .fusion-actions-redesign {
        flex-direction: column;
    }
    
    .fusion-cards-grid-redesign {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
