/* 引用 main.css 的变量 */

/* --- 顶部导航动画 (Pill Style) --- */
.pill-radio-container {
    --main-color: #3b82f6;      /* 科技蓝 */
    --secondary-color: #10b981; /* 霓虹绿 */
    --text-color: #94a3b8;      /* 灰色文本 */
    --pill-bg: #111;            /* 深黑背景 */
    --total-options: 2;         /* 只有两个选项 */
  
    display: flex;
    position: relative;
    background: var(--pill-bg);
    border-radius: 3rem;
    padding: 0.5rem;
    margin: 20px auto 30px auto; /* 居中 */
    box-shadow: 0 0 20px rgba(0,0,0,0.5) inset, 0 0 0 1px rgba(255,255,255,0.1);
    width: 320px; /* 固定宽度以保证动画对其 */
}
  
.pill-radio-container input { display: none; }
  
.pill-radio-container 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-color);
    transition: color 0.3s ease-in-out;
    z-index: 2;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

.pill-radio-container label:hover { color: #fff; }
.pill-radio-container input:checked + label { color: #fff; }

.nav-icon { width: 16px; height: 16px; opacity: 0.8; object-fit: contain; }
.pill-radio-container input:checked + 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(--main-color), var(--secondary-color));
    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(--main-color);
}

/* 动画逻辑：根据 ID 判断位置 */
/* 选项1 (Export) 被选中时，滑块在左侧 (0%) */
#pill-export:checked ~ .pill-indicator { transform: translateX(0%); opacity: 0.8; }
/* 选项2 (Compare) 被选中时，滑块在右侧 (100%) */
#pill-compare:checked ~ .pill-indicator { transform: translateX(100%); opacity: 0.8; }

/* ------------------------------------- */

.subtitle {
    text-align: center; color: var(--text-muted); font-size: 0.9em; margin-top: -20px; margin-bottom: 20px;
}

/* 控制栏布局优化：左右对齐 */
.compare-controls {
    display: flex; 
    justify-content: space-between; /* 关键：两端对齐 */
    align-items: center;
    margin-bottom: 20px; 
    padding: 0 5px;
}

/* 图例 */
.legend {
    font-size: 12px; color: var(--text-muted);
    display: inline-flex; gap: 20px; 
    background: rgba(0,0,0,0.3); padding: 8px 20px; 
    border-radius: 20px; border: 1px solid var(--border);
}
.status-item { display: flex; align-items: center; gap: 8px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: block; }
.dot.green { background: var(--success); box-shadow: 0 0 6px var(--success); }
.dot.yellow { background: #eab308; box-shadow: 0 0 6px #eab308; }
.dot.red { background: #ef4444; box-shadow: 0 0 6px #ef4444; }

/* 添加按钮右置优化 */
.btn-add {
    font-size: 13px; padding: 8px 20px;
    background: rgba(59, 130, 246, 0.1); color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 30px;
    cursor: pointer; transition: 0.3s;
    display: inline-flex; align-items: center; gap: 8px;
    height: 36px;
}
.btn-add img { width: 14px; height: 14px; }
.btn-add:hover { 
    background: var(--primary); color: #fff; 
    box-shadow: 0 0 15px var(--primary-glow); border-color: var(--primary);
}

/* 网格系统 */
.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    height: calc(100vh - 220px);
}

.compare-col {
    background: rgba(20, 20, 23, 0.7);
    border: 1px solid var(--border);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 15px;
    display: flex; flex-direction: column;
    overflow: hidden;
    transition: 0.3s;
}
.compare-col:hover { border-color: rgba(255,255,255,0.2); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }

/* 列标题 */
.col-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.col-title-group { display: flex; align-items: center; gap: 8px; }
.col-icon { width: 18px; height: 18px; opacity: 0.7; }
.col-title { font-weight: 600; font-size: 0.9em; color: var(--text-main); font-family: var(--mono-font); }

/* 移除按钮图标化 */
.btn-icon-only {
    background: transparent; border: none; padding: 4px;
    cursor: pointer; opacity: 0.5; transition: 0.2s;
    border-radius: 4px;
}
.btn-icon-only img { width: 16px; height: 16px; display: block; }
.btn-icon-only:hover { opacity: 1; background: rgba(239, 68, 68, 0.1); }

/* 上传区域 */
.drop-zone-mini {
    border: 1px dashed var(--border);
    border-radius: 8px;
    height: 90px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.2);
    cursor: pointer; margin-bottom: 12px;
    transition: 0.2s;
}
.dz-content { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.drop-zone-mini img { width: 28px; height: 28px; opacity: 0.6; transition: 0.3s; }
.dz-text { font-size: 12px; color: var(--text-muted); }

.drop-zone-mini:hover { background: rgba(59, 130, 246, 0.1); border-color: var(--primary); }
.drop-zone-mini:hover img { opacity: 1; transform: scale(1.1); }
.drop-zone-mini:hover .dz-text { color: var(--primary); }

/* 树形图区域 */
.compare-tree {
    flex: 1;
    border: 1px solid #222;
    background: #050505;
    border-radius: 6px;
}
.empty-state {
    height: 100%; display: flex; align-items: center; justify-content: center;
    color: #444; user-select: none;
}