/* CSS Variables for Colors */
:root {
    --primary-blue: #007bff;
    --dark-blue: #0056b3;
    --red-error: #dc3545;
    --alert-yellow-bg: #fff3cd;
    --alert-yellow-text: #856404;
    --border-yellow-alert: #ffeeba;
    --text-color-dark: #333;
    --text-color-medium: #555;
    --text-color-light: #666;
    --text-color-lighter: #888;
    --bg-light-grey: #f4f6f8; /* Changed to match original suggestion, user had #ffffff */
    --bg-white: #fff;
    --bg-light-blue: #f9fcff;
    --bg-results-light-blue: #f0f8ff;
    --bg-results-section: #f8f8f8;
    --header-blue: #2c3e50;
    --green-success: #28a745;
    --green-success-dark: #218838;
    --border-light: #eee;
    --border-medium: #ddd;
    --table-header-bg: #3498db;
    --table-header-border: #2980b9;
}

/* General Body & Container */
body {
    font-family: 'Roboto', Arial, sans-serif; /* Hoặc font bạn chọn */
    background-color: var(--bg-white); /* Nền tổng thể trang */
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: var(--text-color-dark);
    overflow-x: hidden; /* Ngăn chặn cuộn ngang nếu có nội dung tràn ra */
}

.container {
    background-color: var(--bg-white);
    padding: 30px;
    padding-bottom: 30px; /* Thêm padding dưới cùng cho container lớn nhất */
    border-radius: 0;
    max-width: 1200px; /* Đặt max-width cố định cho container */
    width: 90%; /* Dùng 90% chiều rộng của viewport, nhưng không vượt quá max-width */
    text-align: center;
    box-sizing: border-box;
    margin-left: auto; /* Căn giữa container */
    margin-right: auto; /* Căn giữa container */
}

/* Headings */
h1 {
    color: var(--dark-blue);
    margin-bottom: 20px;
    font-size: 2.5em;
    font-weight: bold;
}

h2 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 1.8em;
}

h3 {
    color: var(--text-color-dark);
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* Descriptions */
.description {
    font-size: 1.1em;
    color: var(--text-color-medium);
    margin-bottom: 30px;
    line-height: 1.6;
}

.description-small {
    font-size: 1em;
    color: var(--text-color-medium);
    margin-bottom: 25px;
}

/* Alert Messages */
.alert-message {
    background-color: var(--alert-yellow-bg);
    color: var(--alert-yellow-text);
    border: 1px solid var(--border-yellow-alert);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
}

.error-message {
    color: var(--red-error);
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Upload Area */
.upload-area {
    border: 3px dashed var(--primary-blue);
    border-radius: 10px;
    padding: 40px 20px;
    background-color: var(--bg-light-blue);
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    margin-bottom: 30px;
}

.upload-area.dragover {
    background-color: #e6f7ff; /* Specific light blue for dragover */
    border-color: var(--dark-blue);
}

.upload-area p {
    margin: 10px 0;
    color: var(--text-color-light);

}

.upload-area .small-text {
    font-size: 0.85em;
    color: var(--text-color-lighter);
}

/* Buttons */
.button {
    display: inline-block;
    padding: 12px 25px;
    margin: 10px 5px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    text-align: center;
}

.button-primary {
    background-color: var(--primary-blue);
    color: var(--bg-white);
}

.button-primary:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
}

.button-small {
    padding: 8px 15px;
    font-size: 0.9em;
    border-radius: 6px;
    background-color: var(--green-success);
    color: var(--bg-white);
}

.button-small:hover {
    background-color: var(--green-success-dark);
}

/* Quality Setting */
.quality-setting {
    margin-top: 25px;
    margin-bottom: 25px;
}

.quality-setting label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.quality-setting input[type="range"] {
    width: 80%;
    max-width: 400px;
    -webkit-appearance: none;
    height: 8px;
    background: var(--border-medium);
    border-radius: 5px;
    outline: none;
    transition: background 0.2s;
}

.quality-setting input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-blue);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.quality-setting input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-blue);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

