#tb-scores-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 1em;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.tb-points-link {
    text-align: right;
    margin-bottom: 0.5em;
}
.tb-points-link a {
    font-size: 0.7em;
    color: #666;
    text-decoration: none;
    padding: 0.2em 0.5em;
    border-radius: 3px;
    transition: background 0.2s, color 0.2s;
}
.tb-points-link a:hover {
    background: #f0f0f0;
    color: #333;
}
.tb-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.1em;
}
#tb-score-search {
    width: calc(100% - 70px);
    display: inline-block;
    vertical-align: middle;
    font-size: 1em;
    font-weight: 400;
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
#tb-score-reset {
    display: inline-block;
    margin-left: 0;
    padding: 0.4em 1em;
    font-size: 0.95em;
    background: #fff;
    color: #e57373;
    border: 1px solid #e57373;
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
    height: 38px;
    box-shadow: none;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
#tb-score-reset:hover {
    background: #e57373;
    color: #fff;
}
.tb-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.1em 0 0.7em 0;
    font-size: 0.8em;
    color: #666;
}
#tb-refresh {
    background: none;
    border: none;
    color: #2196f3;
    padding: 2px 6px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
#tb-refresh svg {
    display: block;
    width: 20px;
    height: 20px;
    pointer-events: none;
}
#tb-refresh:hover {
    background: #f0f7ff;
}
#tb-scores-table-wrapper {
    overflow-x: auto;
}
#tb-scores-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1em;
}
#tb-scores-table th, #tb-scores-table td {
    padding: 0.5em;
    border-bottom: 1px solid #eee;
    text-align: left;
}
#tb-scores-table th {
    background: #f5f5f5;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    position: relative;
    padding-right: 1.5em;
}
#tb-scores-table th:hover {
    background: #eee;
}
#tb-scores-table th .sort-indicator {
    position: absolute;
    right: 0.5em;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #999;
    border-bottom: 5px solid #999;
    opacity: 0.5;
    transition: opacity 0.2s;
}
#tb-scores-table th:hover .sort-indicator {
    opacity: 0.8;
}
#tb-scores-table th.sort-asc .sort-indicator {
    border-top: none;
    border-bottom: 5px solid #2196f3;
    opacity: 1;
}
#tb-scores-table th.sort-desc .sort-indicator {
    border-bottom: none;
    border-top: 5px solid #2196f3;
    opacity: 1;
}
#tb-loading {
    display: flex;
    align-items: center;
    height: 32px;
}
#tb-main-ui {
    display: block;
}
.tb-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 4px solid #eee;
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    animation: tb-spin 1s linear infinite;
    margin-left: 0.5em;
}
@keyframes tb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@media (max-width: 600px) {
    #tb-scores-container {
        padding: 0.5em;
    }
    #tb-scores-table th, #tb-scores-table td {
        padding: 0.4em;
        font-size: 0.95em;
    }
    #tb-score-search {
        font-size: 0.95em;
    }
    #tb-score-reset {
        font-size: 0.9em;
        height: 32px;
    }
    #tb-time-remaining {
        font-size: 0.7em;
    }
}
#tb-version {
    font-size: 0.6em;
    color: #e0e0e0;
    text-align: right;
    margin-top: 1.5em;
    margin-bottom: 0.2em;
    letter-spacing: 0.05em;
}

/* Points Table Modal */
.tb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em;
    box-sizing: border-box;
}

.tb-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em 1.5em;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.tb-modal-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.tb-modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.tb-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.tb-modal-body {
    padding: 1.5em;
    overflow-y: auto;
    flex: 1;
}

#tb-points-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

#tb-points-table th, #tb-points-table td {
    padding: 0.75em 0.5em;
    border-bottom: 1px solid #eee;
    text-align: left;
}

#tb-points-table th {
    background: #f5f5f5;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    position: relative;
    padding-right: 1.5em;
    font-weight: 600;
}

#tb-points-table th:hover {
    background: #eee;
}

#tb-points-table th .sort-indicator {
    position: absolute;
    right: 0.5em;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #999;
    border-bottom: 5px solid #999;
    opacity: 0.5;
    transition: opacity 0.2s;
}

#tb-points-table th:hover .sort-indicator {
    opacity: 0.8;
}

#tb-points-table th.sort-asc .sort-indicator {
    border-top: none;
    border-bottom: 5px solid #2196f3;
    opacity: 1;
}

#tb-points-table th.sort-desc .sort-indicator {
    border-bottom: none;
    border-top: 5px solid #2196f3;
    opacity: 1;
}

#tb-points-table tbody tr:hover {
    background: #f8f9fa;
}

@media (max-width: 600px) {
    .tb-modal {
        padding: 0.5em;
    }
    .tb-modal-content {
        max-height: 90vh;
    }
    .tb-modal-header {
        padding: 0.75em 1em;
    }
    .tb-modal-body {
        padding: 1em;
    }
    #tb-points-table th, #tb-points-table td {
        padding: 0.5em 0.3em;
        font-size: 0.9em;
    }
} 