/* public/assets/css/tools/dev/yaml-json-converter.css */
.yj-workspace {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.yj-control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-body);
}

/* 优雅的模式切换 Radio Button */
.yj-mode-switch {
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.yj-mode-switch input[type="radio"] {
    display: none;
}

.yj-switch-label {
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.yj-mode-switch input[type="radio"]:checked + .yj-switch-label {
    background: var(--primary-color);
    color: #fff;
}

.yj-actions {
    display: flex;
    gap: 12px;
}

.yj-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.yj-btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb, 0, 102, 204), 0.2);
}

.yj-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.yj-btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.yj-btn-secondary:hover {
    background: rgba(0,0,0,0.05);
}

.yj-error-msg {
    padding: 12px 24px;
    background: #fef2f2;
    color: #ef4444;
    border-bottom: 1px solid #fecaca;
    font-size: 0.95rem;
    font-weight: 500;
}

[data-theme="dark"] .yj-error-msg { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); }

/* 双栏编辑器排版 */
.yj-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

@media (max-width: 768px) {
    .yj-editor-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

.yj-editor-pane {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.yj-editor-pane:last-child {
    border-right: none;
}

@media (max-width: 768px) {
    .yj-editor-pane { border-right: none; border-bottom: 1px solid var(--border-color); }
    .yj-editor-pane:last-child { border-bottom: none; }
}

.yj-pane-header {
    padding: 10px 16px;
    background: rgba(var(--primary-rgb, 0, 102, 204), 0.03);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.yj-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.yj-icon-btn:hover { color: var(--primary-color); }

.yj-textarea {
    flex: 1;
    width: 100%;
    min-height: 300px;
    padding: 16px;
    border: none;
    background: var(--bg-surface);
    color: var(--text-main);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: none;
    outline: none;
}

.yj-output-area {
    background: var(--bg-body);
}

/* Toast 提示 */
.yj-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translate(-50%, -20px);
    background: #10b981;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 9999;
}

.yj-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
}