/* Output Format Setting (Select Box) */
.output-format-setting {
    margin-top: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.output-format-setting label {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.select-box {
    padding: 10px 15px;
    border: 1px solid var(--border-medium);
    border-radius: 5px;
    font-size: 1em;
    width: 60%;
    max-width: 250px;
    background-color: var(--bg-results-section);
    color: var(--text-color-dark);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%20197.8c-1.3%201.3-2.7%202.4-4.2%203.4l-140.6%20140.6c-4%204-10.5%204-14.5%200l-140.6-140.6c-1.3-1.3-2.4-2.7-3.4-4.2-2.1-3.2-3.2-6.9-3.2-10.7s1.1-7.5%203.2-10.7c1.3-1.3%202.7-2.4%204.2-3.4l140.6-140.6c4-4%2010.5-4%2014.5%200l140.6%20140.6c1.3%201.3%202.4%202.7%203.4%204.2%202.1%203.2%203.2%206.9%203.2%2010.7s-1.1%207.5-3.2%2010.7z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.select-box:focus {
    border-color: var(--primary-blue);
    outline: none;
}

/* Input Fields (for custom dimensions) */
.input-field {
    padding: 10px;
    border: 1px solid var(--border-medium);
    border-radius: 5px;
    font-size: 1em;
    margin: 5px;
    width: 100px;
    text-align: center;
}
.input-field:focus {
    border-color: var(--primary-blue);
    outline: none;
}

/* Site Header and Navigation */
.header-and-nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-medium);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* Thêm đổ bóng nhẹ ở đây */
}

.site-header {
    margin-top: 0;
    margin-bottom: 0;
    text-align: left;
}

.logo-link {
    display: inline-block;
}

.site-logo {
    width: 200px;
    height: auto;
    display: block;
    margin: 0;
}

.main-nav {
    background-color: transparent;
    border-bottom: none;
    padding: 0;
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: right;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.main-nav ul li {
    margin: 0 15px;
}

.main-nav ul li a {
    text-decoration: none;
    color: var(--text-color-medium);
    font-weight: normal;
    padding: 5px 0;
    border-radius: 0;
    transition: all 0.3s ease;
    display: block;
    white-space: nowrap;
}

.main-nav ul li a:hover {
    background-color: transparent;
    color: #e30000; /* Specific red for hover */
}

.main-nav ul li a.active {
    background-color: transparent;
    color: #e30000; /* Specific red for active */
    font-weight: bold;
    box-shadow: none;
    border-bottom: 2px solid #e30000; /* Specific red for active border */
}

.main-nav ul li a.active:hover {
    background-color: transparent;
    color: #e30000;
}

.main-nav ul li a .fas {
    display: none; /* Hide icons in the menu */
}

/* Tool Selection for index.php */
.tool-selection {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 50px;
}

.tool-card {
    background-color: var(--bg-results-section);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 30px;
    flex-basis: 300px;
    flex-grow: 1;
    max-width: 400px;
    text-decoration: none;
    color: var(--text-color-dark);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-blue);
}

.tool-card .icon {
    font-size: 3.5em;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.tool-card h2 {
    margin-top: 0;
    font-size: 1.6em;
    color: var(--dark-blue);
}

.tool-card p {
    font-size: 0.95em;
    color: var(--text-color-light);
    line-height: 1.5;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 30px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--dark-blue);
}

.back-link .fas {
    margin-right: 8px;
}

/* Separator between tools */
.separator {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
    margin: 40px 0;
}

/* Loan Calculator Form */
.main-title {
    font-size: 3em;
    color: var(--dark-blue);
    margin-bottom: 10px;
    font-weight: bold;
}

.section-title {
    font-size: 2em;
    color: var(--primary-blue);
    margin-top: 30px;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    justify-items: stretch;
    align-items: start;
}

.form-grid .form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    font-size: 1em;
    color: var(--text-color-dark);
    margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Radio Button Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
    background-color: var(--bg-results-section);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    padding: 15px;
    height: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    color: var(--text-color-medium);
    margin-bottom: 0;
}

.radio-group input[type="radio"] {
    margin-right: 10px;
    accent-color: var(--primary-blue);
    transform: scale(1.2);
}

/* Bank Logo Display */
.bank-logo-display {
    margin-top: 10px;
    min-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

.bank-logo-display img {
    max-width: 120px;
    max-height: 50px;
    object-fit: contain;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    padding: 5px;
}

/* Form Actions (Buttons) */
.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Results Section - General (from your provided CSS) */
.results-area {
    margin-top: 40px;
    text-align: left;
}

.loan-calculator-results-wrapper {
    background-color: #fff;
    padding: 20px;
    border-radius: 0;
    margin-top: 20px;
}

.results-section {
    padding: 25px;
    background-color: #fff;
    border-radius: 0;
    margin-top: 30px;
}
.results-section > * {
    margin-bottom: 15px;
}
.results-section > :last-child {
    margin-bottom: 0;
}

.results-section h2 {
    text-align: left;
    color: var(--header-blue);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-medium);
    padding-bottom: 10px;
}

.result-summary-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.result-summary,
.loan-overview {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1;
}

