body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f4f4;
    margin: 0;
}

.main-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
}

h1, h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* 标签页导航样式 */
.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.tab-button, .tab-link-button {
    background-color: #e9e9e9;
    color: #555;
    padding: 10px 15px;
    border: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    font-size: 16px;
    margin: 0 5px 5px 0;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
    flex-grow: 1;
    min-width: fit-content;
    text-align: center;
    text-decoration: none; /* 移除链接下划线 */
}

.tab-button:hover, .tab-link-button:hover {
    background-color: #ddd;
}

.tab-button:active, .tab-link-button:active {
    transform: scale(0.98);
}

.tab-button.active {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    border-bottom: 2px solid #007bff;
}

/* 计算器部分样式 */
.calculator-section {
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: #f9f9f9;
    display: none;
}

.calculator-section.active {
    display: block;
}

p {
    margin-bottom: 10px;
    color: #555;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

p input[type="number"] {
    flex-grow: 1;
    padding: 8px;
    margin-left: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: auto;
    min-width: 120px;
}

/* 按钮组容器 */
.button-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.button-group button {
    flex-grow: 1;
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: auto;
    margin-top: 0;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

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

.button-group button:active {
    transform: scale(0.98);
}

span {
    font-weight: bold;
    color: #28a745;
}

/* 表格样式 */
.details-table-container {
    margin-top: 20px;
    overflow-x: auto;
    max-height: 400px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.details-table th, .details-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: right;
    white-space: nowrap;
}

.details-table th {
    background-color: #007bff;
    color: white;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1;
}

.details-table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

.details-table tbody tr:hover {
    background-color: #ddd;
}