:root {
    --bg-color: #FFFFFF;
    --text-color: #000000;
    --border-color: #000000;
    --active-bg: #000000;
    --active-text: #FFFFFF;
    --finished-text: #A9A9A9;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: none;
    /* Crisper text for e-ink feel */
}

/* Hide Radio Inputs */
input[type="radio"] {
    display: none;
}

/* Sticky Wrapper */
.sticky-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

/* Typography & Layout */
.sticky-header {
    /* Position handled by wrapper now */
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    padding: 0 15px;
    font-family: monospace;
    font-size: 14px;
    font-weight: 700;
}

/* Day Header (All Days View) */
.day-header {
    padding: 10px 15px;
    background-color: var(--bg-color);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 180px;
    /* Approx height of sticky wrapper (50 + ~80 + 50) */
    z-index: 90;
    text-transform: uppercase;
}

/* Filter Bar */
.filter-bar {
    border-bottom: 2px solid var(--border-color);
    padding: 10px 5px;
    background-color: var(--bg-color);
}

.filter-bar-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.filter-row.scrollable {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.filter-row.scrollable::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.filter-label {
    padding: 0 10px;
    font-weight: bold;
    font-size: 14px;
    /* Optional: Hide label if redundant now that layout is clearer?
       Or keep it? "FILTER:" on top left.
       Actually, `nav.filter-bar` has `.filter-label` inside it in `index.html`.
       Let's keep basic styling but maybe hide it if it takes space?
       User didn't ask to remove "FILTER:", but layout suggests pure icon bar might require space.
       Let's keep it simple.
    */
    display: none;
    /* Let's hide it to save space for rows */
}

/* Scroll Hint */
.sport-filter-wrapper {
    position: relative;
    overflow: hidden;
    /* Ensure hint doesn't cause scrollbar */
}

.scroll-hint {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.scroll-hint.right {
    right: 0;
    background: linear-gradient(to right, transparent, var(--bg-color) 80%);
    justify-content: flex-end;
    padding-right: 2px;
}

.scroll-hint.left {
    left: 0;
    background: linear-gradient(to left, transparent, var(--bg-color) 80%);
    justify-content: flex-start;
    padding-left: 2px;
}

.scroll-hint.visible {
    opacity: 1;
}

.scroll-hint svg {
    fill: var(--text-color);
    width: 24px;
    height: 24px;
}

.scroll-hint.right svg {
    animation: bounceHintRight 1.5s infinite;
}

.scroll-hint.left svg {
    animation: bounceHintLeft 1.5s infinite;
}

@keyframes bounceHintRight {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(3px);
    }
}

@keyframes bounceHintLeft {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-3px);
    }
}

/* Common Filter Btn Styles */
.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    /* Standard touch target */
    height: 44px;
    padding: 0 6px;
    /* Allow width to grow for wide icons */
    margin: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    /* Rounded Square */
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.2s;
    background-color: var(--bg-color);
    flex-shrink: 0;
    /* Prevent squashing in flex container */
    /* Ensure visible on potential overlay */
}

/* Remove old separator styles if present */
/* .filter-sep removed */

.filter-btn.icon-btn {
    padding: 5px;
}

.filter-btn svg,
.filter-btn img {
    height: 32px;
    width: auto;
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Day Navigation */
.day-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    /* Separator */
}

.nav-btn {
    flex: 1;
    background: none;
    border: none;
    border-right: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 15px 0;
    cursor: pointer;
    text-transform: uppercase;
}

.nav-btn:last-child {
    border-right: none;
}

.nav-btn:active {
    background-color: var(--active-bg);
    color: var(--active-text);
}


/* Event List */
.event-list {
    padding-bottom: 50px;
}

.event-card {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    align-items: flex-start;
}

.event-time-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    flex-shrink: 0;
    gap: 4px;
}

.event-time {
    font-family: monospace;
    font-size: 16px;
    font-weight: 700;
}

.event-sport-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.event-info {
    flex: 1;
}

.sport-name {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.event-details {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 8px;
    line-height: 1.3;
}

.status-tag {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    padding: 2px 4px;
    /* Optional, adds a bit of boxiness */
}

.status-finished {
    color: var(--finished-text);
}

.status-live {
    background-color: var(--text-color);
    color: var(--bg-color);
    padding: 2px 6px;
}

/* Active State for Filters */
/* Hide the actual input */
input[type="radio"],
input[type="checkbox"] {
    display: none;
}

/* Active State (Checked) */
/* Targeted via JS class toggle because inputs are not siblings in new layout */
.filter-btn.active {
    background-color: transparent;
    /* Keep background transparent */
    color: var(--text-color);
    /* Keep text black */
    border: 3px solid var(--text-color);
    /* Visible thick border */
    /* Valid "rounded box" indication */
}

.filter-btn.active svg {
    fill: var(--text-color);
    /* Keep icon black */
    stroke: var(--text-color);
}

/* Day Navigation - Current Day Button */
#btn-curr {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    font-weight: 900;
    /* Extra bold for "Today" */
    background-color: var(--bg-color);
}

/* Gender Tag */
.gender-tag {
    font-weight: bold;
    margin-right: 5px;
}

/* Nav Extras */
.nav-extras {
    display: flex;
    justify-content: center;
    border-bottom: 2px solid var(--border-color);
    background-color: var(--bg-color);
    padding: 0;
}

.nav-btn-small {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
    width: 100%;
}

.nav-btn-small:active,
.nav-btn-small.active {
    background-color: var(--active-bg);
    color: var(--active-text);
}


/* Meta Tags & Icons */
.meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.meta-icon {
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    padding: 2px 4px;
}

.medal-icon {
    background-color: var(--bg-color);
    /* B&W philosophy: Icons provide meaning */
}

/* No specific color to keep 1-bit style, or maybe inverted? Keeping simple. */


.channel-tag {
    font-size: 11px;
    font-weight: 700;
    background-color: var(--active-bg);
    color: var(--active-text);
    padding: 2px 4px;
    text-transform: uppercase;
}

.loading-message {
    padding: 30px;
    text-align: center;
    font-weight: 700;
    font-family: monospace;
}

/* Hidden by Filter Class */
.hidden-by-filter {
    display: none !important;
}

/* .no-events-message block end */

/* Optional: Invert colors on active press for immediate feedback (e-ink requirement) */
.nav-btn:active,
.filter-btn:active {
    background-color: var(--active-bg);
    color: var(--active-text);
}