.rbg-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.rbg-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rbg-section {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.rbg-section h3 {
    font-size: 0.9em;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rbg-section h3 i {
    color: #3498db;
}

.rbg-upload {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.rbg-upload:hover,
.rbg-upload.dragover {
    border-color: #3498db;
    background: #f0f7ff;
}

.rbg-upload i {
    font-size: 1.6em;
    color: #3498db;
    margin-bottom: 6px;
}

.rbg-upload p {
    color: #666;
    font-size: 0.8em;
    margin: 0 0 4px;
}

.rbg-hint {
    color: #999;
    font-size: 0.72em;
}

.rbg-mode-tabs {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 3px;
}

.rbg-mode-tab {
    flex: 1;
    padding: 7px 3px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 0.75em;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.rbg-mode-tab:hover {
    color: #334155;
}

.rbg-mode-tab.active {
    background: #fff;
    color: #3498db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.rbg-mode-panel {
    display: none;
    margin-top: 10px;
}

.rbg-mode-panel.active {
    display: block;
}

.rbg-form-row {
    margin-bottom: 12px;
}

.rbg-form-row label {
    display: block;
    font-size: 0.82em;
    color: #555;
    margin-bottom: 5px;
    font-weight: 500;
}

.rbg-select {
    width: 100%;
    padding: 7px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85em;
    background: #fff;
}

.rbg-form-row input[type="range"] {
    width: 100%;
    margin-top: 4px;
}

.rbg-color-preview {
    width: 100%;
    height: 36px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    color: #999;
}

.rbg-color-preview.has-color {
    border: 2px solid #3498db;
}

.rbg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rbg-btn {
    flex: 1;
    min-width: 70px;
    padding: 9px;
    border: none;
    border-radius: 8px;
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.rbg-btn-primary {
    background: #3498db;
    color: #fff;
}

.rbg-btn-primary:hover:not(:disabled) {
    background: #2980b9;
}

.rbg-btn-success {
    background: #27ae60;
    color: #fff;
}

.rbg-btn-success:hover:not(:disabled) {
    background: #219a52;
}

.rbg-btn-outline {
    background: #fff;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.rbg-btn-outline:hover:not(:disabled) {
    background: #fef2f2;
}

.rbg-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rbg-usage-info {
    background: #e8f4fd;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.8em;
    color: #2c3e50;
    text-align: center;
}

.rbg-usage-info i {
    color: #3498db;
    margin-right: 4px;
}

.rbg-vip-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(0,0,0,0.75);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    backdrop-filter: blur(2px);
}

.rbg-vip-mask-inner {
    text-align: center;
    color: #fff;
    padding: 30px;
}

.rbg-vip-mask-icon {
    font-size: 3em;
    margin-bottom: 12px;
}

.rbg-vip-mask-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 8px;
}

.rbg-vip-mask-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.rbg-vip-btn {
    background: #3498db;
    color: #fff;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.rbg-vip-btn:hover {
    background: #2980b9;
}

.rbg-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}

.rbg-preview-area {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rbg-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

.rbg-compare-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.rbg-compare-item canvas {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.rbg-compare-label {
    font-size: 0.85em;
    font-weight: 600;
    color: #64748b;
}

.rbg-placeholder {
    text-align: center;
    color: #999;
}

.rbg-placeholder i {
    font-size: 3em;
    margin-bottom: 12px;
    color: #bdc3c7;
}

.rbg-placeholder p {
    margin: 0;
}

.rbg-tips {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.rbg-tips h4 {
    font-size: 0.95em;
    color: #2c3e50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rbg-tips h4 i {
    color: #f39c12;
}

.rbg-tip-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.rbg-tip-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    border-left: 3px solid #3498db;
}

.rbg-tip-item strong {
    display: block;
    font-size: 0.85em;
    color: #2c3e50;
    margin-bottom: 3px;
}

.rbg-tip-item p {
    font-size: 0.75em;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .rbg-container { grid-template-columns: 1fr; }
    .rbg-tip-grid { grid-template-columns: 1fr; }
    .rbg-compare { grid-template-columns: 1fr; }
}