.result-summary h3,
.loan-overview h3 {
    color: var(--header-blue);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.result-summary p strong,
.loan-overview p strong {
    font-weight: normal;
    color: var(--text-color-medium);
    display: inline-block;
    width: 140px;
    text-align: left;
    float: left;
    clear: left;
}

.result-summary p span,
.loan-overview p span {
    font-weight: bold;
    color: var(--text-color-dark);
    display: inline-block;
    text-align: right;
    width: calc(100% - 150px);
    float: right;
}

.loan-overview p.total-payment span,
.loan-overview p.monthly-payment-first span {
    font-size: 1.15em;
    color: var(--red-error);
}

.result-summary p.loan-type-display {
    font-style: italic;
    color: #777; /* Specific grey */
}

/* Loan Details Table */
.table-container {
    padding: 15px;
    background-color: var(--bg-white);
    border-radius: 10px;
    overflow-x: auto; /* Cho phép cuộn ngang khi nội dung tràn */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    border: 1px solid var(--border-medium);
}

.table-container h3 {
    color: var(--header-blue);
    margin-bottom: 15px;
    font-size: 1.15em;
    text-align: center;
    margin-top: 0;
    color: var(--text-color-dark);
}

.loan-details-table {
    width: 100%;
    border-collapse: collapse;
    border: none;
}

.loan-details-table th,
.loan-details-table td {
    padding: 10px 12px;
    text-align: right;
    color: var(--text-color-medium);
    border: 1px solid var(--border-medium);
}
/* Loại bỏ border phải cho cột cuối và border dưới cho hàng cuối */
.loan-details-table th:last-child, .loan-details-table td:last-child {
    border-right: 1px solid var(--border-medium); /* Giữ border-right để bảng vuông vắn */
}
.loan-details-table tbody tr:last-child td {
    border-bottom: 1px solid var(--border-medium); /* Giữ border-bottom để bảng vuông vắn */
}

.loan-details-table thead th {
    background-color: var(--table-header-bg);
    color: var(--bg-white);
    font-weight: bold;
    text-align: center;
    border-bottom: 2px solid var(--table-header-border);
}

.loan-details-table tbody tr:nth-child(even) {
    background-color: #f9f9f9; /* Specific light grey for even rows */
}

.loan-details-table tbody tr:hover {
    background-color: #ecf0f1; /* Specific light blue for hover */
}

.loan-details-table td:first-child {
    text-align: center;
}

/* Màu cho các cột quan trọng trong bảng */
.loan-details-table td:nth-child(5) { /* Tổng trả hàng tháng */
    color: var(--red-error);
    font-weight: bold;
}
.loan-details-table td:nth-child(6) { /* Dư nợ cuối kỳ */
    color: #27ae60; /* Specific green */
}

.loan-details-table caption {
    text-align: left;
    padding: 8px;
    font-size: 0.85em;
    color: #777; /* Specific grey */
}

/* Download All Section */
.download-all {
    margin-top: 30px;
    text-align: center;
}

/* Footer (Now inside .container) */
.footer-text {
    margin-top: 40px; /* Tăng khoảng cách từ nội dung trên */
    padding: 20px;
    background-color: var(--primary-blue);
    color: var(--bg-white);
    font-size: 0.9em;
    text-align: center;
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 cột trên màn hình trung bình */
    }
}

@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cột trên màn hình tablet */
    }

    .container {
        padding: 20px; /* Giảm padding cho container trên màn hình nhỏ hơn */
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.5em;
    }

    .tool-card {
        padding: 20px;
        flex-basis: auto; /* Cho phép nó co giãn tốt hơn */
    }

    .tool-card .icon {
        font-size: 2.8em;
    }
}

