:root {
    --bg-dark: #050505;
    --panel-bg: rgba(20, 20, 23, 0.75);
    --border: rgba(255, 255, 255, 0.08);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --success: #10b981;
    
    /* 导航栏配色 */
    --nav-main: #3b82f6;
    --nav-sec: #10b981;
    --nav-bg: #111;
    
    --mono-font: "JetBrains Mono", "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    margin: 0; padding: 20px;
    height: 100vh;
    display: flex; flex-direction: column;
    /* 背景网格 */
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    background-position: center top;
}

/* Header */
header { 
    text-align: center; margin-bottom: 30px; flex-shrink: 0; 
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
}

h1 { 
    margin: 0 0 15px 0; color: #fff; letter-spacing: -0.5px; font-weight: 700; font-size: 1.8rem;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* --- 胶囊流光导航动画 (PNG适配版) --- */
.pill-radio-container {
    --total-options: 2;
    display: flex; position: relative;
    background: var(--nav-bg);
    border-radius: 3rem;
    padding: 0.4rem;
    box-shadow: 0 0 20px #000 inset, 0 0 0 1px var(--border);
    width: 320px;
    margin: 0 auto;
}

.pill-radio-container input { display: none; }

.pill-radio-container .nav-label {
    flex: 1; position: relative;
    padding: 0.6rem 0;
    text-align: center; border-radius: 3rem;
    cursor: pointer; font-weight: 600; font-size: 14px;
    color: var(--text-muted);
    transition: color 0.3s ease-in-out;
    z-index: 2;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none;
}

.pill-radio-container input:checked + .nav-label { color: #fff; }
.pill-radio-container .nav-label:hover { color: var(--nav-main); }

/* 图片图标样式 */
.nav-icon { width: 18px; height: 18px; object-fit: contain; opacity: 0.8; transition: 0.3s; }
.pill-radio-container input:checked + .nav-label .nav-icon { opacity: 1; filter: brightness(1.2); }

.pill-indicator {
    position: absolute;
    bottom: 5px; left: 5px; top: 5px;
    width: calc((100% - 10px) / var(--total-options));
    background: linear-gradient(to right, var(--nav-main), var(--nav-sec));
    border-radius: 3rem;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1;
    opacity: 0.2;
    box-shadow: 0 0 15px var(--nav-main);
}

#pill-export:checked ~ .pill-indicator { transform: translateX(0%); opacity: 0.8; }
#pill-compare:checked ~ .pill-indicator { transform: translateX(100%); opacity: 0.8; }
/* ------------------------------------- */

/* 布局 */
.layout { display: flex; gap: 20px; flex: 1; min-height: 0; position: relative; z-index: 1; }

.panel-left, .panel-right {
    display: flex; flex-direction: column;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.panel-left { width: 420px; padding: 20px; }
.panel-right { flex: 1; padding: 25px; overflow-y: auto; }

/* 拖拽区域 */
.drop-zone {
    border: 2px dashed var(--border); 
    border-radius: 12px; padding: 30px;
    text-align: center; cursor: pointer; 
    background: rgba(0,0,0,0.2); 
    transition: all 0.3s ease;
    margin-bottom: 20px; flex-shrink: 0;
    color: var(--text-muted);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.drop-zone:hover { 
    border-color: var(--primary); 
    background: rgba(59, 130, 246, 0.05); 
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.1) inset;
}
/* 大图标控制 */
.drop-zone img { width: 48px; height: 48px; margin-bottom: 10px; opacity: 0.8; transition: 0.3s; object-fit: contain; }
.drop-zone:hover img { transform: scale(1.1); opacity: 1; }

/* 树形图区域 */
.tree-wrapper {
    flex: 1; overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px; padding: 15px;
    background: #080808; 
    font-family: var(--mono-font);
    font-size: 13px; line-height: 1.8;
}
.tree-header { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 12px; font-size: 0.85em; color: var(--text-muted); border-bottom: 1px solid var(--border); padding-bottom: 10px;
}

/* 树形图图标控制 */
.tree-line { white-space: pre; display: flex; align-items: center; }
.tree-icon { width: 14px; height: 14px; margin-right: 6px; opacity: 0.9; object-fit: contain; vertical-align: middle; }
.tree-name.folder { color: var(--primary); font-weight: 600; }
.tree-name.file { color: #d4d4d8; } 

/* 按钮与输入框 */
.setting-section { margin-bottom: 24px; }
.setting-label { 
    display: block; font-weight: 600; margin-bottom: 10px; font-size: 0.8em; 
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px;
}

.input-style, textarea, select { 
    width: 100%; padding: 12px 15px; 
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border); 
    color: var(--text-main);
    border-radius: 8px; font-family: inherit; font-size: 14px; 
    transition: 0.2s;
}
.input-style:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }

/* 按钮组 */
.action-bar { margin-top: auto; display: flex; gap: 15px; padding-top: 25px; border-top: 1px solid var(--border); }
.btn { 
    padding: 14px 24px; border: none; border-radius: 8px; 
    font-weight: 600; cursor: pointer; transition: 0.2s; flex: 1;
    font-size: 14px; letter-spacing: 0.5px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
/* 按钮图标控制 */
.btn img { width: 18px; height: 18px; object-fit: contain; }

.btn-primary { 
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%); 
    color: white; 
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5); }

.btn-secondary { 
    background: transparent; color: var(--success); 
    border: 1px solid var(--success); flex: 0.4; 
}
.btn-secondary:hover { background: rgba(16, 185, 129, 0.1); }

.btn-mini {
    background: transparent; border: none; color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; gap: 4px; font-size: 11px; padding: 4px 8px; border-radius: 4px;
}
.btn-mini img { width: 12px; height: 12px; object-fit: contain; opacity: 0.7; }
.btn-mini:hover { background: rgba(255,255,255,0.05); color: #fff; }
.btn-mini:hover img { opacity: 1; }

/* Checkboxes */
.checkbox-group { 
    display: flex; flex-direction: column; gap: 15px; 
    background: rgba(255,255,255,0.02); padding: 20px; 
    border-radius: 12px; border: 1px solid var(--border); 
}
.cb-item { display: flex; align-items: center; gap: 12px; font-size: 14px; cursor: pointer; color: var(--text-main); }
.cb-item input[type="checkbox"] { accent-color: var(--primary); width: 18px; height: 18px; }

/* 标签样式 */
.tags-input-container {
    display: flex; flex-wrap: wrap; gap: 8px;
    border: 1px solid var(--border); border-radius: 8px;
    padding: 8px; background: rgba(0,0,0,0.4); min-height: 48px;
}
.tag {
    background: #27272a; border: 1px solid var(--border);
    color: var(--text-main); font-size: 12px; padding: 4px 10px;
    border-radius: 6px; display: flex; align-items: center; gap: 6px;
}
.tag-close { cursor: pointer; color: #71717a; }
#ignoreInput { background: transparent; color: white; border: none; outline: none; flex: 1; padding: 4px; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 3px; }

/* 辅助 */
.hidden { display: none !important; }
.loader { border: 2px solid rgba(255,255,255,0.1); border-top: 2px solid #fff; border-radius: 50%; width: 14px; height: 14px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }