@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800&display=swap');

:root {
    --primary: #0f172a;
    --accent: #6366f1;
    --border: rgba(255, 255, 255, 0.1);
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --card-bg: rgba(255, 255, 255, 0.03);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
}

.navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    height: 60px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container { width: 100%; max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.nav-logo h2 { font-family: 'Outfit', sans-serif; font-size: 1.4rem; color: #fff; }
.nav-menu { list-style: none; display: flex; gap: 20px; }
.nav-link { text-decoration: none; color: var(--text-muted); font-weight: 500; transition: 0.3s; }
.nav-link:hover, .nav-link.active { color: white; }

/* Search Hero Section */
.search-hero {
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

.search-container { width: 100%; max-width: 800px; text-align: center; }
.search-header h1 { font-family: 'Outfit', sans-serif; font-size: 2.5rem; margin-bottom: 10px; }
.search-header p { color: var(--text-muted); margin-bottom: 15px; }

/* 数据库状态指示器 */
.db-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.status-indicator {
    font-size: 0.6rem;
    animation: pulse 2s ease-in-out infinite;
}

.db-status.loading .status-indicator {
    color: #fbbf24;
}

.db-status.ready .status-indicator {
    color: #10b981;
    animation: none;
}

.db-status.error .status-indicator {
    color: #ef4444;
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.search-box-wrapper { position: relative; width: 100%; }
#dbSearch {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 18px 25px;
    border-radius: 16px;
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

#dbSearch:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.trending-tags { margin-top: 20px; display: flex; gap: 10px; justify-content: center; align-items: center; }
.trending-tags span { font-size: 0.85rem; color: var(--text-muted); }
.trending-tags button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.3s;
}
.trending-tags button:hover { background: var(--accent); color: white; }

/* Suggestions */
.suggestions {
    position: absolute; 
    top: 100%; 
    left: 0; 
    width: 100%; 
    background: #1e293b; 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    margin-top: 5px;
    z-index: 10; 
    overflow: hidden; 
    display: none;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.suggestions.show {
    display: block;
}

.suggestion-item { 
    padding: 12px 20px; 
    cursor: pointer; 
    text-align: left; 
    display: flex; 
    flex-direction: column;
    gap: 5px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover { 
    background: var(--accent); 
}

.suggestion-item.highlighted {
    background: var(--accent);
}

.suggestion-item-secondary {
    background: rgba(255, 255, 255, 0.03);
}

.suggestion-item.no-results {
    color: var(--text-muted);
    cursor: default;
    text-align: center;
    padding: 20px;
}

.suggestion-item.no-results:hover {
    background: transparent;
}

.suggestion-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.suggestion-name {
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.suggestion-english {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.suggestion-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.suggestion-formula {
    color: var(--accent);
    font-weight: 500;
}

.suggestion-cas {
    color: var(--text-muted);
}

.suggestion-section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.suggestion-section-toggle {
    width: 100%;
    border: none;
    background: transparent;
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.2s;
}

.suggestion-section-toggle:hover {
    background: rgba(99, 102, 241, 0.16);
}

.suggestion-section-count {
    color: var(--accent);
    font-size: 0.82rem;
}

.suggestion-section-body {
    padding: 0 0 8px;
}

.suggestion-formula-group + .suggestion-formula-group {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-formula-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 8px;
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.suggestion-formula-title {
    color: var(--accent);
    font-weight: 700;
}

.suggestion-formula-count {
    color: var(--text-muted);
}

/* 高亮匹配文本 */
.suggestion-item mark {
    background: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.type-tag { font-size: 0.6rem; padding: 2px 5px; border-radius: 4px; margin-right: 8px; font-weight: 800; }
.local { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.cloud { background: rgba(99, 102, 241, 0.2); color: #818cf8; }
.remote { background: rgba(245, 158, 11, 0.2) !important; color: #f59e0b !important; }
.cloud-search { border-top: 1px solid rgba(255,255,255,0.05); background: rgba(99, 102, 241, 0.05); font-style: italic; }

/* Results Section */
.results-section { padding: 40px 20px; animation: slideUp 0.5s ease-out; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.results-container { max-width: 1600px; margin: 0 auto; background: var(--card-bg); border-radius: 24px; padding: 40px; border: 1px solid var(--border); backdrop-filter: blur(20px); }

.substance-header { margin-bottom: 40px; }
.title-group { display: flex; align-items: baseline; gap: 15px; flex-wrap: wrap; }
.title-group h2 { font-family: 'Outfit', sans-serif; font-size: 2.2rem; }
.title-group #res-formula { color: var(--accent); font-weight: 700; font-size: 1.2rem; }
.cas-tag { font-size: 0.9rem; background: rgba(99, 102, 241, 0.2); color: #818cf8; padding: 4px 10px; border-radius: 6px; }

.property-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 40px; }
.prop-card { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); padding: 20px; border-radius: 16px; }
.prop-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.prop-val { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; color: white; }
.prop-unit { font-size: 0.75rem; color: var(--text-muted); margin-left: 5px; }

/* 两列布局容器 */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 基本物性网格 - 在两列布局中调整 */
.two-column-layout .property-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 0;
}

/* 图表容器在右列中占满高度 */
.right-column .chart-box {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.right-column .chart-container {
    flex: 1;
    min-height: 500px;
}

.detail-panels { display: grid; grid-template-columns: 1fr; gap: 25px; }
.detail-box { background: rgba(0, 0, 0, 0.2); border-radius: 16px; padding: 25px; }
.detail-box h3 { font-size: 1rem; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.prop-list { list-style: none; }
.prop-list li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); color: #cbd5e1; font-size: 0.9rem; display: flex; justify-content: space-between; }
.prop-list li span { font-weight: 600; color: white; }

@media (max-width: 1200px) {
    .two-column-layout {
        grid-template-columns: 1fr;
    }
    
    .two-column-layout .property-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .detail-panels { grid-template-columns: 1fr; }
    .search-header h1 { font-size: 1.8rem; }
    
    .two-column-layout .property-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-controls {
        flex-direction: column;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group label {
        min-width: auto;
    }
}

/* 新增样式 - 专业物性数据库 */

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-export {
    background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* 全宽详细框 */
.detail-box.full-width {
    grid-column: 1 / -1;
    margin-top: 20px;
}

/* 方程参数显示 */
.equation-params {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.param-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.param-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 5px;
}

.param-value {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: #a5f3fc;
    font-weight: 600;
}

/* 温度计算器 */
.calculator-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
}

.calculator-box h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calc-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.calc-input-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.calc-input-group input[type="number"] {
    flex: 1;
    min-width: 150px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 10px 15px;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.calc-input-group input[type="number"]:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.calc-input-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 10px 15px;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    transition: all 0.3s;
}

.calc-input-group select:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.btn-calc {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-calc:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* 计算结果显示 */
.calc-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.calc-result-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-result-item span:first-child {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calc-result-item span:last-child {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #a5f3fc;
    font-weight: 600;
}

/* 温度范围警告样式 */
.warning-text {
    color: #fbbf24;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.extrapolated-value {
    color: #fbbf24;
    cursor: help;
    position: relative;
}

.extrapolated-value::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background: #fbbf24;
    opacity: 0.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-export {
        width: 100%;
    }
    
    .equation-params {
        grid-template-columns: 1fr;
    }
    
    .calc-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calc-input-group input[type="number"],
    .calc-input-group select,
    .btn-calc {
        width: 100%;
    }
    
    .calc-results {
        grid-template-columns: 1fr;
    }
}

/* 方程参数区域折叠功能 */
.equation-section {
    margin-top: 40px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.equation-section .section-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: all 0.3s;
    user-select: none;
}

.equation-section .section-title:hover {
    background: rgba(255, 255, 255, 0.06);
}

.toggle-icon {
    font-size: 1rem;
    transition: transform 0.3s;
    color: var(--accent);
}

.toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.equation-params-container {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.3s ease-out;
    opacity: 1;
}

.equation-params-container.collapsed {
    max-height: 0;
    opacity: 0;
}

/* 图表可视化 */
.chart-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 25px;
}

.chart-box h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.control-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.control-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    min-width: 80px;
}

.control-group input[type="number"],
.control-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 10px 15px;
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
    flex: 1;
    min-width: 120px;
}

.control-group input[type="number"]:focus,
.control-group select:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.control-group span {
    color: var(--text-muted);
}

.btn-chart {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    width: 100%;
}

.btn-chart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.chart-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    min-height: 400px;
}

.chart-container canvas {
    max-height: 500px;
}

@media (max-width: 768px) {
    .chart-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        width: 100%;
    }
    
    .btn-chart {
        width: 100%;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .search-hero,
    .action-buttons,
    .calculator-box {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .results-container {
        background: white;
        border: 1px solid #ccc;
    }
}


/* ==================== 加载状态和动画 ==================== */

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 加载指示器 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

/* 按钮加载状态 */
button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* 脉冲动画 */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ==================== 移动端适配 ==================== */

@media (max-width: 768px) {
    /* 导航栏 */
    .navbar {
        padding: 0 1rem;
        height: 50px;
    }
    
    .nav-logo h2 {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        gap: 10px;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    /* 搜索区域 */
    .search-hero {
        padding: 40px 15px;
    }
    
    .search-header h1 {
        font-size: 1.8rem;
    }
    
    .search-header p {
        font-size: 0.9rem;
    }
    
    /* 搜索框 */
    .search-box-wrapper input {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    /* 热门搜索 */
    .trending-tags {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .trending-tags button {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    /* 结果区域 */
    .results-container {
        padding: 20px 15px;
    }
    
    .substance-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .title-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .action-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-export {
        width: 100%;
    }
    
    /* 物性网格 */
    .property-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* 详情面板 */
    .detail-panels {
        grid-template-columns: 1fr;
    }
    
    /* 计算器 */
    .calc-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calc-input-group input,
    .calc-input-group select,
    .calc-input-group button {
        width: 100%;
    }
    
    /* 图表控制 */
    .chart-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group input,
    .control-group select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .search-header h1 {
        font-size: 1.5rem;
    }
    
    .prop-card {
        padding: 12px;
    }
    
    .prop-label {
        font-size: 0.85rem;
    }
    
    .prop-val {
        font-size: 1.3rem;
    }
}

/* ==================== 打印样式 ==================== */

@media print {
    .navbar,
    .action-buttons,
    .calc-input-group,
    .chart-controls,
    button {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .results-section {
        display: block !important;
    }
    
    .prop-card,
    .detail-box {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* ==================== 辅助功能优化 ==================== */

/* 焦点可见性 */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --primary: #000;
        --accent: #0000ff;
        --text-main: #fff;
        --border: #fff;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 深色模式优化（已经是深色，但添加变量支持） */
@media (prefers-color-scheme: light) {
    /* 如果需要浅色模式，可以在这里添加 */
}

/* ==================== 性能优化 ==================== */

/* GPU 加速 */
.suggestions,
.chart-container,
canvas {
    transform: translateZ(0);
    will-change: transform;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 图片优化 */
img {
    max-width: 100%;
    height: auto;
}
