body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff; /* Base background for the container */
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

h1 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 20px;
}

.sheet-selector {
    margin-bottom: 20px;
    text-align: center; /* Center the dropdown */
}

.sheet-selector label {
    font-weight: bold;
    margin-right: 10px;
    color: #333;
}

.sheet-selector select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    font-size: 16px;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.sheet-selector select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}


.table-responsive {
    overflow-x: auto; /* Enables horizontal scrolling on small screens */
    -webkit-overflow-scrolling: touch; /* Improves scrolling on iOS */
}

table {
    width: 100%;
    border-collapse: collapse; /* Ensure borders are collapsed for clean lines */
    margin-top: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    word-wrap: break-word; /* Ensures long text wraps */
    border-right: 1px solid #ddd; /* Line separating columns */
}

/* Remove the right border from the last column to keep it clean */
th:last-child,
td:last-child {
    border-right: none;
}

/* Alternating Row Colors */
tbody tr:nth-child(odd) {
    background-color: #fcfcfc; /* Very light, almost white */
}

tbody tr:nth-child(even) {
    background-color: #f5f5f5; /* Slightly darker light grey */
}


/* MODIFIED HEADER STYLING */
th {
    background-color: #006b99; /* Darker blue background */
    color: white;           /* White text for contrast */
    font-weight: bold;      /* Text is bold */
    white-space: nowrap;    /* Prevents headers from wrapping unless absolutely necessary */
}

/* --- FIX: Increased specificity for the hover effect --- */
tbody tr:hover { /* Now specifically targets tbody rows on hover */
    background-color: #e9e9e9; /* Hover effect applies to the entire row */
}


/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .sheet-selector {
        text-align: left; /* Align left on smaller screens */
        padding: 0 10px; /* Add some padding */
    }
    .sheet-selector select {
        width: 100%; /* Make dropdown full width */
        box-sizing: border-box; /* Include padding/border in width */
    }

    table, thead, tbody, th, td, tr {
        display: block; /* Makes table elements stack */
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px; /* Hides the table header */
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ccc;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        /* Mobile background is handled by the nth-child(odd/even) on 'tr' but let's be explicit */
        background-color: #fff; /* Default background for mobile card - will be overridden by nth-child */
    }

    /* Apply alternating colors directly to the stacked rows/cards on mobile */
    tr:nth-child(odd) {
        background-color: #fcfcfc; /* Lighter background for odd cards on mobile */
    }
    tr:nth-child(even) {
        background-color: #f5f5f5; /* Slightly darker background for even cards on mobile */
    }

    td {
        border: none; /* Remove borders on mobile as they don't make sense stacked */
        position: relative;
        padding-left: 50%; /* Space for the "label" */
        text-align: right;
        background-color: transparent !important; /* Ensure base color for rows isn't overridden by td-specific colors */
    }

    td:before {
        content: attr(data-label); /* Uses the data-label attribute for the "label" */
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #0056b3;
    }
}

/* Further adjustments for very small screens if needed */
@media (max-width: 480px) {
    td {
        padding-left: 40%;
    }
}