body {
    font-family: Arial, sans-serif;
    margin: 10px;
    transition: background-color 0.3s, color 0.3s;
}

body.light-mode {
    background-color: #ffffff;
    color: #000000;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.header-container {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: flex-start;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.title-image {
    max-width: 75px;
    height: auto;
}

.site-title {
    margin: 0;
    font-size: 2em;
}

.header-right {
    position: absolute;
    top: 20px;
    right: 20px;
}

#night-mode-toggle {
    padding: 8px 12px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#night-mode-toggle:hover {
    background-color: #357abd;
}

body.light-mode #night-mode-toggle {
    background-color: #007bff;
}

body.light-mode #night-mode-toggle:hover {
    background-color: #0056b3;
}

.options {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.options a {
    color: #4a90e2;
    text-decoration: none;
}

.options a:hover {
    text-decoration: underline;
}

body.light-mode .options a {
    color: #007bff;
}

body.light-mode .options a:hover {
    text-decoration: underline;
}

.options form {
    display: inline-flex;
    gap: 10px;
}

.options select {
    padding: 5px;
    border-radius: 4px;
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
}

body.light-mode .options select {
    background-color: #fff;
    color: #000;
    border: 1px solid #ccc;
}

.options input[type="number"] {
    padding: 5px;
    border-radius: 4px;
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    box-sizing: border-box;
    width: 70px;
}

body.light-mode .options input[type="number"] {
    background-color: #fff;
    color: #000;
    border: 1px solid #ccc;
}

.options button {
    padding: 5px 10px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.options button:hover {
    background-color: #357abd;
}

body.light-mode .options button {
    background-color: #007bff;
}

body.light-mode .options button:hover {
    background-color: #0056b3;
}

.twitch-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 5px;
}

.twitch-icon.track-icon {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    width: 24px;
    height: 24px;
    filter: invert(1);
}

body.light-mode .twitch-icon.track-icon{
    filter: invert(0);
}

.schedule-link, .user-link {
    color: #4a90e2;
    text-decoration: none;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background-color 0.2s, color 0.2s;
}

.schedule-link:hover, .user-link:hover {
    background-color: #4a90e2;
    color: #ffffff;
}

body.light-mode .schedule-link, body.light-mode .user-link {
    color: #007bff;
}

body.light-mode .schedule-link:hover, body.light-mode .user-link:hover {
    background-color: #007bff;
    color: #ffffff;
}

.user-link {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.raidfinder-table .user-link {
    max-width: 150px;
}

.search-box {
    display: inline-block;
    width: 200px;
}

#user-search {
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid #555;
    background-color: #333;
    color: #e0e0e0;
}

body.light-mode #user-search {
    border: 1px solid #ccc;
    background-color: #fff;
    color: #000;
}

#search-results {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    width: 200px;
    z-index: 1000;
    display: none;
}

body.light-mode #search-results {
    background-color: #fff;
    border: 1px solid #ccc;
}

#search-results:not(:empty) {
    display: block;
}

#search-results li {
    padding: 8px;
    cursor: pointer;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#search-results li:hover {
    background-color: #4a90e2;
    color: #ffffff;
}

body.light-mode #search-results li {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.light-mode #search-results li:hover {
    background-color: #e0e0e0;
    color: #000;
}

.raidfinder-table, .schedule-table {
    border-collapse: collapse;
    margin-top: 20px;
}

.raidfinder-table th, .schedule-table th {
    background-color: #333;
    padding: 8px;
    text-align: center;
    border: 1px solid #555;
}

body.light-mode .raidfinder-table th, body.light-mode .schedule-table th {
    background-color: #f4f4f4;
    border: 1px solid #ddd;
}

.raidfinder-table td, .schedule-table td {
    padding: 4px;
    border: 1px solid #555;
    position: relative;
    text-align: center;
}

body.light-mode .raidfinder-table td, body.light-mode .schedule-table td {
    border: 1px solid #ddd;
    text-align: center;
}

.raidfinder-table td:has(.user-link) {
    text-align: left;
}

body.light-mode .raidfinder-table td:has(.user-link) {
    text-align: left;
}

.raidfinder-table th.timeslot-header,
.schedule-table th.timeslot-header {
    font-size: 0.8em;
    padding: 4px;
}

.raidfinder-table th.current-column,
.schedule-table th.current-column{
    border-left: 2px solid #d1c7a0;
    border-right: 2px solid #d1c7a0;
    border-top: 2px solid #d1c7a0;
    background-color: rgba(209, 199, 160, 0.2);
}

.raidfinder-table td.current-column,
.schedule-table td.current-column{
    border-left: 2px solid #d1c7a0;
    border-right: 2px solid #d1c7a0;
}

body.light-mode .raidfinder-table th.current-column,
body.light-mode .schedule-table th.current-column{
    border-left: 2px solid #cc9900;
    border-right: 2px solid #cc9900;
    border-top: 2px solid #cc9900;
    background-color: rgba(204, 153, 0, 0.2);
}

body.light-mode .raidfinder-table td.current-column,
body.light-mode .schedule-table td.current-column{
    border-left: 2px solid #cc9900;
    border-right: 2px solid #cc9900;
}

.raidfinder-table td[data-tooltip]:hover:after,
.schedule-table td[data-tooltip]:hover:after{
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: pre;
    z-index: 1000;
    min-width: 120px;
    text-align: center;
    pointer-events: none;
}

body.light-mode .raidfinder-table td[data-tooltip]:hover:after,
body.light-mode .schedule-table td[data-tooltip]:hover:after{
    background-color: #f4f4f4;
    color: #000;
    border: 1px solid #ccc;
    pointer-events: none;
}

.error-message {
    color: #ff5555;
    font-size: 1.1em;
    margin-top: 20px;
    text-align: center;
}

body.light-mode .error-message {
    color: #cc0000;
}

main {
    width: 100%;
    margin: 0;
}

footer {
    text-align: center;
    margin-top: 50px;
    font-size: 0.9em;
    color: #aaa;
}

body.light-mode footer {
    color: #666;
}