/* 基础样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 罗克韦尔品牌颜色 */
    --rockwell-blue: #00529B;
    --rockwell-red: #E31B23;
    --rockwell-gray: #58595B;
    --rockwell-light-gray: #F1F1F2;
    --rockwell-dark-blue: #003A70;
}

body {
    font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 - 带背景图片和蒙版效果 */
header {
    position: relative;
    color: white;
    padding: 40px 20px;
    text-align: center;
    border-radius: 5px 5px 0 0;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 背景图片和蒙版 */
header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('rockwell-plc-background.jpg'); /* 请替换为罗克韦尔PLC产品图片 */
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: -2;
}

header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--rockwell-blue) 0%, var(--rockwell-dark-blue) 100%);
    z-index: -1;
}

header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
}

/* 主内容区域样式 - 三栏布局 */
.main-content {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* 左侧：选择系列样式 */
.series-selection {
    flex: 0.6;
    min-width: 160px;
    max-width: 180px;
    background-color: white;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-top: 3px solid var(--rockwell-blue);
}

/* 优化Select Series栏的字体 */
.series-selection label {
    font-size: 13px;
    font-weight: normal;
    white-space: nowrap;
}

/* 中间：选择模块样式 */
.module-selection {
    flex: 0.8;
    min-width: 160px;
    max-width: 200px;
    background-color: white;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-top: 3px solid var(--rockwell-red);
}

/* 右侧：模块信息样式 */
.module-info {
    flex: 4;
    min-width: 600px;
    background-color: white;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-top: 3px solid var(--rockwell-gray);
}

h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--rockwell-blue);
    border-bottom: 1px solid var(--rockwell-light-gray);
    padding-bottom: 10px;
}

/* 单选按钮组样式 */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-item {
    display: flex;
    align-items: center;
}

.radio-item input[type="radio"] {
    margin-right: 10px;
    accent-color: var(--rockwell-blue);
}

/* 模块选择下拉列表样式 */
#module-select {
    width: 100%;
    height: 300px; /* 增加高度以显示更多选项 */
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

#module-select option {
    padding: 8px;
}

#module-select option:hover, #module-select option:focus {
    background-color: var(--rockwell-blue);
    color: white;
}

#module-select option:checked {
    background-color: var(--rockwell-blue);
    color: white;
}

.info-container {
    overflow-x: auto;
}

/* 表格样式 - 优化以确保内容在一行显示 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    table-layout: fixed; /* 固定表格布局 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th, td {
    border: 1px solid #ddd;
    padding: 8px 5px;
    text-align: center;
    white-space: nowrap; /* 防止文本换行 */
    overflow: hidden;
    text-overflow: ellipsis; /* 文本溢出时显示省略号 */
    font-size: 14px; /* 减小字体大小 */
}

/* 设置各列的宽度 */
table th:nth-child(1), 
table td:nth-child(1) {
    width: 15%;
}

table th:nth-child(2), 
table td:nth-child(2) {
    width: 25%;
}

table th:nth-child(3), 
table td:nth-child(3) {
    width: 20%;
}

table th:nth-child(4), 
table td:nth-child(4) {
    width: 20%;
}

table th:nth-child(5), 
table td:nth-child(5) {
    width: 20%;
}

th {
    background-color: var(--rockwell-blue);
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: var(--rockwell-light-gray);
}

tr:hover {
    background-color: #e6f0fa;
}

/* 当前选择显示样式 */
.current-selection {
    margin-top: 15px;
    padding: 12px;
    background-color: #f0f7ff;
    border-radius: 4px;
    border-left: 4px solid var(--rockwell-red);
}

#current-module {
    font-weight: bold;
    color: var(--rockwell-red);
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px;
    background: linear-gradient(to right, var(--rockwell-dark-blue), var(--rockwell-blue));
    color: white;
    border-radius: 0 0 5px 5px;
    font-size: 14px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

footer p {
    margin-bottom: 5px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .main-content {
        flex-wrap: wrap;
    }
    
    .series-selection, .module-selection {
        flex: 1;
        min-width: 45%;
        max-width: none;
    }
    
    .module-info {
        flex: 100%;
        min-width: 100%;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .series-selection, .module-selection, .module-info {
        min-width: 100%;
        max-width: none;
        margin-bottom: 20px;
    }
}