/* ==================== Settings Window - 新设计 ==================== */

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-modal, 1000);
    backdrop-filter: blur(2px);
}

.settings-window-new {
    display: flex;
    width: 1100px;
    max-width: 95vw;
    height: 700px;
    max-height: 90vh;
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ==================== Left Sidebar ==================== */
.settings-sidebar-new {
    width: 220px;
    min-width: 220px;
    background: #252526;
    border-right: 1px solid #3c3c3c;
    display: flex;
    flex-direction: column;
}

.settings-sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #2d2d30;
    border-bottom: 1px solid #3c3c3c;
    font-size: 12px;
    color: #e0e0e0;
}

.settings-sidebar-header svg {
    color: #888;
}

.settings-sidebar-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-sidebar-close:hover {
    background: #3c3c3c;
    color: #e0e0e0;
}

.settings-sidebar-search {
    padding: 8px 12px;
    font-size: 11px;
    color: #888;
    border-bottom: 1px solid #3c3c3c;
}

.settings-sidebar-categories {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.settings-main-category {
    margin-bottom: 2px;
}

.settings-main-category-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #e0e0e0;
    cursor: pointer;
    user-select: none;
}

.settings-main-category-header:hover {
    background: #2d2d30;
}

.settings-main-category-header svg {
    color: #888;
    flex-shrink: 0;
}

.settings-sub-categories {
    padding-left: 12px;
}

.settings-sub-category {
    display: block;
    width: 100%;
    padding: 5px 12px 5px 18px;
    background: none;
    border: none;
    text-align: left;
    font-size: 11px;
    color: #999;
    cursor: pointer;
    transition: all 0.1s ease;
}

.settings-sub-category:hover {
    color: #e0e0e0;
    background: #2d2d30;
}

.settings-sub-category.active {
    color: #fff;
    background: #094771;
}

/* ==================== Right Content ==================== */
.settings-content-new {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.settings-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #2d2d30;
    border-bottom: 1px solid #3c3c3c;
}

.settings-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 400px;
    padding: 6px 12px;
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
}

.settings-search-bar svg {
    color: #666;
    flex-shrink: 0;
}

.settings-search-bar input {
    flex: 1;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 12px;
    outline: none;
}

.settings-search-bar input::placeholder {
    color: #666;
}

.settings-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.settings-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    border-radius: 4px;
}

.settings-icon-btn:hover {
    background: #3c3c3c;
    color: #e0e0e0;
}

.settings-action-btn {
    padding: 6px 12px;
    background: #3c3c3c;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.1s ease;
}

.settings-action-btn:hover {
    background: #4a4a4a;
}

/* ==================== Category Title Bar ==================== */
.settings-category-title-bar {
    padding: 12px 16px;
    background: #252526;
    border-bottom: 1px solid #3c3c3c;
}

.settings-category-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.settings-category-breadcrumb svg {
    color: #888;
}

.settings-breadcrumb-separator {
    color: #666;
}

.settings-category-desc {
    font-size: 11px;
    color: #888;
    margin: 4px 0 8px;
}

.settings-category-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.settings-category-action-btn {
    padding: 5px 12px;
    background: #3c3c3c;
    border: 1px solid #4a4a4a;
    border-radius: 3px;
    color: #e0e0e0;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.1s ease;
}

.settings-category-action-btn:hover {
    background: #4a4a4a;
}

/* ==================== Settings Sections ==================== */
.settings-sections-container {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.settings-section-new {
    border-bottom: 1px solid #3c3c3c;
}

.settings-section-header-new {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #e0e0e0;
    cursor: pointer;
    user-select: none;
    background: #2a2a2a;
}

.settings-section-header-new:hover {
    background: #333;
}

.settings-section-header-new svg {
    color: #888;
}

.settings-section-content-new {
    padding: 4px 0;
    background: #1e1e1e;
}

/* ==================== Settings Row ==================== */
.settings-row {
    display: flex;
    align-items: center;
    padding: 6px 16px 6px 28px;
    min-height: 32px;
}

.settings-row:hover {
    background: #252526;
}

.settings-row-label {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 200px;
    font-size: 11px;
    color: #999;
}

.settings-row-expand {
    color: #666;
    cursor: pointer;
}

.settings-row-value {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== Input Styles ==================== */
.settings-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #0078d4;
    cursor: pointer;
}

.settings-number-input,
.settings-text-input {
    width: 100%;
    max-width: 200px;
    padding: 4px 8px;
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    border-radius: 2px;
    color: #e0e0e0;
    font-size: 11px;
    outline: none;
}

.settings-number-input:focus,
.settings-text-input:focus {
    border-color: #0078d4;
}

.settings-number-input.error,
.settings-text-input.error {
    border-color: #f48771;
}

.settings-select {
    width: 100%;
    max-width: 200px;
    padding: 4px 8px;
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    border-radius: 2px;
    color: #e0e0e0;
    font-size: 11px;
    outline: none;
    cursor: pointer;
}

.settings-select:focus {
    border-color: #0078d4;
}

/* ==================== Range Input ==================== */
.settings-range {
    flex: 1;
    max-width: 150px;
    height: 4px;
    background: #3c3c3c;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.settings-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #0078d4;
    border-radius: 50%;
    cursor: pointer;
}

.settings-range-value {
    min-width: 40px;
    text-align: right;
    font-size: 11px;
    color: #999;
    font-family: monospace;
}

/* ==================== Color Input ==================== */
.settings-color-bar {
    width: 120px;
    height: 22px;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.settings-color-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ==================== Special Types ==================== */
.settings-plugin-list,
.settings-custom-renderer {
    padding: 8px 16px;
}

.settings-error {
    color: #f48771;
    font-size: 11px;
}

.settings-hint {
    color: #888;
    font-size: 11px;
}

/* ==================== Empty State ==================== */
.settings-empty-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    gap: 12px;
}

.settings-empty-new svg {
    opacity: 0.3;
}

.settings-empty-new p {
    font-size: 13px;
}

/* ==================== Scrollbar ==================== */
.settings-sidebar-categories::-webkit-scrollbar,
.settings-sections-container::-webkit-scrollbar {
    width: 8px;
}

.settings-sidebar-categories::-webkit-scrollbar-track,
.settings-sections-container::-webkit-scrollbar-track {
    background: transparent;
}

.settings-sidebar-categories::-webkit-scrollbar-thumb,
.settings-sections-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.settings-sidebar-categories::-webkit-scrollbar-thumb:hover,
.settings-sections-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
