/* 基本样式 */
html, body {
    margin: 0;
    padding: 0;
    height: 100%; /* 确保html和body高度占满整个视口 */
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
}

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

/* 头部样式 */
header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

.logo img {
    height: 50px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

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

nav a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ff6600;
}

/* 英雄部分样式 */
#hero {
    background-image: url('../images/hero-bg.gif'); /* 注意这里的相对路径 */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: #fff;
    text-align: center;
    padding: 100px 0;
    margin-top: 70px; /* 考虑到固定的头部 */
    min-height: 100vh; /* 使#hero至少占据整个视口高度 */
    display: flex;
    align-items: center; /* 垂直居中内容 */
    justify-content: center; /* 水平居中内容 */
}

#hero h2 {
    font-size: 3em;
    margin-bottom: 20px;
}

#hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #ff6600;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #e65c00;
}

/* 内容部分样式 */
main {
    padding: 50px 0;
}

section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

.service-list {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.service-item {
    width: 30%;
    text-align: center;
    margin: 10px 0;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.portfolio-gallery img {
    width: 30%;
    margin: 10px;
    border-radius: 5px;
}

/* 联系表单样式 */
form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
}

label {
    margin-bottom: 5px;
}

input, textarea {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button[type="submit"] {
    background: #ff6600;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button[type="submit"]:hover {
    background: #e65c00;
}

/* 脚注样式 */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

/* 工具箱样式 */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 确保body至少占据整个视口高度 */
    margin-top: 70px; /* 考虑到固定的头部 */
}

.toolbox-container {
    display: flex;
    flex: 1;
    overflow: hidden; /* 防止内容溢出 */
}

.sidebar {
    width: 200px;
    background-color: #f4f4f4;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.tool-list a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #ddd;
}

.tool-list a.active, .tool-list a:hover {
    background-color: #ddd;
}

.result {
    margin-top: 20px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}