body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #eef2f5;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #ffffff;
    padding: 35px 45px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 700px; /* Tăng max-width cho bể lớn */
    text-align: center;
    border: 1px solid #e0e6ed;
}

h1 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 700;
}

.input-section {
    text-align: left;
    margin-bottom: 22px;
}

.checkbox-section {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
    gap: 10px; /* Khoảng cách giữa checkbox và label */
}

.checkbox-section input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0; /* Ngăn checkbox bị co lại */
}

.checkbox-section label {
    margin-bottom: 0; /* Bỏ margin-bottom của label trong checkbox-section */
    font-size: 16px;
    font-weight: 500;
    color: #4a5568;
}


label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 15px;
}

input[type="number"] {
    width: calc(100% - 22px);
    padding: 13px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="number"]:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
}

button {
    background-color: #007bff;
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 6px;
    font-size: 19px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 25px;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}

button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.results-section {
    margin-top: 40px;
    border-top: 1px solid #e0e6ed;
    padding-top: 30px;
    text-align: left;
}

.results-section h2, .results-section h3 {
    color: #2c3e50;
    margin-bottom: 18px;
    font-size: 26px;
    font-weight: 600;
}

.results-section p {
    font-size: 17px;
    color: #4a5568;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Định dạng Bảng Thống Kê Mảnh Cắt */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    margin-bottom: 30px;
    background-color: #fcfcfc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

table th, table td {
    border: 1px solid #dbe3ed;
    padding: 12px 10px;
    text-align: center;
    font-size: 15px;
    color: #333;
}

table th {
    background-color: #eaf5ff;
    color: #2c3e50;
    font-weight: 700;
    text-transform: uppercase;
}

table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

table tbody tr:nth-child(even) {
    background-color: #f8fbfd;
}

/* Định dạng các kết quả tối ưu để làm nổi bật */
#totalPlasticArea span {
    color: #d35400; /* Màu cam đậm cho tổng diện tích */
    font-size: 1.15em;
    font-weight: bold;
}

#optimalPlasticSolution {
    font-weight: bold;
    color: #28a745; /* Màu xanh lá cây nổi bật */
    font-size: 1.2em;
    margin-top: 20px;
    display: block;
}

#plasticWastePercentage {
    font-size: 1.1em;
    color: #e67e22; /* Màu cam cho tỷ lệ lãng phí */
    font-weight: 600;
}

#plasticSheetsPerTank {
    font-size: 1.1em;
    color: #555;
    font-weight: 500;
}

#stiffenerType strong {
    color: #007bff;
}
#totalSteelAmount strong {
    color: #34495e; /* Màu xám đậm cho thép */
}
#totalPlasticStiffenerAmount strong {
    color: #d35400; /* Màu cam cho nhựa tăng cứng */
}


/* Style cho nút PDF */
.pdf-button {
    background-color: #28a745; /* Màu xanh lá cây */
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.2);
}

.pdf-button:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 25px 30px;
        max-width: 95%;
    }
    h1 {
        font-size: 28px;
    }
    button {
        padding: 12px 25px;
        font-size: 17px;
    }
    .results-section h2, .results-section h3 {
        font-size: 22px;
    }
    .results-section p, table th, table td {
        font-size: 14px;
    }
    table th, table td {
        padding: 10px 6px;
    }
    #optimalPlasticSolution, #plasticWastePercentage, #plasticSheetsPerTank, #stiffenerType, #totalSteelAmount, #totalPlasticStiffenerAmount {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    h1 {
        font-size: 24px;
    }
    .input-section label, .checkbox-section label {
        font-size: 14px;
    }
    input[type="number"] {
        padding: 10px;
        font-size: 14px;
    }
    button {
        padding: 10px 20px;
        font-size: 15px;
    }
}

* Thêm style cho phần phân tích tấm nhựa */
.plastic-sheet-analysis {
    display: flex; /* Dùng flexbox để chia cột */
    justify-content: space-around; /* Chia đều không gian giữa các cột */
    gap: 20px; /* Khoảng cách giữa các cột */
    margin-top: 20px;
    margin-bottom: 25px;
    padding: 15px;
    border: 1px dashed #c0d9ec; /* Viền đứt nét */
    border-radius: 8px;
    background-color: #fcfdfe;
    flex-wrap: wrap; /* Cho phép xuống dòng trên màn hình nhỏ */
}

.sheet-type-result {
    flex: 1; /* Cho phép mỗi cột chiếm không gian bằng nhau */
    min-width: 250px; /* Chiều rộng tối thiểu để không bị quá hẹp */
    padding: 10px;
    border-radius: 5px;
    background-color: #f0f7ff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.sheet-type-result h5 {
    color: #007bff;
    font-size: 1.1em;
    margin-top: 0;
    margin-bottom: 10px;
}

.sheet-type-result p {
    font-size: 0.95em;
    margin-bottom: 5px;
}

.sheet-type-result span {
    font-weight: bold;
    color: #4a5568; /* Màu chữ kết quả */
}

/* Make waste percentage red if high, green if low (optional) */
/* This requires checking the value in JS and adding a class */

/* ... (Giữ nguyên các style cũ) ... */

/* Cập nhật style cho optimalPlasticSolution để nó vẫn là nổi bật chính */
#optimalPlasticSolution {
    font-weight: bold;
    color: #28a745;
    font-size: 1.2em;
    margin-top: 25px; /* Tăng khoảng cách để tách biệt với phân tích chi tiết */
    margin-bottom: 25px; /* Thêm margin-bottom */
    padding: 10px 15px;
    border: 2px solid #28a745; /* Viền đậm cho kết quả tối ưu */
    border-radius: 8px;
    background-color: #e6ffe6; /* Nền nhẹ cho kết quả tối ưu */
}