   /* Chapter 3 Specific Styles */
   .regularization-demo {
    background: linear-gradient(135deg, #fef7ff 0%, #f3e8ff 100%);
    border: 2px solid #a855f7;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.regularization-demo::before {
    content: "Regularization Demo";
    position: absolute;
    top: -12px;
    left: 20px;
    background: #a855f7;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.reg-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
    align-items: start;
}

.reg-type {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.reg-type:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.l1-reg {
    border-left: 4px solid #ef4444;
}

.l2-reg {
    border-left: 4px solid #3b82f6;
}

.reg-formula {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-family: 'Times New Roman', serif;
    font-size: 1.2rem;
    margin: 1rem 0;
    border: 2px solid #e2e8f0;
}

.feature-visualization {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.25rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.feature-bar {
    height: 60px;
    border-radius: 4px;
    display: flex;
    align-items: end;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-bar:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.path-visualization {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.lambda-slider {
    width: 100%;
    margin: 1rem 0;
    background: linear-gradient(to right, #fef3c7, #dc2626);
    border-radius: 4px;
    height: 8px;
}

.lambda-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1f2937;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.coefficient-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.coefficient-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.coefficient-card.zero {
    border-color: #ef4444;
    background: #fef2f2;
}

.coefficient-card.shrunk {
    border-color: #f59e0b;
    background: #fffbeb;
}

.coefficient-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.coefficient-label {
    font-size: 0.9rem;
    color: #64748b;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.use-case {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
}

.use-case h4 {
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.when-to-use {
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
    border-left: 4px solid #0ea5e9;
}

.feature-selection {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b3 100%);
    border-left: 4px solid #ff9800;
}

.stability {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-left: 4px solid #9c27b0;
}

.limitation-box {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border: 2px solid #f44336;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.limitation-box::before {
    content: "Limitation Alert";
    position: absolute;
    top: -12px;
    left: 20px;
    background: #f44336;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.interactive-selector {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.selector-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.selector-btn:hover, .selector-btn.active {
    border-color: #a855f7;
    background: #a855f7;
    color: white;
}

.scenario-result {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 2px solid #e2e8f0;
}

@media (max-width: 768px) {
    .reg-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-visualization {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .coefficient-display {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .use-case-grid {
        grid-template-columns: 1fr;
    }
}