/* ==========================================
   DCDC BUCK 设计中心 - 专业样式表 v3.2
   ========================================== */

/* ===== 图标系统 (替代Font Awesome) ===== */
/* 使用Unicode符号替代Font Awesome图标 */
.fas, .far, .fab {
    font-style: normal;
    font-weight: normal;
    display: inline-block;
    line-height: 1;
}

.fa-bolt::before { content: "⚡"; }
.fa-calculator::before { content: "🧮"; }
.fa-database::before { content: "💾"; }
.fa-code-branch::before { content: "🔀"; }
.fa-chevron-down::before { content: "▼"; font-size: 0.8em; }
.fa-chevron-up::before { content: "▲"; font-size: 0.8em; }
.fa-check::before { content: "✓"; }
.fa-check-circle::before { content: "✅"; }
.fa-times::before { content: "✕"; }
.fa-exclamation-circle::before { content: "⚠️"; }
.fa-exclamation-triangle::before { content: "⚠"; }
.fa-info-circle::before { content: "ℹ️"; }
.fa-lightbulb::before { content: "💡"; }
.fa-download::before { content: "⬇"; }
.fa-print::before { content: "🖨"; }
.fa-search::before { content: "🔍"; }
.fa-filter::before { content: "⚙"; }
.fa-arrow-right::before { content: "→"; }
.fa-arrow-down::before { content: "↓"; }
.fa-plug::before { content: "🔌"; }
.fa-car::before { content: "🚗"; }
.fa-industry::before { content: "🏭"; }
.fa-mobile-alt::before { content: "📱"; }
.fa-microchip::before { content: "💻"; }
.fa-magnet::before { content: "🧲"; }
.fa-magic::before { content: "✨"; }
.fa-book::before { content: "📚"; }
.fa-graduation-cap::before { content: "🎓"; }
.fa-comments::before { content: "💬"; }
.fa-github::before { content: "📦"; }
.fa-file-pdf::before { content: "📄"; }
.fa-clipboard-check::before { content: "📋"; }
.fa-chart-line::before { content: "📈"; }
.fa-chart-area::before { content: "📊"; }
.fa-border-all::before { content: "⊞"; }
.fa-envelope::before { content: "✉"; }
.fa-bars::before { content: "☰"; }

/* CSS变量定义 */
:root {
    --primary-color: #1976D2;
    --secondary-color: #1e3a5f;
    --accent-color: #FF6F00;
    --success-color: #388E3C;
    --warning-color: #F57C00;
    --danger-color: #D32F2F;
    --bg-color: #FAFAFA;
    --text-color: #212121;
    --text-secondary: #757575;
    --border-color: #E0E0E0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background-color: #F5F5F5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    color: #C7254E;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1565C0;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #303030;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-info {
    background-color: var(--primary-color);
    color: white;
}

/* 导航栏 */
.navbar {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 20px 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    padding-bottom: 0.3rem;
}

.nav-brand i {
    font-size: 1.2rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    flex-wrap: nowrap;
    overflow: hidden;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 2px 0 0;
    width: 100%;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    padding: 5px 2px;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    color: white;
    padding: 80px 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(255,255,255,0.1);
    padding: 12px;
    border-radius: 8px;
}

.hero-feature i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.hero-diagram {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
}

.circuit-diagram {
    width: 100%;
    height: auto;
}

.diagram-label {
    font-family: Arial, sans-serif;
    font-size: 16px;
    fill: var(--text-color);
    font-weight: 600;
}

.diagram-caption {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-color);
    font-size: 0.875rem;
}

/* 原理区域 */
.principle-section {
    padding: 80px 0;
    background-color: white;
}

.principle-section h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.principle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.principle-card {
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: var(--transition);
}

.principle-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.principle-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #42A5F5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.principle-icon i {
    font-size: 1.75rem;
    color: white;
}

.principle-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.formula {
    background-color: #F5F5F5;
    padding: 12px;
    border-left: 4px solid var(--primary-color);
    font-family: 'Consolas', monospace;
    font-size: 1.1rem;
    margin: 1rem 0;
    color: var(--text-color);
}

.formula-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

.efficiency-bar {
    width: 100%;
    height: 40px;
    background-color: #E0E0E0;
    border-radius: 20px;
    overflow: hidden;
    margin: 1rem 0;
}

.efficiency-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), #66BB6A);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    transition: width 1s ease;
}

.app-list {
    list-style: none;
    padding-left: 0;
}

.app-list li::before {
    content: "✓ ";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 8px;
}

