/* 全局样式 */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f4f9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
}

/* 容器样式 */
.container {
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    width: 100%;
    max-width: 48rem;
    margin-bottom: 2rem;
}

/* 标题样式 */
h1 {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 700;
    color: #1e3a8a;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* 表单元素样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    line-height: 1.5rem;
    color: #374151;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* 按钮样式 */
.button-group {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.button-group button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.button-group button.calculate {
    background-color: #6366f1;
    color: #ffffff;
}

.button-group button.calculate:hover {
    background-color: #4f46e5;
}

.button-group button.cancel {
    background-color: #e5e7eb;
    color: #374151;
}

.button-group button.cancel:hover {
    background-color: #d1d5db;
}

.export-button {
    display: flex;
    justify-content: center;
}

.export-button button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 500;
    background-color: #22c55e;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.export-button button:hover {
    background-color: #16a34a;
}

/* 结果区域样式 */
#result {
    margin-top: 2rem;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    border: 1px solid #d1d5db;
    padding: 0.75rem 1rem;
    text-align: left;
}

th {
    background-color: #f3f4f6;
    font-weight: 500;
}

/* 媒体查询 */
@media (max-width: 640px) {
    body {
        padding: 0.5rem;
    }

    .container {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .button-group {
        flex-direction: column;
        gap: 1rem;
    }
}

/* 页脚样式 */
footer {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.25rem;
    text-align: center;
}

footer a {
    color: #6b7280;
    text-decoration: underline;
}

footer a:hover {
    color: #4b5563;
}    