/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    background-color: #f7f7f7;
    color: #333;
    padding: 20px;
}

/* 标签页样式 */
.tab {
    display: flex;
    list-style: none;
    background: transparent;
    overflow: hidden;
}

.tab button {
    background: transparent;
    color: #333;
    text-transform: uppercase;
    font-weight: bold;
    padding: 15px 25px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border: none;
}

.tab button:hover,
.tab button:focus {
    outline: none;
    background-color: #e5e5e5;
}

.tab button.active {
    background-color: #e5e5e5;
    color: #007aff;
}

/* 表格容器样式 */
.table-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

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

th,
td {
    padding: 10px;
    text-align: left;
    color: #333;
}

th {
    background-color: #e5e5e5;
}

tr:nth-child(odd) {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #e5e5e5;
}

/* 首页样式 */
#home {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tab button {
        padding: 12px 15px;
        font-size: 14px;
    }

    #home {
        font-size: 2em;
    }

    .table-container {
        padding: 15px;
    }

    table,
    th,
    td {
        padding: 8px;
    }
}

/* 其他样式 */
h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #333;
}

/* 涨价时的文本颜色 */
.increase {
    color: red;
}

/* 跌价时的文本颜色 */
.decrease {
    color: green;
}

/* 换算工具容器样式 */
#conversionTool {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    text-align: center; /* 使内部元素水平居中 */
    margin-top: 20px;
}

/* 表单样式 */
#conversionForm {
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    margin-bottom: 15px;
}

/* 标签和输入框样式 */
#conversionForm label {
    margin-right: 10px;
    font-weight: bold;
}

#conversionForm input {
    padding: 10px;
    margin-right: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* 按钮样式 */
#conversionForm button {
    padding: 10px 15px;
    background-color: #007aff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: 10px; /* 为按钮添加一些间隔 */
}

#conversionForm button:hover {
    background-color: #0056b3;
}

/* 换算结果样式 */
#conversionResult {
    font-weight: bold;
    margin-top: 10px;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
    #conversionForm input {
        padding: 8px;
        font-size: 14px;
    }

    #conversionForm button {
        padding: 8px 12px;
        font-size: 14px;
    }

    #conversionTool {
        padding: 15px;
    }
}