.sgf-widget-container {
    background: #ffffff;
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 900px;
}

.sgf-widget-header {
    background: #f8f9fa;
    padding: 15px 25px;
    border-bottom: 1px solid #e2e4e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #646970;
}
.sgf-title { font-weight: 600; color: #3c434a; font-size: 15px; }
.sgf-title .dashicons { vertical-align: text-bottom; margin-right: 5px; }
.sgf-meta { font-size: 12px; opacity: 0.8; }

.sgf-control-panel {
    padding: 25px;
    background: #fff;
    position: relative;
}

.sgf-live-input {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #e2e4e7;
    border-radius: 8px;
    transition: all 0.2s;
    outline: none;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 20px;
    color: #333;
}
.sgf-live-input:focus { border-color: #2271b1; box-shadow: 0 0 0 4px rgba(34, 113, 177, 0.1); }

/* Toolbar */
.sgf-toolbar {
    display: flex;
    gap: 30px;
    align-items: center;
    background: #f8f9fa; /* 浅灰底色 */
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #e2e4e7;
    flex-wrap: wrap;
}

.sgf-tool-group { display: flex; align-items: center; gap: 10px; }
.sgf-tool-group label { font-size: 12px; font-weight: 700; color: #646970; text-transform: uppercase; }

.sgf-size-val { background: #fff; padding: 2px 6px; border-radius: 4px; font-family: monospace; border: 1px solid #ccc; font-size: 11px; }
.sgf-size-slider { width: 120px; cursor: pointer; }

/* Theme Presets (Pills) */
.sgf-theme-presets { display: flex; gap: 8px; }
.sgf-theme-pill {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid #fff; box-shadow: 0 0 0 1px #ccc;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: bold; transition: transform 0.2s;
}
.sgf-theme-pill:hover { transform: scale(1.1); z-index: 2; box-shadow: 0 0 0 2px #2271b1; }

.sgf-custom-colors { margin-left: auto; border-left: 1px solid #e0e0e0; padding-left: 20px; }
.sgf-color-pickers { display: flex; gap: 8px; }
input[type="color"] { border: 1px solid #ccc; width: 32px; height: 32px; padding: 0; cursor: pointer; background: #fff; border-radius: 4px; overflow: hidden; }

/* Preview Area */
.sgf-preview-area {
    min-height: 300px;
    background: #f0f0f1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    overflow: hidden;
    position: relative;
    border-top: 1px solid #e2e4e7;
}
.sgf-preview-img { max-width: 100%; height: auto; display: block; opacity: 0; transition: opacity 0.3s; }
.sgf-placeholder { margin-top: 120px; color: #a7aaad; font-size: 14px; }
.sgf-loader {
    position: absolute; right: 35px; bottom: 35px; width: 20px; height: 20px;
    border: 2px solid #e2e4e7; border-top: 2px solid #2271b1; border-radius: 50%;
    animation: spin 0.8s linear infinite; display: none;
}
@keyframes spin { 100% { transform: rotate(360deg); } }