/* 融合ボックス・覚醒ボックス共通グリッド */
.fusion-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 0 16px;
}

.fusion-grid .empty-message {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fusion-grid .empty-message p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.fusion-grid-item {
    flex: 1 1 calc(50% - 8px);
    max-width: calc(50% - 8px);
}

/* PC用：3列表示・カードサイズ拡大 */
@media (min-width: 769px) {
    .fusion-grid {
        gap: 32px;
        padding: 0;
        margin-left: 24px;
    }
    .fusion-grid-item {
        flex: 1 1 calc(33.333% - 22px);
        max-width: calc(33.333% - 22px);
    }
    .fusion-card {
        min-height: 420px;
    }
    .fusion-card-header {
        padding: 20px 28px;
    }
    .fusion-card-status {
        font-size: 18px;
        padding: 10px 28px;
        border-radius: 16px;
    }
    .fusion-tokens-summary {
        padding: 28px 32px;
        gap: 16px;
    }
    .fusion-tokens-count {
        font-size: 20px;
    }
    .fusion-detail-btn {
        padding: 14px 32px;
        font-size: 16px;
        border-radius: 8px;
    }
    .fusion-card-info {
        padding: 32px;
    }
    .fusion-info-row {
        margin-bottom: 24px;
    }
    .fusion-info-label {
        font-size: 18px;
        margin-bottom: 8px;
    }
    .fusion-info-value {
        font-size: 36px;
    }
    .fusion-profit-section {
        padding-top: 24px;
        margin-top: 20px;
    }
    .fusion-profit-details {
        margin-top: 16px;
    }
    .fusion-profit-row {
        font-size: 20px;
        padding: 12px 0;
    }
    .fusion-profit-value {
        font-size: 22px;
    }
}

.fusion-card {
    background: linear-gradient(135deg, #1a3a5c 0%, #0d1f33 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.fusion-card-header {
    background: linear-gradient(90deg, #004b82 0%, #006bb3 100%);
    padding: 10px 16px;
    text-align: center;
}

.fusion-tokens-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
}

.fusion-tokens-count {
    color: #8cb4d8;
    font-size: 14px;
}

.awakening-medal-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.awakening-result-image {
    display: block;
    margin: 12px auto;
    width: 200px;
    height: 200px;
    object-fit: contain;
}

@media screen and (max-width: 768px) {
    .awakening-result-image {
        width: 140px;
        height: 140px;
        margin: 8px auto;
    }
}

.fusion-detail-btn {
    background: linear-gradient(90deg, #004b82 0%, #006bb3 100%);
    color: #ffffff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

.fusion-detail-btn:hover {
    opacity: 0.8;
}

.fusion-card-info {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.fusion-info-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    text-align: center;
}

.fusion-info-label {
    color: #8cb4d8;
    font-size: 13px;
    margin-bottom: 4px;
}

.fusion-info-value {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
}

.fusion-profit-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
    margin-top: 8px;
}

.fusion-profit-details {
    margin-top: 8px;
}

.fusion-profit-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: #ffffff;
}

.fusion-profit-row span:first-child {
    color: #8cb4d8;
}

.fusion-profit-value {
    font-weight: bold;
    color: #4ade80;
}

.fusion-card-status {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.fusion-card-status.status-active {
    background-color: #22c55e;
    color: #ffffff;
}

.fusion-card-status.status-queued {
    background-color: #f59e0b;
    color: #ffffff;
}

.fusion-card-status.status-completed {
    background-color: #6b7280;
    color: #ffffff;
}

/* モーダル（融合の詳細表示用） */
.fusion-box-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fusion-box-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.fusion-box-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a3a5c 0%, #0d1f33 100%);
    border-radius: 16px;
    padding: 20px;
    width: calc(100% - 32px);
    max-width: 400px;
    max-height: 80%;
    overflow-y: auto;
    box-sizing: border-box;
    z-index: 1;
}

.fusion-box-modal-content .fusion-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.fusion-modal-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 16px 0;
    text-align: center;
}

.fusion-tokens-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fusion-token-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px;
}

.fusion-token-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #ffd700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.fusion-token-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fusion-token-name {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

.fusion-token-id {
    color: #8cb4d8;
    font-size: 11px;
}

.fusion-token-price {
    color: #4ade80;
    font-size: 13px;
    font-weight: bold;
}
