    /* Chapter 4 Specific Styles */
    .ensemble-demo {
        background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
        border: 2px solid #14b8a6;
        border-radius: 12px;
        padding: 2rem;
        margin: 2rem 0;
        position: relative;
    }
    
    .ensemble-demo::before {
        content: "Ensemble Demonstration";
        position: absolute;
        top: -12px;
        left: 20px;
        background: #14b8a6;
        color: white;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: bold;
    }
    
    .voting-visualization {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
        margin: 2rem 0;
        text-align: center;
    }
    
    .model-vote {
        background: white;
        border-radius: 12px;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        cursor: pointer;
        border: 2px solid transparent;
    }
    
    .model-vote:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }
    
    .model-vote.correct {
        border-color: #22c55e;
        background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    }
    
    .model-vote.incorrect {
        border-color: #ef4444;
        background: linear-gradient(135deg, #fef2f2, #fee2e2);
    }
    
    .vote-prediction {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 0.5rem;
    }
    
    .vote-confidence {
        font-size: 0.9rem;
        color: #64748b;
    }
    
    .ensemble-result {
        background: linear-gradient(135deg, #1e40af, #3730a3);
        color: white;
        border-radius: 12px;
        padding: 2rem;
        text-align: center;
        margin: 2rem 0;
        position: relative;
    }
    
    .ensemble-result::before {
        content: "Final Ensemble Prediction";
        position: absolute;
        top: -12px;
        left: 50%;
        transform: translateX(-50%);
        background: white;
        color: #1e40af;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: bold;
    }
    
    .bagging-boosting-comparison {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        margin: 2rem 0;
    }
    
    .method-card {
        background: white;
        border-radius: 12px;
        padding: 1.5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        position: relative;
    }
    
    .bagging-card {
        border-left: 4px solid #3b82f6;
    }
    
    .boosting-card {
        border-left: 4px solid #f59e0b;
    }
    
    .process-flow {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        margin: 2rem 0;
        flex-wrap: wrap;
    }
    
    .process-step {
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
        padding: 1rem 1.5rem;
        border-radius: 8px;
        font-weight: 600;
        text-align: center;
        min-width: 120px;
        position: relative;
    }
    
    .process-arrow {
        font-size: 1.5rem;
        color: #667eea;
        font-weight: bold;
    }
    
    .interactive-ensemble {
        background: #f8fafc;
        border-radius: 12px;
        padding: 2rem;
        margin: 2rem 0;
    }
    
    .model-selector {
        display: flex;
        gap: 1rem;
        margin: 1rem 0;
        flex-wrap: wrap;
    }
    
    .model-checkbox {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        background: white;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        border: 2px solid #e2e8f0;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .model-checkbox:hover {
        border-color: #14b8a6;
    }
    
    .model-checkbox.selected {
        border-color: #14b8a6;
        background: #f0fdfa;
    }
    
    .performance-metrics {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .metric-card {
        background: white;
        border-radius: 8px;
        padding: 1rem;
        text-align: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .metric-value {
        font-size: 1.8rem;
        font-weight: bold;
        color: #1e40af;
        margin-bottom: 0.5rem;
    }
    
    .metric-label {
        font-size: 0.9rem;
        color: #64748b;
    }
    
    .wisdom-crowds {
        background: linear-gradient(135deg, #fef3c7, #fde68a);
        border-left: 4px solid #f59e0b;
        border-radius: 8px;
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .diversity-demo {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
        margin: 1rem 0;
    }
    
    .diversity-card {
        background: white;
        border-radius: 8px;
        padding: 1rem;
        text-align: center;
        border: 2px solid #e2e8f0;
    }
    
    .diversity-high {
        border-color: #22c55e;
        background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    }
    
    .diversity-low {
        border-color: #ef4444;
        background: linear-gradient(135deg, #fef2f2, #fee2e2);
    }
    
    @media (max-width: 768px) {
        .bagging-boosting-comparison {
            grid-template-columns: 1fr;
        }
        
        .voting-visualization {
            grid-template-columns: repeat(3, 1fr);
        }
        
        .process-flow {
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .process-arrow {
            transform: rotate(90deg);
        }
    }