/* 6.5X转接镜视场范围查询表样式 */
:root {
    --primary-color: #2c5282;
    --secondary-color: #2b6cb0;
    --accent-color: #4299e1;
    --text-color: #2d3748;
    --light-bg: #f7fafc;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --header-gradient: linear-gradient(135deg, #2b6cb0 0%, #2c5282 100%);
    --header-accent: #63b3ed;
}

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

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background-color: #f0f4f8;
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* 移除重复的body样式 */

.adaptercontainer {
    width: 100%;
    max-width: 100%;
    margin: 60px auto;
    padding: 2rem 2rem; /* 增加左右内边距 */
    overflow: visible; /* 移除容器的滚动条 */
    display: block;
    font-size: 1.05rem; /* 增加基础字体大小 */
}

.page-header {
    text-align: center;
    margin: 0 auto 1.5rem;
    padding: 2rem;
    background: var(--header-gradient);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-width: 100%;
    position: relative;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--header-accent);
}

.page-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.page-title {
    font-size: 2.6rem;
    margin: 0 0 0.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    padding: 0 2rem;
}

.page-header h1:not(.page-title) {
    font-size: 2rem;
    margin: 0.8rem 0 2rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.3px;
    max-width: 100%;
    padding: 0 2rem;
}

/* 表格容器 */
.table-scroll-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: grab;
    position: relative;
}

/* 拖动时的光标样式 */
.table-scroll-container:active {
    cursor: grabbing;
}

/* 隐藏滚动条但保持滚动功能 */
.table-scroll-container::-webkit-scrollbar {
    display: none;
}

.table-scroll-container {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.specs-table {
    width: auto;
    border-collapse: collapse;
    background: white;
    margin: 0;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    table-layout: fixed;
    word-wrap: break-word;
    min-width: 2500px; /* 增大最小宽度 */
}

.specs-table table {
    width: 100%;
    min-width: 2500px; /* 增大最小宽度 */
    table-layout: fixed; /* 使用fixed确保列宽固定 */
}

.specs-table th, .specs-table td {
    padding: 0.6rem 0.8rem; /* 增大内边距 */
    text-align: center;
    vertical-align: middle;
    border: 1px solid #e2e8f0;
    font-size: 1.1rem; /* 增大字体大小 */
    line-height: 1.6; /* 增加行高 */
    white-space: normal;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sensor-dims {
    display: block;
    font-size: 0.65rem;
    color: #666;
    line-height: 1.2;
    margin-top: 0.1rem;
}

.specs-table th {
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
    color: #2d3748;
    font-size: 0.95rem;
    border-bottom: 2px solid #e2e8f0;
    text-transform: none;
}

.specs-table thead > tr:first-child > th {
    background: #edf2f7;
    font-weight: 700;
    color: #2d3748;
    padding: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.specs-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05);
}

/* 表头第一行样式 */
.specs-table thead > tr:first-child > th {
    background: #2b6cb0;
    color: white;
    border-bottom: none;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    padding: 0.6rem 0.3rem;
    white-space: normal;
    line-height: 1.3;
}

/* 表头第二行样式 */
.specs-table thead > tr:nth-child(2) > th {
    background: #f8fafc;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 500;
    font-size: 0.8rem;
    padding: 0.6rem 0.3rem;
    white-space: normal;
    line-height: 1.3;
}

/* 传感器尺寸行背景色 */
.sensor-row {
    background-color: #f8fafc !important;
    font-weight: 500;
}

/* 数据行背景色 */
.data-row {
    background-color: #ffffff !important;
}

/* 交替行背景色 */
.specs-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

/* 悬停效果 */
.specs-table tbody tr:hover {
    background-color: #f0f5ff !important;
}

.specs-table tbody tr:hover td {
    background-color: #f0f5ff !important;
    transform: translateY(-1px);
}

/* 合并单元格样式 */
.merged-cell {
    background: #f0f7ff;
    font-weight: 600;
    color: #2b6cb0;
    position: relative;
    border-left: 3px solid #4299e1;
}

/* 表体单元格样式 */
.specs-table tbody td {
    border: 1px solid #edf2f7;
    color: #4a5568;
}

/* 表体列样式 */
.specs-table tbody td:first-child {
    font-weight: 500;
    color: #2d3748;
    background-color: #f8fafc;
}

/* 工作距离列样式 */
.specs-table tbody td:nth-child(2) {
    background-color: transparent !important;
}

/* 表格底部边框 */
.specs-table tbody tr:last-child td {
    border-bottom: 1px solid #e2e8f0;
}

/* 表格圆角 */
.specs-table thead tr:first-child th:first-child {
    border-top-left-radius: 12px;
}

.specs-table thead tr:first-child th:last-child {
    border-top-right-radius: 12px;
}

.specs-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.specs-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 100;
    text-decoration: none;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* 打印样式 */
@media print {
    body * {
        visibility: hidden;
    }
    .table-print-adaptercontainer, .table-print-adaptercontainer * {
        visibility: visible;
    }
    .table-print-adaptercontainer {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

/* 表格控制按钮 */
.table-controls {
    margin-bottom: 20px;
    text-align: right;
}

.download-btn {
    padding: 8px 16px;
    background-color: #1a56a7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    margin-right: 10px;
}

.download-btn:last-child {
    margin-right: 0;
}

.download-btn:hover {
    background-color: #0c4b8e;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .adaptercontainer {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .specs-table {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 1.5rem 0;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .specs-table th, 
    .specs-table td {
        padding: 0.4rem 0.3rem;
        font-size: 0.75rem;
    }
    
    .download-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 4px;
    z-index: 1000;
    display: none;
}

.loading.show {
    display: block;
}
.back-link {
    display: inline-block;
    margin: 0 0;
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.back-link:hover {
    background: #545b62;
    color: white;
    text-decoration: none;
}