/* 应用场景 */
.applications-section {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.applications-section h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.app-table-container {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.app-table {
    width: 100%;
    border-collapse: collapse;
}

.app-table thead {
    background-color: var(--primary-color);
    color: white;
}

.app-table th,
.app-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.app-table tbody tr:hover {
    background-color: #F5F5F5;
}

.app-table i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* 计算器区域 */
.calculator-section {
    padding: 80px 0;
    background-color: white;
}

.calculator-section h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.calculator-inputs,
.calculator-results {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.calculator-inputs h3,
.calculator-results h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-unit input {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
}

.input-with-unit input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.unit {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 40px;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    margin-top: 8px;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.calculator-inputs .btn {
    width: 100%;
    margin-top: 1rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 2rem;
}

.result-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.result-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.result-unit {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.result-notes {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 1rem;
}

.result-notes h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.result-notes ul {
    list-style-position: inside;
}

.result-notes li {
    padding: 5px 0;
    color: var(--text-color);
}

.result-actions {
    display: flex;
    gap: 10px;
}

.result-actions .btn {
    flex: 1;
}

/* 波形可视化 */
.waveform-container {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.waveform-container h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

#waveformCanvas {
    display: block;
    max-width: 100%;
    height: auto;
    background-color: white;
    border-radius: 8px;
    margin: 0 auto;
}

.waveform-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.waveform-legend span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
}

.legend-color {
    display: inline-block;
    width: 30px;
    height: 4px;
    border-radius: 2px;
}

/* 设计指南 */
.design-guide-section {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.design-guide-section h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.guide-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.guide-content {
    background-color: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

.mode-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 3rem;
}

.mode-card {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: var(--transition);
}

.mode-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.mode-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.mode-card h4 i {
    margin-right: 8px;
}

.mode-card p {
    margin-bottom: 0.5rem;
}

.formula-box {
    background-color: #F5F5F5;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin: 1rem 0;
    border-radius: 4px;
}

.formula-box code {
    display: block;
    background-color: transparent;
    padding: 5px 0;
    font-size: 1rem;
    color: var(--text-color);
}

.formula-box p,
.formula-box ul {
    margin-top: 10px;
    font-size: 0.875rem;
}

.formula-box .note {
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 8px;
}

.performance-grid {
    display: grid;
    gap: 30px;
}

.perf-card {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
}

.perf-card h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.perf-card h5 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.1rem;
}

.perf-card ul {
    list-style-position: inside;
}

.perf-card li {
    padding: 5px 0;
}

/* 工作流程 */
.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.workflow-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #42A5F5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step-content {
    flex: 1;
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
}

.step-content h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.checklist {
    list-style: none;
    padding-left: 0;
}

.checklist li {
    padding: 6px 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checklist input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.decision-tree {
    background-color: #E3F2FD;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.note-box {
    background-color: #FFF3E0;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid var(--accent-color);
    margin-top: 1rem;
}

.note-box i {
    color: var(--accent-color);
    margin-right: 8px;
}

/* 计算方法 */
.calc-section {
    margin-bottom: 3rem;
}

.calc-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.formula-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.formula-item {
    background-color: var(--bg-color);
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.formula-name {
    font-weight: 600;
    color: var(--secondary-color);
    display: block;
    margin-bottom: 8px;
}

.calc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.calc-table thead {
    background-color: var(--secondary-color);
    color: white;
}

.calc-table th,
.calc-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.calc-table tbody tr:hover {
    background-color: var(--bg-color);
}

.calc-example {
    background-color: #E8F5E9;
    border-radius: 8px;
    padding: 25px;
    border-left: 4px solid var(--success-color);
}

.calc-example h4 {
    color: var(--success-color);
    margin-bottom: 1rem;
}

.example-box {
    background-color: white;
    padding: 20px;
    border-radius: 6px;
    margin-top: 1rem;
}

.example-box h5 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.example-box ol {
    margin-left: 20px;
}

.example-box li {
    padding: 5px 0;
}

.highlight {
    background-color: #FFEB3B;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
}

/* PCB布局 */
.pcb-principles {
    margin-bottom: 3rem;
}

.principle-box {
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 2rem;
}

.principle-box.critical {
    background-color: #FFEBEE;
    border-left: 4px solid var(--danger-color);
}

.principle-box h4 {
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.principle-box i {
    margin-right: 8px;
}

.hotloop-diagram {
    background-color: white;
    padding: 20px;
    border-radius: 6px;
    margin-top: 1rem;
}

.loop-path {
    background-color: #FFF3E0;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    font-size: 0.95rem;
    margin: 1rem 0;
}

.warning {
    color: var(--danger-color);
    font-weight: 600;
    margin-top: 1rem;
}

.warning i {
    margin-right: 8px;
}

.pcb-guidelines {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 3rem;
}

.guideline-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
    border-top: 4px solid var(--primary-color);
}

.guideline-card h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.guideline-card ol {
    margin-left: 20px;
}

.guideline-card li {
    padding: 6px 4px;
}

.ground-strategy {
    margin-top: 1rem;
}

.ground-strategy p {
    padding: 6px 4px;
}

.pcb-checklist {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 25px;
}

.pcb-checklist h4 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.pcb-checklist h4 i {
    color: var(--success-color);
    margin-right: 8px;
}

.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background-color: white;
    border-radius: 6px;
    transition: var(--transition);
}

.checklist-item:hover {
    box-shadow: var(--shadow);
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checklist-item label {
    cursor: pointer;
    flex: 1;
}

/* 元件选择 */
.components-section {
    padding: 80px 0;
    background-color: white;
}

.components-section h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.component-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.comp-tab-btn {
    padding: 12px 24px;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
}

.comp-tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.comp-tab-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.comp-content {
    display: none;
}

.comp-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.selection-criteria {
    margin-bottom: 3rem;
}

.criteria-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 25px;
    border-left: 4px solid var(--primary-color);
}

.criteria-card h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.criteria-card ul {
    list-style-position: inside;
}

.criteria-card li {
    padding: 6px 4px;
}

/* IC数据库 */
.ic-database {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 30px;
}

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-input,
.filter-select {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-select {
    min-width: 150px;
}

/* 表格滚动容器 */
.table-container {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: white;
    position: relative;
    margin-top: 20px;
}

/* 美化滚动条 */
.table-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.component-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.component-table thead {
    background-color: var(--secondary-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.component-table th,
.component-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.component-table tbody tr:hover {
    background-color: var(--bg-color);
}

.component-table strong {
    color: var(--primary-color);
}

/* MOSFET损耗计算 */
.mosfet-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 3rem;
}

.mosfet-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
    border-top: 4px solid var(--accent-color);
}

.mosfet-card h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.mosfet-loss-calc {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 30px;
}

.loss-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.loss-results h4 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.chart-container {
    max-width: 400px;
    margin: 0 auto 2rem auto;
}

.loss-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.loss-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background-color: white;
    border-radius: 6px;
    font-weight: 500;
}

.loss-item.total {
    background-color: var(--primary-color);
    color: white;
    font-size: 1.1rem;
}

/* 电感器 */
.inductor-types {
    margin-bottom: 3rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.comparison-table thead {
    background-color: var(--primary-color);
    color: white;
}

.comparison-table th,
.comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table tbody tr:hover {
    background-color: var(--bg-color);
}

.inductor-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 3rem;
}

.spec-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
    border-top: 4px solid var(--success-color);
}

.spec-card h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.spec-card h4 i {
    color: var(--success-color);
    margin-right: 8px;
}

.inductor-recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.rec-category {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
}

.rec-category h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.rec-category ul {
    list-style: none;
    padding-left: 0;
}

.rec-category li {
    padding: 6px 4px;
    border-bottom: 1px solid var(--border-color);
}

.rec-category li:last-child {
    border-bottom: none;
}

/* 电容 */
.capacitor-guide {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.cap-section {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 25px;
}

.cap-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.cap-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.cap-table thead {
    background-color: var(--secondary-color);
    color: white;
}

.cap-table th,
.cap-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.cap-table .recommended {
    background-color: #E8F5E9;
}

.cap-table .acceptable {
    background-color: #FFF9C4;
}

.cap-table .avoid {
    background-color: #FFEBEE;
}

.cap-table i.fa-check-circle {
    color: var(--success-color);
}

.cap-table i.fa-check {
    color: var(--warning-color);
}

.cap-table i.fa-times-circle {
    color: var(--danger-color);
}

.warning-box {
    background-color: #FFF3E0;
    border-left: 4px solid var(--accent-color);
}

.warning-box h4 {
    color: var(--accent-color);
}

.warning-box h4 i {
    margin-right: 8px;
}

.bias-example {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    margin: 1rem 0;
}

.recommendation {
    margin-top: 1rem;
}

.recommendation ul {
    list-style-position: inside;
    margin-top: 0.5rem;
}

.electrolytic-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.elec-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
    border-top: 4px solid var(--warning-color);
}

.elec-card h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* 案例研究 */
.case-studies-section {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.case-studies-section h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
}

.case-card {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.case-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.case-header {
    margin-bottom: 1.5rem;
}

.case-tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.case-tag.automotive {
    background-color: #E3F2FD;
    color: var(--primary-color);
}

.case-tag.industrial {
    background-color: #FFF3E0;
    color: var(--accent-color);
}

.case-tag.high-performance {
    background-color: #F3E5F5;
    color: #9C27B0;
}

.case-tag.consumer {
    background-color: #E8F5E9;
    color: var(--success-color);
}

.case-header h3 {
    color: var(--secondary-color);
}

.case-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
}

.spec-item i {
    color: var(--primary-color);
}

.case-content h4 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem 0;
}

.case-content ul {
    list-style-position: inside;
}

.case-content li {
    padding: 5px 0;
}

.test-results {
    background-color: var(--bg-color);
    padding: 15px;
    border-radius: 6px;
    margin-top: 1rem;
}

.result-bar {
    margin-bottom: 15px;
}

.result-bar span:first-child {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.bar {
    width: 100%;
    height: 30px;
    background-color: var(--border-color);
    border-radius: 15px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), #66BB6A);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    transition: width 1s ease;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 4px;
    border-bottom: 1px solid var(--border-color);
}

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

.multiphase-benefit {
    background-color: #E3F2FD;
    padding: 15px;
    border-radius: 6px;
    margin: 1rem 0;
}

.ultra-low-noise {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.noise-result {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: white;
    border-radius: 6px;
}

.noise-result.success {
    background-color: #E8F5E9;
}

.noise-result strong {
    color: var(--primary-color);
}

.case-detail-btn {
    width: 100%;
    margin-top: 1.5rem;
}

/* FAQ */
.faq-section {
    padding: 80px 0;
    background-color: white;
}

.faq-section h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.faq-question {
    width: 100%;
    padding: 20px;
    background-color: white;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    transition: var(--transition);
    text-align: left;
}

.faq-question:hover {
    background-color: var(--bg-color);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 2000px;
    padding: 20px;
}

.faq-answer h4 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem 0;
}

.faq-answer ol {
    margin-left: 20px;
}

.faq-answer li {
    padding: 5px 0;
}

.faq-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.faq-table th,
.faq-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.faq-table th {
    background-color: var(--secondary-color);
    color: white;
    font-weight: 600;
}

.troubleshoot-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.troubleshoot-table th,
.troubleshoot-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.troubleshoot-table th {
    background-color: var(--warning-color);
    color: white;
}

.cause-solution {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 1rem 0;
}

.cause-item {
    background-color: #F5F5F5;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.cause-item h5 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.diagnostic-flow {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.diag-step {
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--success-color);
}

.diag-step h5 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.diag-step h5 i {
    color: var(--success-color);
    margin-right: 8px;
}

.diag-step ul {
    margin-left: 20px;
}

.common-issue {
    background-color: #FFF3E0;
    padding: 10px;
    border-radius: 4px;
    margin-top: 1rem;
    font-style: italic;
}

.emi-solutions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.emi-category {
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    border-top: 4px solid var(--accent-color);
}

.emi-category h5 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.emi-category ul {
    list-style-position: inside;
}

/* 资源中心 */
.resources-section {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.resources-section h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.resource-category {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.resource-category:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.resource-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.resource-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.resource-header h3 {
    color: var(--secondary-color);
    margin: 0;
}

.resource-list {
    list-style: none;
    padding-left: 0;
}

.resource-list li {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.resource-list li:last-child {
    border-bottom: none;
}

.resource-list strong {
    display: block;
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-size: 1.05rem;
}

.resource-list p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.resource-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
}

.resource-link:hover {
    color: var(--accent-color);
}

.resource-link i {
    margin-right: 5px;
}

/* 页脚 */
.footer { background-color: #1e3a5f; color: #e8edf5; padding: 60px 0 30px 0; }

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
}

.copyright {
    font-size: 0.875rem;
    margin-top: 1rem;
}

.footer-links {
    list-style: none;
    padding-left: 0;
}

.footer-links li {
    padding: 6px 4px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-links i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
    }

    .calculator-container {
        grid-template-columns: 1fr;
    }

    .mosfet-loss-calc {
        grid-template-columns: 1fr;
    }

    .case-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    flex-wrap: nowrap;
    overflow: hidden;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 2px 0 0;
    width: 100%;
}

    .nav-menu.active {
        max-height: 500px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .principle-grid {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .guide-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .mode-cards {
        grid-template-columns: 1fr;
    }

    .workflow-step {
        flex-direction: column;
    }

    .component-tabs {
        flex-direction: column;
    }

    .comp-tab-btn {
        width: 100%;
    }

    .filter-bar {
        flex-direction: column;
    }

    .search-input,
    .filter-select {
        width: 100%;
    }

    .case-specs {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 40px 0 !important;
    }

    .app-table-container {
        padding: 15px;
    }

    .app-table {
        font-size: 0.875rem;
    }

    .app-table th,
    .app-table td {
        padding: 10px 8px;
    }

    .calculator-inputs,
    .calculator-results {
        padding: 20px;
    }

    .guide-content {
        padding: 20px;
    }

    .case-card {
        padding: 20px;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .footer,
    .btn,
    .nav-toggle {
        display: none;
    }

    body {
        background-color: white;
    }

    .container {
        max-width: 100%;
    }
}
/* ==========================================
   芯片推荐系统样式
   ========================================== */

.chip-recommendation-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
}

.chip-recommendation-section h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.recommendation-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.chip-search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.chip-search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.chip-search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.recommended-chips-container {
    min-height: 200px;
}

.placeholder-text {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.1rem;
}

.chip-recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.chip-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.chip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.chip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.chip-header h4 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.chip-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.chip-manufacturer {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.chip-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.chip-specs div {
    color: #444;
}

.chip-features {
    margin: 15px 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.8;
}

.chip-card .btn-small {
    margin-top: 15px;
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .chip-recommendations {
        grid-template-columns: 1fr;
    }
    
    .recommendation-controls {
        flex-direction: column;
    }
    
    .chip-search-box {
        width: 100%;
    }
}

/* 控制模式样式 */
.control-mode-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
    margin-bottom: 3rem;
}

.control-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
}

.control-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15);
    transform: translateY(-2px);
}

