    <style>       
        .container {
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            padding: 30px;
            margin-bottom: 30px;
        }
        
        h1 {
            color: #2c3e50;
            text-align: center;
            margin-bottom: 20px;
            font-size: 28px;
            border-bottom: 2px solid #3498db;
            padding-bottom: 15px;
        }
        
        h2 {
            color: #34495e;
            margin: 25px 0 15px;
            font-size: 22px;
        }
        
        h4 {
            color: #2c3e50;
            margin: 20px 0 15px;
            font-size: 18px;
            padding-left: 10px;
            border-left: 4px solid #3498db;
        }
        
        .diagram-container {
            position: relative;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 20px;
            margin: 20px 0;
            background: #fafafa;
            overflow: hidden;
            transition: all 0.3s ease;
        }
        
        .diagram-container:hover {
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
            border-color: #bdc3c7;
        }
        
        .mermaid {
            width: 100%;
            overflow-x: auto;
            min-height: 300px;
        }
        
        .download-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #2ecc71;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: all 0.2s;
            z-index: 10;
        }
        
        .download-btn:hover {
            background: #27ae60;
            transform: translateY(-2px);
            box-shadow: 0 3px 8px rgba(46, 204, 113, 0.3);
        }
        
        .download-btn:active {
            transform: translateY(0);
        }
        
        .format-select {
            margin-top: 10px;
            display: flex;
            gap: 10px;
            align-items: center;
        }
        
        .format-select label {
            font-size: 14px;
            color: #555;
        }
        
        .format-select select {
            padding: 6px 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            background: white;
            font-size: 14px;
        }
        
        .legend {
            background: #f8f9fa;
            border-left: 4px solid #3498db;
            padding: 15px;
            margin: 20px 0;
            border-radius: 0 8px 8px 0;
        }
        
        .legend h5 {
            color: #2c3e50;
            margin-bottom: 10px;
            font-size: 16px;
        }
        
        .legend-items {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
        }
        
        .legend-color {
            width: 20px;
            height: 20px;
            border-radius: 4px;
            border: 1px solid #ddd;
        }
        
        .color-primary {
            background: #e8f5e8;
            border-color: #4caf50;
        }
        
        .color-secondary {
            background: #e3f2fd;
            border-color: #2196f3;
        }
        
        .color-switch {
            background: #fff3e0;
            border-color: #ff9800;
        }
        
        .color-control {
            background: #fce4ec;
            border-color: #e91e63;
        }
        
        .footer {
            text-align: center;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #eee;
            color: #7f8c8d;
            font-size: 14px;
        }
        
        @media (max-width: 768px) {
            body {
                padding: 10px;
            }
            
            .container {
                padding: 15px;
            }
            
            h1 {
                font-size: 24px;
            }
            
            h2 {
                font-size: 20px;
            }
            
            .download-btn {
                padding: 6px 12px;
                font-size: 12px;
            }
        }
    </style>