body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

.calculator-header {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    position: fixed;
    top: 0;
    left: 0;
    background-color: white;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.calculator-header h1 {
    color: #333;
    font-size: 32px;
    margin: 0;
    padding: 15px 0;
}

.history-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-container {
    display: flex;
    gap: 20px;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    flex-direction: row;
    align-items: flex-start; /* 添加这一行，确保子元素顶部对齐 */
}

.calculator {
    width: 320px;
    background-color: #333;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    order: 2;
    margin-top: 0; 
}

.display-container {
    width: 100%;
    height: 120px;
    background-color: #444;
    color: white;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    max-height: 300px;
    overflow-y: auto;
}

.equation-display {
    display: none;
}

.result-display {
    font-size: 60px;
    text-align: right;
    height: 120px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 10px;
}

.btn {
    height: 60px;
    font-size: 32px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    opacity: 0.8;
}

.btn:active {
    transform: scale(0.95);
}

.number {
    background-color: #666;
    color: white;
}

.operator {
    background-color: #ff9500;
    color: white;
}

.equal {
    background-color: #ff9500;
}

.zero {
    grid-column: span 2;
}

.dengyu {
    grid-column: span 4;
}

.history-table {
    width: 720px;
    height: 500px;
    background-color: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: auto;
    border: 1px solid #e0e0e0;
    display: block;
}

.history-table1 {
    width: 720px;
    background-color: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: auto;
    max-height: 90px;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    display: block;
}

.history-table2 {
    width: 600px;
    background-color: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: auto;
    
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    display: block;
}

.history-table h3 {
    text-align: center;
    color: #333;
    margin-bottom: 15px;
}

#historyTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

#historyTable th, #historyTable td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid #e0e0e0;
    font-size: 14px;
}

#historyTable th:nth-child(1),
#historyTable td:nth-child(1) {
    width: 10%;
}

#historyTable th:nth-child(2),
#historyTable td:nth-child(2) {
    width: 75%;
}

#historyTable th:nth-child(3),
#historyTable td:nth-child(3) {
    width: 15%;
}

#historyTable th {
    background-color: #4472C4;
    color: white;
    font-weight: bold;
    font-size: 16px;
    position: sticky;
    top: 0;
}

.buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}

.download-btn {
    padding: 12px 24px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
}

.download-btn:hover {
    background-color: #45a049;
}
.app-container > div {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.pailie {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-radius: 8px;
    margin-left: 10px;
    justify-content: center;
    align-items: center;
}

.download-btn {
    margin-left: 20px;
    width: 220px;
}

.pailie1 {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    border-radius: 8px;
    justify-content: center;
    align-items: stretch;
    margin: 10px 0;
}

.dimension-input {
    width: 205px;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc; 
}

.dimension-input1 {
    width: 220px;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc; 
}