/* Base styles */
:root {
    --primary-bg: #f2f2f2;
    --hover-bg: #e0e0e0;
    --border-color: #ddd;
    --text-color: #333;
    --accent-color: #555;
    --button-color: #555;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: Verdana, Arial, sans-serif;
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
    color: var(--text-color);
}

/* Header styles */
.topDivContainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f5f5f5;
    padding: 10px 20px;
    border-bottom: none;
    margin-bottom: 0;
    border-radius: 5px 5px 0 0;
}

.page-title {
    color: var(--text-color);
    margin: 0;
    font-size: 28px;
    text-shadow: 1px 1px 2px var(--shadow-color);
}

.dynamic-text-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dynamic-text {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 18px;
}

.dynamic-text-container img {
    cursor: pointer;
    transition: transform 0.2s;
    width: 40px;
    height: 40px;
    padding: 5px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.dynamic-text-container img:hover {
    transform: rotate(20deg);
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* Table styles */
table {
    font-family: Verdana, Arial, sans-serif;
    font-size: 10px;
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
    border-spacing: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

th {
    background-color: var(--primary-bg);
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    transition: background-color 0.3s ease;
    vertical-align: middle;
    height: 40px;
    font-size: 12px;
    font-weight: bold;
}

.th_hover_link {
    cursor: pointer;
}

.th_hover_link:hover {
    background-color: var(--hover-bg);
}

/* Row styling */
tr:nth-child(even) {
    background-color: var(--primary-bg);
}

tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Column widths */
th:nth-child(1),
td:nth-child(1) {
    width: 5%;
    text-align: center;
}

th:nth-child(2),
td:nth-child(2) {
    width: 5%;
    text-align: center;
}

th:nth-child(3),
td:nth-child(3) {
    width: 14%;
}

th:nth-child(4),
td:nth-child(4) {
    width: 6%;
    text-align: center;
}

th:nth-child(5),
td:nth-child(5) {
    width: 6%;
    text-align: center;
}

th:nth-child(6),
td:nth-child(6) {
    width: 7%;
    text-align: center;
}

th:nth-child(7),
td:nth-child(7) {
    width: 7%;
    text-align: center;
}

th:nth-child(8),
td:nth-child(8) {
    width: 19%;
}

th:nth-child(9),
td:nth-child(9) {
    width: 6%;
    text-align: center;
}

th:nth-child(10),
td:nth-child(10) {
    width: 25%;
}

/* Checkbox styling for filters */
.tri-state-checkbox:indeterminate+label::before {
    content: "-";
    color: black;
}

.tri-state-checkbox:checked+label::before {
    content: "✓";
    color: green;
}

.tri-state-checkbox:not(:checked):not(:indeterminate)+label::before {
    content: "×";
    color: red;
}

/* Cell styling */
td:first-child {
    padding-left: 10px;
}

/* Special styling for marathon and official entrant columns */
td:nth-child(6),
td:nth-child(7) {
    vertical-align: middle;
    font-size: 14px;
}

/* Sticky table header */
thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

thead th {
    background-color: var(--primary-bg);
    box-shadow: 0 1px 2px var(--shadow-color);
    text-align: center;
}

/* Scroll buttons */
.scroll-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
}

.scroll-button {
    background-color: var(--button-color);
    border: none;
    color: white;
    padding: 10px;
    margin: 5px 0;
    cursor: pointer;
    font-size: 20px;
    border-radius: 5px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.scroll-button:hover {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .topDivContainer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .dynamic-text {
        font-size: 14px;
    }

    th,
    td {
        padding: 5px;
        font-size: 9px;
    }
}

/* Image links in table cell */
.image-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.image-links-container a {
    color: #0066cc;
    text-decoration: none;
    cursor: pointer;
    margin-right: 10px;
}

.image-links-container a:hover {
    text-decoration: underline;
    color: #004080;
}