body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
    text-align: center;
    padding-top: 80px;
}

h1 {
    color: #333;
    text-align: center;
    display: none;
}

#yearSelectorContainer {
    text-align: center;
    margin-bottom: 20px;
}

select {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

table {
    width: 100%;
    max-width: 800px;
    /* margin: 20px auto; */
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #4caf50;
    color: white;
    text-transform: uppercase;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f8f8f8;
}

tr:hover {
    background-color: #f1f1f1;
}

/* td:nth-child(2), td:nth-child(4) {
    text-align: right;
} */

@media screen and (max-width: 600px) {
    table {
        font-size: 14px;
    }

    th,
    td {
        padding: 10px;
    }
}

#preloader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 1000;
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

#auth-button {
    background: none;
    padding: 0;
    border: none;
    border-radius: none;
    /* margin: auto; */
    display: none;
}

#strava img {
    width: 50px;
    position: absolute;
    top: 10px;
    right: 10px;
}

#logo {
    position: fixed;
    left: 20px;
    top: 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    transform: scale(0.5);
    transform-origin: top left;
}

#logo img {
    width: 50px;
    margin-right: 10px;
}

#tools {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 800px;
}

#shareButton,
#logoutButton {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: white;
    color: black;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: none;
}

#shareButton {
    margin: 0;
    /* display: block; */
}

#logoutButton:hover {
    background-color: white;
}

#donate {
    display: none;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* pro lepší scrollování na iOS zařízeních */
}

#statsTable {
    width: 100%;
    min-width: 300px;
    /* Minimální šířka tabulky, aby se zajistilo, že bude scrollovatelná na malých obrazovkách */
}

/* Media query pro mobilní zařízení */
@media screen and (max-width: 300px) {
    .table-container {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media screen and (min-width: 600px) {
    #statsTable,
    #tools {
        margin: auto;
    }
}
