/* 視覚的フレームワーク用CSS */

.visual-guide-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.visual-guide-card h3 {
    color: white;
}

#visualFramework {
    min-height: 400px;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.visual-controls {
    text-align: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* 共通のビジュアル要素 */
.visual-framework {
    width: 100%;
    min-height: 350px;
}

.flow-step,
.pyramid-level,
.tree-node,
.syllogism-step,
.w5h1-item,
.kpi-box {
    transition: all 0.3s ease;
}

[data-step].active {
    opacity: 1;
    transform: scale(1.05);
}

[data-step].inactive {
    opacity: 0.4;
}

[data-step] {
    opacity: 0.7;
}

/* PREP法のビジュアル */
.prep-visual .framework-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.step-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-box {
    flex: 1;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: white;
}

.point-box {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.reason-box {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.example-box {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.step-label {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.step-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.step-example {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

.flow-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* ピラミッドストラクチャーのビジュアル */
.pyramid-visual .pyramid-structure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pyramid-level {
    display: flex;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

.pyramid-box {
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--border);
    text-align: center;
    min-width: 80px;
}

.main-claim {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: bold;
    min-width: 200px;
}

.pyramid-level.level-2 .pyramid-box {
    flex: 1;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.pyramid-connectors {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.connector {
    width: 2px;
    height: 30px;
    background: var(--primary-color);
}

.pyramid-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
    color: #1e293b;
    font-weight: 600;
}

.pyramid-note p {
    margin: 0.25rem 0;
}

/* MECEのビジュアル */
.mece-visual .mece-structure {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mece-title {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border-radius: 8px;
}

.mece-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mece-quadrant {
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quadrant-1 {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.quadrant-2 {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.quadrant-3 {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.quadrant-4 {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

.quadrant-label {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.quadrant-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mece-check {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 6px;
    color: #1e293b;
    font-weight: 600;
}

.check-icon {
    font-size: 1.2rem;
    color: var(--success-color);
}

/* ロジックツリーのビジュアル */
.tree-visual .tree-structure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tree-root,
.tree-level {
    display: flex;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

.tree-node {
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--border);
    text-align: center;
    min-width: 80px;
}

.root-node {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #1e293b;
    font-weight: bold;
    min-width: 150px;
}

.branch-node {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e293b;
}

.leaf-node {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.tree-branches,
.tree-subbranches {
    display: flex;
    gap: 2rem;
    justify-content: center;
    height: 20px;
    position: relative;
}

.branch-line,
.subbranch-line {
    width: 2px;
    height: 20px;
    background: var(--primary-color);
}

.tree-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
    color: #1e293b;
    font-weight: 600;
}

/* 三段論法のビジュアル */
.syllogism-visual .syllogism-structure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.syllogism-step {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.syllogism-step .step-icon {
    background: var(--secondary-color);
    width: auto;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.syllogism-box {
    width: 100%;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.premise-major {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
}

.premise-minor {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.conclusion {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
}

.logic-connector {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* 5W1Hのビジュアル */
.w5h1-visual .w5h1-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.w5h1-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
    border: 2px solid var(--border);
}

.w5h1-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.w5h1-box {
    flex: 1;
}

.w5h1-item:nth-child(1) {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.w5h1-item:nth-child(2) {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.w5h1-item:nth-child(3) {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.w5h1-item:nth-child(4) {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

.w5h1-item:nth-child(5) {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

.w5h1-item:nth-child(6) {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
}

.w5h1-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
    color: #1e293b;
    font-weight: 600;
}

/* KPIツリーのビジュアル */
.kpi-visual .kpi-structure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.kpi-level {
    display: flex;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

.kpi-box {
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--border);
    text-align: center;
    min-width: 80px;
}

.goal-box {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #1e293b;
    font-weight: bold;
    min-width: 200px;
    font-size: 1.1rem;
}

.indicator-box {
    flex: 1;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e293b;
}

.action-box {
    flex: 1;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.kpi-arrows,
.kpi-subarrows {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.kpi-arrow,
.kpi-subarrow {
    width: 2px;
    height: 30px;
    background: var(--primary-color);
}

.kpi-actions {
    margin-top: 1rem;
    width: 100%;
}

.action-item {
    padding: 1rem;
    background: var(--background);
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    color: #1e293b;
}

/* アニメーション */
@keyframes highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(37, 99, 235, 0.3);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

[data-step].active {
    animation: highlight 1s ease-in-out;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .w5h1-grid {
        grid-template-columns: 1fr;
    }

    .mece-grid {
        grid-template-columns: 1fr;
    }

    .pyramid-level.level-2 {
        flex-direction: column;
    }

    .tree-level {
        flex-direction: column;
        align-items: center;
    }
}
