/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 24px;
    color: #333;
}

/* 导航栏样式 */
nav ul {
    display: flex;
    list-style: none;
    justify-content: flex-end;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ff6b6b;
}

/* 主要内容区样式 */
main {
    padding: 40px 0;
}

/* 分隔线 */
hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 30px 0;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    color: #333;
}

h1 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 30px;
}

h2 {
    font-size: 24px;
    margin-top: 30px;
}

h3 {
    font-size: 20px;
}

/* 段落样式 */
p {
    margin-bottom: 15px;
}

/* 计算器卡片样式 */
.calculator-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.calculator-card {
    flex: 1 1 300px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.calculator-card h2 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.calculator-card p {
    color: #666;
    margin-bottom: 20px;
}

.calculator-card .btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #ff6b6b;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.calculator-card .btn:hover {
    background-color: #ff5252;
}

/* 基础计算器样式 */
.basic-calculator {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 40px;
}

.calculator-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #ff6b6b;
}

.calculator-info p {
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

/* 计算器表单样式 */
.calculator-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: space-between;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 120px;
    align-items: flex-start;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    width: 100%;
    text-align: left;
}

.unit-label {
    font-weight: normal;
    font-style: italic;
    color: #666;
    font-size: 0.9em;
}

.form-group .input-unit-wrapper {
    display: flex;
    width: 100%;
    height: 42px;
}

.form-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    border-right: none;
    height: 100%;
}

.form-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 0 4px 4px 0;
    background-color: #f9f9f9;
    cursor: pointer;
    width: 80px;
    height: 100%;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

/* 数量输入框样式 */
.quantity-group {
    width: 100%;
    margin-top: 5px;
}

.quantity-group .input-unit-wrapper input {
    border-radius: 4px;
    border-right: 1px solid #ddd;
}

/* 计算器图像样式 */
.calculator-image {
    text-align: center;
    margin: 20px 0;
}

.calculator-image img {
    max-width: 300px;
}

/* 结果容器样式 */
.result-container {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

.result-container h3 {
    margin-bottom: 10px;
    color: #333;
}

.result {
    font-size: 32px;
    color: #ff6b6b;
    font-weight: bold;
    margin-bottom: 10px;
}

.cubic-meter-result {
    font-size: 16px;
    color: #666;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.cubic-meter-result span:last-child {
    font-weight: bold;
    color: #333;
}

.calculate-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.calculate-btn:hover {
    background-color: #555;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

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

table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

table tr:hover {
    background-color: #f9f9f9;
}

/* 信息部分样式 */
.info-section {
    margin: 40px 0;
}

/* 底部样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-column {
    flex: 1 1 250px;
    margin-bottom: 20px;
}

.footer-column h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #ff6b6b;
}

.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #aaa;
}

/* Canvas样式 */
#board-canvas-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

#boardCanvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 15px;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .calculator-form {
        flex-direction: column;
    }
}

/* 反馈按钮样式 */
.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.feedback-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.feedback-btn.positive {
    background-color: #4caf50;
    color: white;
}

.feedback-btn.negative {
    background-color: #f44336;
    color: white;
}

.feedback-btn:hover {
    opacity: 0.9;
}

/* 目录样式 */
.table-of-contents {
    background-color: #333;
    color: white;
    padding: 15px;
    margin-bottom: 30px;
}

.table-of-contents h3 {
    color: white;
    margin-bottom: 10px;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 15px;
}

.table-of-contents ul li {
    margin-bottom: 8px;
}

.table-of-contents ul li a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.table-of-contents ul li a:hover {
    color: #ff6b6b;
}
