        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
			background:black;
            min-height: 100vh;
            padding: 20px;
			font-size: 12px; /* 14px */
        }

        .container {
            max-width: 1000px;
            margin: 0 auto;
            background: white;
            border-radius: 15px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }

        .header {
            background: linear-gradient(45deg, #667eea, #764ba2);
            color: white;
            padding: 5px;/* 20px */
            text-align: center;
        }

        .header h4 {
            font-size: 1.5em;/* 2.5em */
            margin-bottom: 2px;/* 10px */
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        .toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            padding: 2px;/* 20px */
            background: #f8f9fa;
            border-bottom: 1px solid #e9ecef;
        }

        .tool-group {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .btn {
            padding: 8px 10px;/* 12px 20px*/
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 12px; /* 14px */
            font-weight: 600;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        .btn-primary { background: #007bff; color: white; }
        .btn-success { background: #28a745; color: white; }
        .btn-danger { background: #dc3545; color: white; }
        .btn-warning { background: #ffc107; color: #212529; }
        .btn-info { background: #17a2b8; color: white; }
        .btn-secondary { background: #6c757d; color: white; }

        .style-panel {
            padding: 5px;/* 20px */
            background: #f8f9fa;
            border-bottom: 1px solid #e9ecef;
        }

        .style-row {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;/* 20px */
            margin-bottom: 5px;/* 15px */
        }

        .style-group {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .style-group label {
            font-weight: 600;
            color: #495057;
        }

        .style-group input, .style-group select {
            padding: 8px 12px;
            border: 1px solid #ced4da;
            border-radius: 5px;
            font-size: 14px;
        }

        .style-group input[type="range"] {
            width: 120px;
        }

        .style-group input[type="color"] {
            width: 50px;
            height: 38px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }

        .style-btn {
            padding: 8px 15px;
            border: 1px solid #ced4da;
            background: white;
            border-radius: 5px;
            cursor: pointer;
            font-size: 10px; /* 14px */
            transition: all 0.2s ease;
        }

        .style-btn:hover {
            background: #e9ecef;
        }

        .style-btn.active {
            background: #007bff;
            color: white;
            border-color: #007bff;
        }

        .canvas-container {
            display: flex;
            justify-content: center;
            padding: 30px;
            background: white;
        }

        canvas {
            border: 2px solid #e9ecef;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            max-width: 100%;
        }


        /* 数据库管理侧边栏样式 */
        #db-sidebar {
            position: fixed;
            top: 0;
            right: -320px;
            width: 320px;
            height: 100vh;
            background: #fff;
            box-shadow: -2px 0 10px rgba(0,0,0,0.2);
            padding: 20px;
            overflow-y: auto;
            z-index: 9999;
            transition: right 0.3s ease;
            border-left: 3px solid #007acc;
        }

   /*      #db-toggle-btn {
            position: fixed;
            top: 20px;
            right: 20px;
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, #007acc, #005a9e);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            font-size: 20px;
            box-shadow: 0 4px 15px rgba(0,122,204,0.3);
            z-index: 10000;
            transition: all 0.3s ease;
        }*/

    /*    #db-toggle-btn:hover {
            transform: scale(1.1);
        }*/

#db-toggle-btn {
    position: relative;  /* 改为相对定位 */
    top: 0;              /* 不再固定页面 */
    right: 0;
    width: auto;         /* 按钮自适应大小 */
    height: auto;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    background: linear-gradient(135deg, #007acc, #005a9e);
    color: white;
    box-shadow: 0 2px 6px rgba(0,122,204,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

#db-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,122,204,0.4);
}


        .db-input-group {
            margin-bottom: 15px;
        }

        .db-input-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #555;
        }

        .db-input-group input, .db-input-group textarea {
            width: 100%;
            padding: 10px;
            border: 2px solid #e1e5e9;
            border-radius: 6px;
            font-size: 14px;
        }

        .db-input-group textarea {
            min-height: 60px;
            resize: vertical;
        }

        .project-item {
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 10px;
            transition: all 0.3s;
        }

        .project-item:hover {
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            transform: translateY(-1px);
        }

        .project-item h4 {
            color: #333;
            font-size: 16px;
            margin: 0 0 5px 0;
        }

        .project-item p {
            color: #666;
            font-size: 13px;
            margin: 0 0 8px 0;
            line-height: 1.4;
        }

        .project-item small {
            color: #999;
            font-size: 11px;
        }

        .project-actions {
            margin-top: 12px;
            display: flex;
            gap: 8px;
        }

        .project-actions button {
            flex: 1;
            padding: 8px 12px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            transition: all 0.2s ease;
        }

        .project-actions .load-btn {
            background: #28a745;
            color: white;
        }

        .project-actions .delete-btn {
            background: #dc3545;
            color: white;
        }

        .project-actions button:hover {
            opacity: 0.9;
            transform: translateY(-1px);
        }

        .status-message {
            display: none;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 12px;
            margin-bottom: 15px;
        }

        .status-success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        .status-error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        .status-loading {
            background: #d1ecf1;
            color: #0c5460;
            border: 1px solid #bee5eb;
        }

        .toast {
            position: fixed;
            top: 80px;
            right: 20px;
            background: #28a745;
            color: white;
            padding: 15px 25px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            z-index: 1000;
            transform: translateX(100%);
            opacity: 0;
            transition: all 0.3s ease;
        }

        .toast.show {
            transform: translateX(0);
            opacity: 1;
        }

        .toast.error {
            background: #dc3545;
        }

        @media (max-width: 768px) {
            .toolbar {
                flex-direction: column;
            }
            
            .style-row {
                flex-direction: column;
            }

            #db-sidebar {
                width: 100%;
                right: -100%;
            }

            #db-toggle-btn {
                top: 10px;
                right: 10px;
                width: 45px;
                height: 45px;
                font-size: 18px;
            }
        } 
@media (max-width: 768px) {
    #db-toggle-btn {
        width: 100%;
        margin-top: 5px;
    }
}