/* Heading styling */
h1 {
    text-align: center;
    font-size: 1.5rem;
    margin: 20px 0;
    color: #f0f0f0;
}

/* Unit switch styling */
.unit-switch {
    text-align: center;
    margin-bottom: 10px;
}

.unit-switch a {
    color: #ccc;
    text-decoration: none;
    margin: 0 10px;
}

.unit-switch a.active {
    font-weight: bold;
    color: #fff;
}

/* Table styling */

th.asc::after {
    content: " ▲";
}

th.desc::after {
    content: " ▼";
}


table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px auto;
    background-color: #1a1a1a; /* Darker table background */
    color: #ccc; /* Softer text color */
}

th, td {
    padding: 10px;
    text-align: left;
    border: 1px solid #1d1d1d; /* Faint vertical lines */
    border-top: 1px solid #3d3d3d; /* Faint vertical lines */
    border-bottom: 1px solid #3d3d3d; /* Faint vertical lines */
}

th {
    background-color: #2a2a2a;
    color: #f0f0f0;
}

tr.packed {
    background-color: #333; /* Slightly lighter for packed rows */
}

img {
    max-width: 400px;
    max-height: 150px;
}


/* General body styling */
body {
    font-family: Arial, sans-serif;
    background-color: #222;
    color: #ddd;
    margin: 0;
    padding: 0;
}

/* Header layout */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #222;
    color: #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 50px;
    border-bottom: 1px solid #444;
}

.header-container h1 {
    margin: 0;
    font-size: 1.5em;
}

.unit-switch {
    font-size: 0.9em;
}

/* Table container */
.table-container {
    margin-top: 0;
    height: calc(100vh - 49px); /* Full height minus the header */
    overflow-y: auto; /* Vertical scrolling */
}

/* Sticky table header */
#data-table thead tr {
    position: sticky;
    top: -1px; /* Align with the page header height */
    background-color: #333;
    z-index: 999;
}

#data-table thead th {
    color: #ddd;
    padding: 10px;
    border-bottom: 1px solid #444;
}

/* Ensure table cells with images are positioned correctly */
#data-table td img {
    position: relative; /* Ensure the image is above the pseudo-element */
    z-index: 2; /* Place the image above the background */
}

/* Add the blurred background to the table cell */
#data-table td.image-cell {
    position: relative; /* Enable positioning for the pseudo-element */
}

/* Styling for the image wrapper */
.image-wrapper {
    position: relative; /* Enable positioning for the pseudo-element */
    display: inline-block; /* Ensure it wraps tightly around the image */
}

/* Pseudo-element for the blurred background */
.image-wrapper::before {
    content: ''; /* Required for the pseudo-element to appear */
    position: absolute;
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust for centering */
    width: 100%; /* Larger than the image */
    height: 100%; /* Larger than the image */
    background-color: white; /* White background */
    filter: blur(30px); /* Apply the blur effect */
    border-radius: 30%; /* Optional: rounded edges */
    z-index: 1; /* Place it below the image */
    pointer-events: none; /* Ensure it doesn't block interactions */
}

/* Ensure the image is above the blurred background */
.image-wrapper img {
    position: relative; /* Ensure it's above the pseudo-element */
    z-index: 2; /* Place the image above the background */
}