:root {
    --featured: #ffc107;
}

body {
    background: #212529;
    padding-top: 72px;
}

.navbar {
    background: #1e1e1e !important;
}

main.container {
    max-width: 1100px;
}

/* Reference links row at the top of the page */
.links-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.links-bar a {
    font-size: 0.875rem;
}

.links-bar .link-updated {
    font-size: 0.75rem;
    color: #6c757d;
    width: 100%;
}

/* Sync button countdown state */
#sync-btn:disabled {
    cursor: not-allowed;
}

.tournament-card {
    background: #2b3035;
    border: 1px solid #3a4046;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.tournament-meta {
    color: #adb5bd;
    font-size: 0.9rem;
}

.mat-group h3 {
    font-size: 1rem;
    color: #9ec5fe;
    border-bottom: 1px solid #3a4046;
    padding-bottom: 0.25rem;
    margin-top: 1rem;
}

table.mat-table {
    font-size: 0.875rem;
}

table.mat-table td,
table.mat-table th {
    vertical-align: middle;
}

/* Rows / entries involving a featured academy (e.g. Zenith) */
tr.featured,
.featured-reg {
    background: rgba(255, 193, 7, 0.12);
}

.badge-round {
    font-variant: all-small-caps;
    letter-spacing: 0.05em;
}

.featured-chip {
    color: var(--featured);
    border-color: var(--featured);
}

/* Favorite star toggle next to each athlete */
.athlete-cell {
    white-space: normal;
}

.fav-star {
    background: none;
    border: none;
    padding: 0 0.3rem 0 0;
    margin: 0;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: #6c757d;
    vertical-align: baseline;
    transition: color 0.12s ease, transform 0.12s ease;
}

.fav-star:hover {
    color: var(--featured);
    transform: scale(1.15);
}

.fav-star.is-fav {
    color: var(--featured);
}

.fav-star:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Athlete search + autocomplete dropdown */
.athlete-search {
    max-width: 480px;
}

.search-wrap {
    position: relative;
}

.search-results {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    background: #2b3035;
    border: 1px solid #3a4046;
    border-radius: 0.375rem;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.search-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: inherit;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.search-item__star {
    color: #6c757d;
    font-size: 1rem;
    width: 1.1rem;
}

.search-item__star.is-fav {
    color: var(--featured);
}

.search-item__name {
    flex: 0 0 auto;
}

.search-item__club {
    font-size: 0.8rem;
    margin-left: auto;
}

.search-empty {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.mat-more {
    padding-left: 0.25rem;
}

/* Bracket + order-of-fights links */
.bracket-link {
    font-size: 0.8rem;
    white-space: nowrap;
}

.bracket-cell {
    text-align: right;
}

.order-link {
    font-size: 0.8rem;
    font-weight: normal;
}

/* Results section */
.result-division {
    font-size: 1rem;
    color: #9ec5fe;
    border-bottom: 1px solid #3a4046;
    padding-bottom: 0.25rem;
    margin-top: 1rem;
}

.result-group {
    margin-bottom: 1rem;
}

.result-group--ours .result-division {
    color: var(--featured);
}

.result-place {
    font-weight: 600;
    width: 3.5rem;
    white-space: nowrap;
}

.result-place--1 {
    color: #ffd700;
} /* gold */
.result-place--2 {
    color: #c0c0c0;
} /* silver */
.result-place--3 {
    color: #cd7f32;
} /* bronze */

/* Share-this-view footer */
.share-bar {
    border-color: #3a4046 !important;
}

.share-link {
    max-width: 560px;
    margin: 0 auto;
    background: #2b3035;
    color: #e9ecef;
    border-color: #3a4046;
}