.control-card.highlight {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
}

.control-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.control-card h4 i {
    margin-right: 10px;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 15px 0;
}

.pros, .cons {
    padding: 15px;
    border-radius: 8px;
}

.pros {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.cons {
    background: #ffebee;
    border-left: 4px solid #f44336;
}

.pros h5, .cons h5 {
    margin-top: 0;
    font-size: 1rem;
}

.pros ul, .cons ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.pros li, .cons li {
    margin: 5px 0;
    font-size: 0.9rem;
}

.selection-guide {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.comparison-table th,
.comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.comparison-table th {
    background: var(--secondary-color);
    color: white;
    font-weight: 600;
}

.comparison-table tbody tr:hover {
    background: #f5f5f5;
}

.comparison-table .highlight-row {
    background: #e3f2fd;
}

.comparison-table .highlight-row:hover {
    background: #bbdefb;
}

@media (max-width: 768px) {
    .control-mode-section {
        grid-template-columns: 1fr;
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }
}

/* ===== 布局优化 ===== */

/* 推荐芯片网格优化 */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* 改进芯片卡片布局 */
.chip-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.chip-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

.chip-specs {
    flex: 1;
    margin: 15px 0;
}

.chip-specs > div {
    padding: 6px 4px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chip-specs > div:last-child {
    border-bottom: none;
}

/* 制造商标签优化 */
.chip-manufacturer {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* 国产芯片特殊标识 */
.chip-card[data-country="中国"] .chip-manufacturer::after {
    content: "🇨🇳";
    margin-left: 5px;
}

/* 特性标签优化 */
.chip-features {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

/* 表格优化 */
.component-table {
    font-size: 14px;
}

.component-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 15px 10px !important;
}

.component-table td {
    padding: 12px 10px !important;
    vertical-align: middle;
}

.component-table tbody tr:hover {
    background-color: #f8f9ff !important;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* 筛选器布局优化 */
.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* 计算器输入框优化 */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.1);
}

/* 错误提示样式 */
.input-error {
    border-color: #f44336 !important;
    background-color: #ffebee;
}

.error-message {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.error-message::before {
    content: "⚠";
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(25, 118, 210, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 空状态提示 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* 统计信息卡片 */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stats-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    opacity: 0.9;
}

.stats-card .stat-value {
    font-size: 36px;
    font-weight: bold;
    margin: 0;
}

.stats-card .stat-label {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 5px;
}

/* 改进响应式 */
@media (max-width: 1200px) {
    .recommendations-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .recommendations-grid {
        grid-template-columns: 1fr;
    }

    .chip-specs {
        font-size: 13px;
    }

    .table-container {
        max-height: 400px;
    }

    .component-table {
        font-size: 12px;
    }

    .component-table th,
    .component-table td {
        padding: 8px 6px !important;
    }
}

/* 推荐结果头部 */
.recommendation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.recommendation-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.recommendation-actions {
    display: flex;
    gap: 10px;
}

.recommendation-actions .btn-small {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 芯片卡片按钮组 */
.chip-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.chip-actions .btn-small {
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

/* 芯片参数显示优化 */
.chip-specs > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chip-specs > div span {
    color: #666;
    font-size: 13px;
}

.chip-specs > div strong {
    color: #333;
    font-weight: 600;
}

/* 打印样式优化 */
@media print {
    .navbar, .hero-cta, .btn, button, .recommendation-actions {
        display: none !important;
    }

    .chip-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 10px;
    }

    .chip-actions {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    .recommendations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .recommendation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .recommendation-actions {
        width: 100%;
    }

    .recommendation-actions .btn-small {
        flex: 1;
        justify-content: center;
    }
}

/* ===== FAQ新增样式 ===== */

/* 厂商卡片 */
.manufacturer-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.mfg-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #1976D2;
}

.mfg-card h6 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #1976D2;
}

.mfg-card p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

/* 提示框 */
.tip-box {
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tip-box i {
    color: #2196F3;
    font-size: 24px;
}

/* 推荐框 */
.recommendation-box {
    background: #f1f8e9;
    border-left: 4px solid #8bc34a;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 4px;
}

.recommendation-box p {
    margin: 10px 0;
    line-height: 1.8;
}

/* 警告框 */
.warning-box {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.warning-box i {
    color: #ff9800;
    margin-right: 8px;
}

.warning-box ul {
    margin: 10px 0;
    padding-left: 20px;
}

.warning-box li {
    margin: 8px 0;
    line-height: 1.6;
}

/* 布局优先级 */
.layout-priority {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.priority-item {
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid;
}

.priority-item.critical {
    background: #ffebee;
    border-left-color: #f44336;
}

.priority-item.critical h5 {
    color: #c62828;
}

.priority-item.important {
    background: #fff8e1;
    border-left-color: #ffc107;
}

.priority-item.important h5 {
    color: #f57f17;
}

.priority-item.optional {
    background: #e8f5e9;
    border-left-color: #4caf50;
}

.priority-item.optional h5 {
    color: #2e7d32;
}

.priority-item h5 {
    margin: 0 0 15px 0;
    font-size: 16px;
}

.priority-item ol {
    margin: 0;
    padding-left: 25px;
}

.priority-item li {
    margin: 12px 0;
    line-height: 1.8;
}

.priority-item ul {
    margin-top: 8px;
    padding-left: 20px;
    list-style: circle;
}

.priority-item ul li {
    margin: 5px 0;
    font-size: 14px;
}

@media (max-width: 768px) {
    .manufacturer-guide {
        grid-template-columns: 1fr;
    }

    .mfg-card {
        padding: 15px;
    }
}

/* ===== 反馈电阻计算模块 ===== */
.feedback-resistor-section {
    padding: 60px 0;
    background: #f8fafc;
}
.feedback-resistor-section h2 {
    text-align: center;
    font-size: 1.8rem;
    color: #1a237e;
    margin-bottom: 8px;
}
.feedback-resistor-section .section-desc {
    text-align: center;
    color: #666;
    margin-bottom: 36px;
}
.fb-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
@media (max-width: 768px) {
    .fb-layout { grid-template-columns: 1fr; }

    .results-grid,
    .principle-grid,
    .performance-grid,
    .checklist-grid,
    .case-grid,
    .resources-grid { grid-template-columns: 1fr !important; }
}
.fb-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    border: 1px solid #e3e8f0;
}
.fb-card h3 {
    font-size: 1.05rem;
    color: #1565c0;
    margin-bottom: 8px;
}
.fb-desc {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 20px;
    line-height: 1.5;
}
.fb-form { display: flex; flex-direction: column; gap: 14px; }
.fb-row { display: flex; flex-direction: column; gap: 5px; }
.fb-row label { font-size: 0.875rem; font-weight: 500; color: #444; }
.fb-row input, .fb-row select {
    padding: 8px 12px;
    border: 1px solid #d0d7e3;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
.fb-row input:focus, .fb-row select:focus { border-color: #1976d2; }
.fb-vref-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.preset-btn {
    padding: 3px 10px;
    border: 1px solid #1976d2;
    border-radius: 20px;
    background: #fff;
    color: #1976d2;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}
.preset-btn:hover { background: #1976d2; color: #fff; }
.fb-result {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.8;
}
.fb-result.success { background: #e8f5e9; border: 1px solid #a5d6a7; color: #1b5e20; }
.fb-result.warning { background: #fff8e1; border: 1px solid #ffe082; color: #7b5800; }
.fb-result.error   { background: #ffebee; border: 1px solid #ef9a9a; color: #b71c1c; }
.fb-result table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.fb-result td { padding: 4px 8px; }
.fb-result td:first-child { font-weight: 600; width: 45%; }
.fb-result .best-combo { font-size: 1.05rem; font-weight: 700; color: #1565c0; }
.fb-formula {
    margin-top: 20px;
    padding: 10px 14px;
    background: #f0f4ff;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #1a237e;
    text-align: center;
}

/* ===== 移动端响应式 (补充) ===== */
@media (max-width: 768px) {
    .container { padding: 0 12px; }
    .navbar { padding: 10px 12px; }
    .nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    flex-wrap: nowrap;
    overflow: hidden;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 2px 0 0;
    width: 100%;
}
    .nav-menu.open { display: flex; }
    .nav-toggle { display: block !important; }
    .hero-content h1 { font-size: 1.6rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero-features { flex-direction: column; gap: 8px; }
    .content-grid, .results-grid, .tools-grid, .cards-grid { grid-template-columns: 1fr !important; }
    .calculator-card { padding: 16px; }
    .chip-grid { grid-template-columns: 1fr !important; }
    .modal-content { width: 95%; max-height: 90vh; overflow-y: auto; }
    table { font-size: 0.82rem; }
    th, td { padding: 6px 8px; }
    .form-row { flex-direction: column; }
    .btn { width: 100%; text-align: center; }
    canvas { max-width: 100%; height: auto !important; }
}
@media (max-width: 480px) {
    .hero-content h1 { font-size: 1.3rem; }
    .card-title { font-size: 16px; }
    .result-value { font-size: 1.4rem; }
    .chip-tags { flex-wrap: wrap; }
}
/* ===== RIPPLE SPECTRUM & TRANSIENT RESPONSE SECTIONS ===== */

/* Section 基础 */
.ripple-spectrum-section,
.transient-response-section {
    padding: 60px 0;
    background: #f4f6f9;
}

.ripple-spectrum-section h2,
.transient-response-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.ripple-spectrum-section .section-desc,
.transient-response-section .section-desc {
    color: #666666;
    font-size: 1rem;
    margin-bottom: 28px;
    max-width: 800px;
}

/* 主布局：两列 */
.ripple-main-grid,
.transient-main-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: flex-start;
}

/* 左侧参数面板 */
.ripple-params-panel,
.transient-params-panel {
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 20px;
}

.ripple-params-panel h4,
.transient-params-panel h4 {
    color: #1a73e8;
    font-size: 1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.ripple-input-group,
.transient-input-group {
    margin-bottom: 12px;
}

.ripple-input-group label,
.transient-input-group label {
    display: block;
    color: #666666;
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.ripple-input-group small,
.transient-input-group small {
    display: block;
    color: #475569;
    font-size: 0.75rem;
    margin-top: 2px;
}

.ripple-input-group input[type="number"],
.ripple-input-group input[type="text"],
.transient-input-group input[type="number"],
.transient-input-group select {
    width: 100%;
    padding: 6px 10px;
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    color: #333333;
    font-size: 0.88rem;
    outline: none;
    box-sizing: border-box;
}

.ripple-input-group input[type="number"]:focus,
.transient-input-group input[type="number"]:focus,
.transient-input-group select:focus {
    border-color: #1a73e8;
}

.transient-input-group select {
    cursor: pointer;
}

.ripple-input-group input[type="range"] {
    accent-color: #3b82f6;
}

.btn-ripple-sync,
.btn-ripple-calc {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.btn-ripple-sync {
    background: #f0f4ff;
    color: #666666;
    border: 1px solid #e0e6ed;
}

.btn-ripple-sync:hover {
    background: #e8ecf0;
    color: #333333;
}

.btn-ripple-calc {
    background: linear-gradient(135deg, #1f6feb, #0969da);
    color: #fff;
}

.btn-ripple-calc:hover {
    background: linear-gradient(135deg, #388bfd, #1f6feb);
    transform: translateY(-1px);
}

/* 右侧结果面板 */
.ripple-results-panel,
.transient-results-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 结果卡片行 */
.ripple-result-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ripple-result-card {
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
}

.rrc-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 4px;
    font-family: 'Courier New', monospace;
}

.rrc-label {
    font-size: 0.78rem;
    color: #666666;
    line-height: 1.4;
}

/* 双 Canvas 布局 */
.dual-canvas-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ripple-canvas-box {
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 12px;
}

.ripple-canvas-box canvas {
    width: 100%;
    height: auto;
    display: block;
}

.canvas-box-title {
    color: #1a73e8;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 频谱柱状图深色背景 */
.spectrum-bar-chart {
    background: #f8f9fa;
    border-color: #21262d;
}

/* 瞬态波形容器（Bode 图风格） */
.transient-wave-wrap {
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 12px;
}

.transient-wave-wrap canvas {
    width: 100%;
    height: auto;
    display: block;
}

/* 设计建议框 */
.tr-advice-box {
    background: rgba(88,166,255,.06);
    border: 1px solid rgba(88,166,255,.25);
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.88rem;
    color: #a5d6ff;
    line-height: 1.7;
}

.tr-advice-box .advice-warn {
    color: #ffa198;
}

.tr-advice-box .advice-ok {
    color: #3fb950;
}

/* 响应式 */
@media (max-width: 900px) {
    .ripple-main-grid,
    .transient-main-grid {
        grid-template-columns: 1fr;
    }
    .ripple-result-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .ripple-result-cards {
        grid-template-columns: 1fr;
    }
}


/* =====================================================
   热设计计算器 + 效率预测模型  v1.0
   ===================================================== */

/* ---- 通用 section 背景 ---- */
.thermal-design-section,
.efficiency-prediction-section {
    padding: 60px 0;
    background: #f4f6f9;
}

.thermal-design-section h2,
.efficiency-prediction-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.thermal-design-section .section-desc,
.efficiency-prediction-section .section-desc {
    color: #666666;
    font-size: 1rem;
    margin-bottom: 28px;
    max-width: 800px;
}

/* ---- 两列主布局 ---- */
.thermal-main-grid,
.eff-main-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: flex-start;
}

/* ---- 左侧参数面板 ---- */
.thermal-params-panel,
.eff-params-panel {
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 20px;
}

/* 参数组卡片 */
.thermal-group-card {
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.thermal-group-card:last-child {
    margin-bottom: 0;
}

.thermal-group-title {
    color: #1a73e8;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* 输入行 */
.th-input-row {
    margin-bottom: 10px;
}

.th-input-row:last-child {
    margin-bottom: 0;
}

.th-input-row label {
    display: block;
    color: #666666;
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.th-input-row .field-hint {
    display: block;
    color: #475569;
    font-size: 0.74rem;
    margin-top: 2px;
}

.th-input-row input[type="number"],
.th-input-row select {
    width: 100%;
    padding: 6px 10px;
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    color: #333333;
    font-size: 0.88rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.th-input-row input[type="number"]:focus,
.th-input-row select:focus {
    border-color: #1a73e8;
}

/* 只读工况输入 */
.th-input-row input[readonly] {
    background: #0a0e18;
    color: #1a73e8;
    border-color: #21262d;
    cursor: default;
}

/* 操作按钮 */
.btn-th-sync {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #f0f4ff;
    color: #666666;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.btn-th-sync:hover {
    background: #e8ecf0;
    color: #333333;
}

.btn-th-calc {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #1f6feb, #0969da);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.btn-th-calc:hover {
    background: linear-gradient(135deg, #388bfd, #1f6feb);
    transform: translateY(-1px);
}

/* ---- 右侧结果面板 ---- */
.thermal-results-panel,
.eff-results-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---- 损耗条形图 ---- */
.loss-bar-chart {
    background: #0f172a;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 12px;
    position: relative;
}

.loss-bar-chart canvas {
    width: 100%;
    height: auto;
    display: block;
}

.loss-bar-title {
    color: #1a73e8;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- 结温卡片 ---- */
.tj-cards-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.tj-card {
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
}

.tj-card.tj-main {
    grid-column: span 1;
}

.tj-value {
    font-size: 2.6rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    line-height: 1;
    margin-bottom: 4px;
    transition: color 0.3s;
}

.tj-value.temp-ok    { color: #3fb950; }
.tj-value.temp-warn  { color: #f59e0b; }
.tj-value.temp-hot   { color: #ef4444; }
.tj-value.temp-default { color: #1a73e8; }

.tj-label {
    font-size: 0.78rem;
    color: #666666;
    line-height: 1.4;
}

.tj-unit {
    font-size: 0.72rem;
    color: #1a73e8;
    margin-top: 2px;
}

/* 散热建议框 */
.thermal-advice-box {
    background: rgba(88,166,255,.06);
    border: 1px solid rgba(88,166,255,.25);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.88rem;
    color: #a5d6ff;
    line-height: 1.7;
}

.thermal-advice-box.warn {
    background: rgba(245,158,11,.06);
    border-color: rgba(245,158,11,.35);
    color: #fbbf24;
}

.thermal-advice-box.hot {
    background: rgba(239,68,68,.06);
    border-color: rgba(239,68,68,.35);
    color: #fca5a5;
}

/* ---- 效率预测：曲线图容器 ---- */
.eff-curve-wrap {
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 12px;
    position: relative;
}

.eff-curve-wrap canvas {
    width: 100%;
    height: auto;
    display: block;
}

.eff-curve-title {
    color: #1a73e8;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Tooltip overlay */
.eff-tooltip {
    position: absolute;
    background: #1e293b;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    color: #e2e8f0;
    pointer-events: none;
    display: none;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* ---- 损耗分解表 ---- */
.loss-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e6ed;
}

.loss-breakdown-table thead tr {
    background: #1c2230;
}

.loss-breakdown-table th {
    padding: 10px 14px;
    text-align: left;
    color: #1a73e8;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.loss-breakdown-table td {
    padding: 9px 14px;
    color: #333333;
    border: 1px solid #e0e6ed;
}

.loss-breakdown-table tr:hover td {
    background: rgba(88,166,255,.04);
}

.loss-breakdown-table .row-total td {
    background: #1c2230;
    color: #e2e8f0;
    font-weight: 600;
    border: 1px solid #e0e6ed;
}

.loss-breakdown-table .row-output td {
    color: #1a73e8;
    font-weight: 600;
}

.loss-breakdown-table .row-efficiency td {
    background: rgba(63,185,80,.06);
    color: #3fb950;
    font-weight: 700;
    font-size: 0.95rem;
    border-top: 1px solid #2ea043;
}

.loss-color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: middle;
}

/* 效率左侧滑块 */
.th-input-row input[type="range"] {
    width: 100%;
    accent-color: #3b82f6;
    cursor: pointer;
}

.slider-val {
    color: #1a73e8;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 8px;
}

/* 效率小结果卡片 */
.eff-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.eff-sum-card {
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.eff-sum-val {
    font-size: 1.3rem;
    font-weight: 700;
    color: #3b82f6;
    font-family: 'Courier New', monospace;
}

.eff-sum-lbl {
    font-size: 0.76rem;
    color: #666666;
    margin-top: 3px;
}

/* ---- 响应式 ---- */
@media (max-width: 1000px) {
    .thermal-main-grid,
    .eff-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .tj-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .eff-summary-cards {
        grid-template-columns: 1fr;
    }
}


/* ===== 环路补偿 / 热设计 / 效率 两列布局修复 ===== */

/* grid 容器 — 用 !important 防止被全局 div{flex} 覆盖 */
.loop-comp-layout,
.thermal-main-grid,
.eff-main-grid,
.ripple-main-grid {
    display: grid !important;
}
.loop-comp-layout {
    grid-template-columns: 420px 1fr !important;
    gap: 24px !important;
    align-items: start !important;
    margin-top: 24px !important;
}

/* 左侧输入面板 — 需要 flex 列排列 */
.loop-comp-inputs {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}
.loop-input-group-card {
    background: #1e2a3a;
    border: 1px solid #2d3f55;
    border-radius: 10px;
    padding: 16px 20px;
}
.loop-group-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #93c5fd;
    margin: 0 0 12px 0;
    display: flex !important;
    align-items: center;
    gap: 6px;
}
.loop-comp-results {
    min-width: 0;
}

/* 标题颜色统一 — 所有计算器 section 的 h2 统一为浅灰白 */
.loop-compensation-section h2,
.ripple-spectrum-section h2,
.thermal-design-section h2,
.efficiency-prediction-section h2,
.transient-response-section h2,
.dead-time-section h2 {
    color: #e2e8f0 !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    text-align: left !important;
    margin-bottom: 8px !important;
}

/* fb-row 不能被全局 div 强制 flex */
.loop-input-group-card .fb-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin-bottom: 12px !important;
}
.loop-input-group-card .fb-row label {
    font-size: 0.85rem;
    color: #94a3b8;
}
.loop-input-group-card .fb-row input,
.loop-input-group-card .fb-row select {
    width: 100%;
    padding: 6px 10px;
    background: #0f1b2d;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 0.9rem;
}

@media (max-width: 960px) {
    .loop-comp-layout {
        grid-template-columns: 1fr !important;
    }
}


/* ===== 环路补偿结果卡片 ===== */
.loop-result-cards {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
}
.loop-result-card {
    background: #1e2d40 !important;
    border: 1px solid #2d4a6e !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
}
.loop-result-card .result-label {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
}
.loop-result-card .result-value {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #60a5fa !important;
    line-height: 1.1 !important;
}
.loop-result-card .result-unit {
    font-size: 0.8rem !important;
    color: #64748b !important;
}

/* ===== 大标题颜色加深（所有计算器section）===== */
.loop-compensation-section h2,
.ripple-spectrum-section h2,
.thermal-design-section h2,
.efficiency-prediction-section h2,
.transient-response-section h2,
.dead-time-section h2,
.soft-start-section h2 {
    color: #f1f5f9 !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    text-align: left !important;
    margin-bottom: 8px !important;
}

@media (max-width: 700px) {
    .loop-result-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}


/* ===== 环路补偿卡片：数值+单位同行 ===== */
.loop-result-card {
    flex-direction: column !important;
    align-items: center !important;
}
/* 用一个包裹层让数值和单位水平排列 */
.loop-result-card .result-value-row {
    display: flex !important;
    align-items: baseline !important;
    gap: 4px !important;
}
.loop-result-card .result-value {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #60a5fa !important;
    line-height: 1.1 !important;
}
.loop-result-card .result-unit {
    font-size: 0.9rem !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
}


/* ===== Footer 修复：深蓝背景 + 白色文字，去掉白卡片 ===== */
footer {
    background: #0f1b2d !important;
    color: #cbd5e1 !important;
}
.footer-content {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 40px !important;
    padding: 60px 0 40px !important;
}
/* 去掉白色卡片背景 */
.footer-section,
.footer-col,
.footer-column,
footer .col,
footer section,
footer > div > div {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #cbd5e1 !important;
}
/* 标题 */
footer h3, footer h4,
.footer-section h3, .footer-section h4,
.footer-col h3, .footer-col h4 {
    color: #f1f5f9 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    margin-bottom: 16px !important;
    letter-spacing: 0.5px !important;
}
/* 正文和链接 */
footer p, footer span,
.footer-section p, .footer-col p {
    color: #94a3b8 !important;
    font-size: 0.875rem !important;
    line-height: 1.7 !important;
}
footer a,
.footer-section a, .footer-col a {
    color: #93c5fd !important;
    text-decoration: none !important;
    font-size: 0.875rem !important;
    line-height: 2 !important;
    display: block !important;
    transition: color 0.2s !important;
}
footer a:hover,
.footer-section a:hover, .footer-col a:hover {
    color: #ffffff !important;
}
/* 底部版权栏 */
.footer-bottom, footer .copyright {
    border-top: 1px solid #1e3a5f !important;
    padding: 20px 0 !important;
    color: #64748b !important;
    font-size: 0.8rem !important;
    text-align: center !important;
}
