/* DCC Flow Animation Styles */

.dcc-diagram {
    position: relative;
    overflow: visible;
    margin: 3rem 0;
}

.dcc-flow-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.dcc-flow-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* パーティクルアニメーション用のオーバーレイ */
.dcc-particles-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* 光の粒子 */
.particle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #ffffff 0%, #60a5fa 30%, #3b82f6 60%, transparent 100%);
    border-radius: 50%;
    opacity: 0;
    filter: blur(2px);
    box-shadow: 0 0 30px #60a5fa, 0 0 50px #3b82f6;
}

/* データソースからの発光アニメーション */
@keyframes sourceGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* モジュールのハイライトアニメーション */
@keyframes moduleHighlight {
    0% {
        opacity: 0;
        filter: brightness(1);
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        filter: brightness(1.8);
        transform: scale(1.15);
    }
    100% {
        opacity: 0;
        filter: brightness(1);
        transform: scale(1);
    }
}

/* 成果アイコンの輝きアニメーション - 小さく細かい点滅 */
@keyframes resultGlow {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
        filter: brightness(1);
    }
    10%, 30%, 50%, 70%, 90% {
        opacity: 0.9;
        transform: scale(0.8);
        filter: brightness(1.8);
    }
    20%, 40%, 60%, 80% {
        opacity: 0.2;
        transform: scale(0.6);
        filter: brightness(1);
    }
}

/* DCCフレーム全体の脈動 */
@keyframes framePulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.01);
        filter: brightness(1.05);
    }
}

/* データソース1（上、23%）→ ③の中央（41%, 46%）大胆に */
@keyframes particleFromSourceToModule3_1 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    15% {
        opacity: 1;
        transform: translate(40%, 30%) scale(1.1);
    }
    75% {
        opacity: 1;
        transform: translate(140%, 150%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(160%, 180%) scale(0);
    }
}

/* データソース2（38%）→ ③の中央（41%, 46%）大胆に */
@keyframes particleFromSourceToModule3_2 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    15% {
        opacity: 1;
        transform: translate(40%, 12%) scale(1.1);
    }
    75% {
        opacity: 1;
        transform: translate(140%, 50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(160%, 65%) scale(0);
    }
}

/* データソース3（53%）→ ③の中央（41%, 46%）大胆に */
@keyframes particleFromSourceToModule3_3 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    15% {
        opacity: 1;
        transform: translate(40%, -8%) scale(1.1);
    }
    75% {
        opacity: 1;
        transform: translate(140%, -35%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(160%, -45%) scale(0);
    }
}

/* データソース4（下、68%）→ ③の中央（41%, 46%）大胆に */
@keyframes particleFromSourceToModule3_4 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    15% {
        opacity: 1;
        transform: translate(40%, -30%) scale(1.1);
    }
    75% {
        opacity: 1;
        transform: translate(140%, -130%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(160%, -160%) scale(0);
    }
}

/* ②（上、23%、68%の位置）→ 電球の一点（90%, 50%）大胆に */
@keyframes particleFromModuleToResult_2 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    15% {
        opacity: 1;
        transform: translate(50%, 30%) scale(1.1);
    }
    75% {
        opacity: 1;
        transform: translate(320%, 120%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(340%, 120%) scale(0);
    }
}

/* ④（中、46%、68%の位置）→ 電球の一点（90%, 50%）大胆に */
@keyframes particleFromModuleToResult_4 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    15% {
        opacity: 1;
        transform: translate(50%, 5%) scale(1.1);
    }
    75% {
        opacity: 1;
        transform: translate(320%, 20%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(340%, 20%) scale(0);
    }
}

/* ⑥（下、69%、68%の位置）→ 電球の一点（90%, 50%）大胆に */
@keyframes particleFromModuleToResult_6 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    15% {
        opacity: 1;
        transform: translate(50%, -30%) scale(1.1);
    }
    75% {
        opacity: 1;
        transform: translate(320%, -85%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(340%, -85%) scale(0);
    }
}

/* ハイライトオーバーレイ */
.highlight-overlay {
    position: absolute;
    pointer-events: none;
    border-radius: 50%; /* 丸い形に変更 */
    background: radial-gradient(circle, rgba(96, 165, 250, 0.8) 0%, rgba(59, 130, 246, 0.5) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 5;
    box-shadow: 0 0 40px rgba(96, 165, 250, 0.8), 0 0 80px rgba(59, 130, 246, 0.6);
}

.highlight-overlay.active {
    animation: moduleHighlight 2s ease-in-out;
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .dcc-flow-img {
        border-radius: 12px;
    }
    
    .particle {
        width: 6px;
        height: 6px;
    }
}

/* アクセシビリティ: アニメーション無効設定 */
@media (prefers-reduced-motion: reduce) {
    .particle,
    .highlight-overlay,
    .dcc-flow-img {
        animation: none !important;
        transition: none !important;
    }
}
