/**
 * ETF 组合回测 的样式（原来写在模板的内联 <style> 里）
 *
 * 搬出来的原因：内联样式每次请求都跟着 HTML 重下，浏览器缓存不了。
 * 现在由 functions.php 的 xianer_page_styles() 按模板单独 enqueue，版本号走 filemtime。
 * 新增工具照 tools.css 头部那份约定来。
 */
.etf-container { max-width: 800px; margin: 0 auto; padding: 20px; }
.etf-card { background: rgba(255,255,255,0.6); border-radius: 16px; padding: 20px; margin-bottom: 15px; box-shadow: 0 2px 12px rgba(0,0,0,.1); backdrop-filter: blur(10px); }
html.dark .etf-card { background: rgba(0,0,0,0.3); box-shadow: 0 2px 12px rgba(0,0,0,.3); }
.etf-page-title { text-align: center; margin: 20px 0 30px; }
.etf-page-title h1 { font-size: 28px; font-weight: bold; margin-bottom: 8px; }
.etf-page-title p { font-size: 14px; opacity: 0.6; }
.etf-pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 15px 0; max-height: 300px; overflow-y: auto; padding: 5px; }
.etf-search { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); margin-bottom: 10px; }
.etf-search::placeholder { opacity: 0.5; }
.etf-pool-item { background: rgba(0,0,0,0.2); border-radius: 8px; padding: 12px; cursor: pointer; transition: all 0.3s; border: 2px solid transparent; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.etf-pool-item.selected { border-color: var(--hot-1); background: rgba(255,107,53,0.1); }
.etf-pool-item .info { flex: 1; min-width: 0; }
.etf-pool-item .name { font-size: 14px; font-weight: 500; }
.etf-pool-item .code { font-size: 12px; opacity: 0.6; margin-top: 2px; }
.etf-pool-item input[type="checkbox"] { flex-shrink: 0; }
.etf-section-title { font-size: 14px; opacity: 0.7; margin-bottom: 10px; }
.etf-years { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.etf-year-btn { padding: 12px; text-align: center; background: rgba(0,0,0,0.2); border-radius: 8px; cursor: pointer; transition: all 0.3s; }
.etf-year-btn.active { background: var(--hot-1); color: #1a1a1a; }
.etf-submit { width: 100%; padding: 16px; background: var(--hot-1); color: #1a1a1a; border: none; border-radius: 12px; font-size: 18px; font-weight: bold; cursor: pointer; }
.etf-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 20px 0; }
.etf-kpi { background: rgba(0,0,0,0.2); padding: 12px; border-radius: 8px; text-align: center; }
.etf-kpi-label { font-size: 12px; opacity: 0.6; margin-bottom: 5px; }
.etf-kpi-value { font-size: 20px; font-weight: bold; }
.etf-kpi-value.positive { color: var(--ok); }
.etf-kpi-value.negative { color: var(--danger); }
.etf-nav-chart { width: 100%; height: 300px; background: rgba(0,0,0,0.2); border-radius: 8px; padding: 10px; position: relative; overflow: hidden; }
.etf-nav-line { stroke: var(--hot-text); stroke-width: 2; fill: none; }
.etf-legend { display: flex; gap: 20px; font-size: 14px; margin-top: 10px; }
.etf-invest-type { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.etf-invest-btn { padding: 12px; text-align: center; background: rgba(0,0,0,0.2); border-radius: 8px; cursor: pointer; transition: all 0.3s; }
.etf-invest-btn.active { background: var(--hot-1); color: #1a1a1a; }
.etf-slider-row { margin-bottom: 20px; }
.etf-slider-label { display: flex; justify-content: space-between; margin-bottom: 8px; }
.etf-slider-value { color: var(--hot-text); font-weight: bold; font-size: 18px; }
.etf-slider { width: 100%; height: 6px; border-radius: 3px; background: var(--border); outline: none; -webkit-appearance: none; }
.etf-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.etf-rank-table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 13px; }
.etf-rank-table th, .etf-rank-table td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--border); }
.etf-rank-table th:first-child, .etf-rank-table td:first-child { text-align: center; width: 40px; }
.etf-rank-table th:nth-child(2), .etf-rank-table td:nth-child(2) { text-align: left; }
.etf-rank-table th { font-size: 12px; opacity: 0.6; font-weight: normal; }
.etf-rank-table tr.best { background: rgba(255,215,0,0.1); }
.etf-rank-table tr.best td { font-weight: bold; color: var(--ink); }
.etf-rank-table th.etf-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.etf-rank-table th.etf-sortable:hover { color: var(--hot-text); }
.etf-rank-table th.etf-sortable.active { color: var(--hot-text); }
.etf-sort-arrow { margin-left: 4px; font-size: 11px; }
.etf-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.etf-combo-desc { font-size: 13px; opacity: 0.7; margin-top: 10px; line-height: 1.6; }
@media (max-width: 768px) {
	.etf-container { padding: 15px; }
	.etf-page-title h1 { font-size: 22px; }
	.etf-card { padding: 15px; }
	.etf-pool-grid { grid-template-columns: repeat(2, 1fr); }
	.etf-kpi-grid { grid-template-columns: repeat(2, 1fr); }
	.etf-kpi-value { font-size: 16px; }
}