@media (max-width: 768px) {
    .header-and-nav-wrapper {
        flex-direction: column;
        align-items: center;
        padding: 15px 10px;
    }

    .site-logo {
        width: 150px;
        margin-bottom: 15px;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .main-nav ul li {
        margin: 8px 0;
    }

    .main-nav ul li a {
        font-size: 0.9em;
        padding: 8px 15px;
    }

    .form-grid {
        grid-template-columns: 1fr; /* 1 cột trên màn hình di động */
    }

    .select-box,
    .quality-setting input[type="range"] {
        width: 90%; /* Tăng chiều rộng trên mobile */
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px; /* Giảm padding tổng thể của body */
    }

    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.8em;
    }

    .upload-area {
        padding: 25px 15px;
    }

    .button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

/* Bố cục 2 cột cho phần kết quả (loan calculator) */
.results-two-columns {
    display: grid; /* Sử dụng CSS Grid */
    grid-template-columns: 1fr 1fr; /* Chia thành 2 cột bằng nhau */
    gap: 30px; /* Khoảng cách giữa hai cột */
    text-align: left; /* Căn lề trái cho toàn bộ nội dung trong 2 cột */
    margin-top: 20px; /* Khoảng cách với tiêu đề "Kết quả tính toán" phía trên */
}

/* Các box nội dung trong cột */
.result-summary-box,
.loan-overview-box {
    background-color: #fff;
    border: 1px solid #e0e0e0; /* Subtle border */
    border-radius: 8px; /* Slightly rounded corners */
    padding: 20px;
    margin-bottom: 20px; /* Space between boxes if they stack */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
    text-align: left; /* Align text to the left within the box */
    height: 100%; /* Ensure boxes take full height in flex/grid */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* Đảm bảo tiêu đề và đoạn văn trong các box được căn trái */
.result-summary-box h3,
.loan-overview-box h3 {
    color: #007bff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4em;
    border-bottom: 2px solid #e0e0e0; /* A line under the heading */
    padding-bottom: 10px;
}

.result-summary-box p,
.loan-overview-box p {
    text-align: left;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Responsive: Chuyển sang 1 cột trên màn hình nhỏ */
@media (max-width: 768px) {
    .results-two-columns {
        grid-template-columns: 1fr; /* Chuyển thành 1 cột */
        gap: 20px; /* Giảm khoảng cách */
    }
}

/* --- Specific Styles for Compress.php Results --- */
/* These styles override the general .results-area for the compression results to ensure proper centering and appearance */
.results-area { /* This specifically targets the results div in compress.php */
    background-color: var(--bg-white); /* Nền trắng cho phần kết quả */
    border: 1px solid var(--border-medium); /* Viền nhẹ */
    border-radius: 8px; /* Góc bo tròn */
    padding: 25px; /* Tăng khoảng đệm bên trong để nội dung không bị sát viền */
    margin: 30px auto; /* Căn giữa khối và tạo khoảng cách trên/dưới */
    max-width: 900px; /* Giới hạn chiều rộng tối đa của khối kết quả */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Đổ bóng nhẹ nhàng */
    text-align: center; /* Căn giữa nội dung bên trong khối kết quả (như tiêu đề H3 và nút tải xuống) */
}

.results-area h3 {
    color: var(--primary-blue);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.6em;
    border-bottom: 2px solid var(--border-medium); /* Đường kẻ dưới tiêu đề */
    padding-bottom: 10px;
}

/* Styling for the results table in compress.php */
.results-table {
    width: 100%; /* Bảng chiếm toàn bộ chiều rộng của container cha */
    border-collapse: collapse; /* Gộp các đường viền của ô */
    margin: 20px auto; /* Căn giữa bảng và tạo khoảng cách */
    font-size: 0.95em;
}

.results-table th,
.results-table td {
    border: 1px solid var(--border-light); /* Viền cho các ô */
    padding: 12px 15px; /* Tăng khoảng đệm cho nội dung trong ô */
    text-align: left; /* Căn chỉnh văn bản sang trái */
}

.results-table th {
    background-color: var(--bg-results-section); /* Nền cho hàng tiêu đề */
    font-weight: bold;
    color: var(--text-color-dark);
    text-transform: uppercase;
}

.results-table tbody tr:nth-child(odd) {
    background-color: var(--bg-white); /* Nền xen kẽ cho các hàng */
}

.results-table tbody tr:hover {
    background-color: var(--bg-results-light-blue); /* Hiệu ứng hover khi di chuột qua hàng */
}

/* Styling for the download button within the table */
.results-table .button-small {
    padding: 8px 12px;
    font-size: 0.85em;
    border-radius: 5px;
    background-color: var(--primary-blue); /* Use primary blue for consistency */
}
.results-table .button-small:hover {
    background-color: var(--dark-blue);
}

/* Ensure the reduction text color is correct */
.results-table .green-text {
    color: var(--green-success);
    font-weight: bold;
}

/* Responsive adjustments for tables on smaller screens */
@media (max-width: 768px) {
    .results-table,
    .results-table thead,
    .results-table tbody,
    .results-table th,
    .results-table td,
    .results-table tr {
        display: block;
    }

    .results-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .results-table tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-light);
        border-radius: 8px;
        overflow: hidden;
    }

    .results-table td {
        border: none;
        border-bottom: 1px solid var(--border-light);
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    .results-table td:before {
        position: absolute;
        top: 0;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }

    /* Labeling the data cells for mobile */
    .results-table td:nth-of-type(1):before { content: "Tên tệp:"; }
    .results-table td:nth-of-type(2):before { content: "Kích thước gốc:"; }
    .results-table td:nth-of-type(3):before { content: "Kích thước nén:"; }
    .results-table td:nth-of-type(4):before { content: "Giảm (%):"; }
    .results-table td:nth-of-type(5):before { content: "Tải xuống:"; }

    .results-table .button-small {
        margin-top: 10px; /* Add space for buttons in mobile view */
    }
}

/* Specific styling for the download-all button below the table */
.download-all {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border-medium); /* Đường kẻ phân cách */
    text-align: center; /* Ensure the button is centered */
}

.download-all .button-primary {
    padding: 12px 25px;
    font-size: 1.1em;
}