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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Logo和标题样式 */
.header-container {
    margin-bottom: 30px;
}

.logo-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    position: relative;
    flex-wrap: wrap;
    width: 100%;
}

.logo {
    width: 200px;
    height: auto;
    max-width: 100%;
}

h1 {
    margin: 0;
    color: #000;
    font-size: 28px;
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-number {
    position: absolute;
    right: 0;
    font-size: 14px;
    color: #2c3e50;
    font-weight: normal;
}

h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 20px;
    position: relative;
    padding-left: 15px;
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 20px;
    background-color: #3498db;
    border-radius: 3px;
}

.report-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 25px;
}

/* 基本信息样式 */
.basic-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.info-group {
    display: flex;
    align-items: center;
    min-width: auto;
    flex: 0 1 auto;
    margin-bottom: 10px;
}

.info-group label {
    width: auto;
    font-weight: bold;
    color: #2c3e50;
    margin-right: 10px;
}

.info-group input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.info-value { 
    flex: 1 1 auto;
    padding: 8px 0; 
    font-size: 14px; 
    color: #333; 
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 标定结果表格样式 */
.calibration-results {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calibration-results th,
.calibration-results td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid #ddd;
}

.calibration-results th {
    background-color: #e6f7ff;
    color: #2c3e50;
    font-weight: bold;
}

.calibration-results tr:nth-child(even) {
    background-color: #f9f9f9;
}

.result-pass {
    color: #27ae60;
    font-weight: bold;
}

.result-fail {
    color: #e74c3c;
    font-weight: bold;
}

/* 查看按钮样式 */
.view-zone-btn {
    padding: 4px 8px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.view-zone-btn:hover {
    background-color: #2980b9;
}

/* 图表容器样式 */
.chart-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    height: 500px;
    position: relative;
    touch-action: pan-x; /* 允许横向拖动，但保留其他触摸行为 */
}

.reset-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: rgba(52, 152, 219, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.reset-button.visible {
    display: flex; /* 显示时使用flex布局 */
}

.reset-button:hover {
    background-color: rgba(41, 128, 185, 1);
    transform: scale(1.1);
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

/* 数据分析结果样式 */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.result-card {
    background-color: #fff;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #ddd;
}

.result-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
}

/* 标定结论样式 */
.conclusion {
    background-color: #fff;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #ddd;
    font-size: 16px;
    line-height: 1.8;
}

.conclusion p {
    text-indent: 2em;
}

/* 结果颜色样式 */
p.result-pass {
    color: #27ae60;
    font-weight: 500;
}

p.result-fail {
    color: #e74c3c;
    font-weight: 500;
}

.instructions {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.instructions h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 8px 12px;
    text-align: left;
}

th {
    background-color: #e6f7ff;
}

.stats-value {
    font-weight: bold;
    color: #2980b9;
}

/* 移动端选区控制器样式 */
.mobile-range-selector {
    display: none; /* 默认隐藏，仅在移动设备上显示 */
    margin-top: 15px;
    padding: 0 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.range-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #2c3e50;
    font-weight: bold;
}

.range-slider-container {
    position: relative;
    height: 40px;
    padding: 10px 0;
}

.range-slider-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 5px;
    background-color: #e6e6e6;
    transform: translateY(-50%);
    border-radius: 2.5px;
}

.range-slider {
    position: absolute;
    width: 100%;
    height: 5px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    top: 50%;
    transform: translateY(-50%);
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.range-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.range-slider:active::-webkit-slider-thumb {
    transform: scale(1.2);
}

.range-slider:active::-moz-range-thumb {
    transform: scale(1.2);
}

.range-slider-start {
    z-index: 2;
}

.range-slider-end {
    z-index: 1;
}

.range-track {
    position: absolute;
    height: 5px;
    background-color: rgba(52, 152, 219, 0.5);
    top: 50%;
    transform: translateY(-50%);
    border-radius: 2.5px;
    z-index: 0;
    transition: left 0.1s ease, width 0.1s ease;
}

.range-title {
    margin-bottom: 10px;
    font-size: 16px;
    color: #2c3e50;
    text-align: center;
}

@media (max-width: 768px) {
    .mobile-range-selector {
        display: block; /* 在移动设备上显示 */
    }
    
    .logo-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
    
    .logo {
        width: 180px;
    }
    
    .basic-info {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .info-group {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .info-group label {
        margin-bottom: 4px;
    }
    
    .info-value {
        width: calc(100% - 110px);
    }
    
    .chart-container {
        height: 400px;
        padding: 10px;
    }
    
    .report-number {
        position: static;
        margin-top: 10px;
        display: block;
    }
    
    /* 保持三列布局，但减小内边距和字体大小 */
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .result-card {
        padding: 8px;
    }
    
    .result-card h3 {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    table {
        font-size: 11px;
    }
    
    th, td {
        padding: 4px 6px;
    }
    
    /* 优化小屏幕上的标定结果表格 */
    .calibration-results th,
    .calibration-results td {
        padding: 8px 6px;
        font-size: 12px;
    }
} 

/* 数据分析卡片样式 */
.torque-sensor-card h3 {
    color: rgba(54, 162, 235, 1); /* 蓝色 - 扭矩传感器线条颜色 */
    border-bottom: 2px solid rgba(54, 162, 235, 0.7);
    padding-bottom: 5px;
}

.torque-sensor-card .stats-value {
    color: rgba(54, 162, 235, 1);
}

.power-meter-card h3 {
    color: rgba(255, 99, 132, 1); /* 红色 - 功率计线条颜色 */
    border-bottom: 2px solid rgba(255, 99, 132, 0.7);
    padding-bottom: 5px;
}

.power-meter-card .stats-value {
    color: rgba(255, 99, 132, 1);
}

.comparison-card h3 {
    color: #333; /* 深灰色 - 中性色调 */
    border-bottom: 2px solid #999;
    padding-bottom: 5px;
}

.comparison-card .stats-value {
    color: #444; /* 稍深的灰色 */
}

/* 新增表头背景色样式 */
.torque-sensor-header th {
    background-color: rgba(54, 162, 235, 0.15);
    color: rgba(54, 162, 235, 1);
    border-bottom: 2px solid rgba(54, 162, 235, 0.7);
}

.power-meter-header th {
    background-color: rgba(255, 99, 132, 0.15);
    color: rgba(255, 99, 132, 1);
    border-bottom: 2px solid rgba(255, 99, 132, 0.7);
}

.comparison-header th {
    background-color: rgba(51, 51, 51, 0.08);
    color: #444;
    border-bottom: 2px solid #999;
}

/* 移动设备提示样式 */
.mobile-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(52, 152, 219, 0.9);
    color: white;
    z-index: 1000;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.notification-content p {
    margin: 0;
    font-size: 14px;
}

.notification-close {
    background-color: white;
    color: #3498db;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.notification-close:hover {
    background-color: #f8f9fa;
}

.notification-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Language selector styles */
.language-selector {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.language-dropdown {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    width: auto;
}

.language-dropdown:hover {
    border-color: #3498db;
}

.language-dropdown:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

@media (max-width: 768px) {
    .language-selector {
        margin: 10px 0;
        width: 100%;
    }
    
    .language-dropdown {
        width: 100%;
    }
}
