:root {
    --ustt-primary: #323f6c;
}

.btn-primary {
    background-color: var(--ustt-primary);
    border-color: var(--ustt-primary);
}

.btn-primary:hover {
    background-color: #283254;
    border-color: #283254;
}

.btn-outline-primary {
    color: var(--ustt-primary);
    border-color: var(--ustt-primary);
}

.btn-outline-primary:hover {
    background-color: var(--ustt-primary);
    border-color: var(--ustt-primary);
}

.nav-tabs .nav-link.active {
    color: var(--ustt-primary);
    border-bottom-color: var(--ustt-primary);
}

.nav-tabs .nav-link:hover {
    color: var(--ustt-primary);
}

.team-category-section:last-child {
    margin-bottom: 0 !important;
}

.team-category-heading {
    letter-spacing: 0.04em;
    border-bottom: 2px solid rgba(50, 63, 108, 0.2);
    padding-bottom: 0.5rem;
}

.team-score-link {
    cursor: pointer;
}

.team-score-link:hover .badge {
    filter: brightness(1.15);
}

.team-card {
    background-color: var(--ustt-primary);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s ease;
}

.team-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.team-card-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    color: white;
    gap: 1rem;
}

.team-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.team-info {
    flex: 1;
    min-width: 0;
}

.team-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
}

.team-division {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 2px;
}

.team-results {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 100px;
    justify-content: flex-end;
}

.result-bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.result-win {
    background-color: #28a745;
}

.result-draw {
    background-color: #6c757d;
}

.result-loss {
    background-color: #dc3545;
}

.team-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.team-card-header[aria-expanded="true"] .team-chevron {
    transform: rotate(90deg);
}

.team-card-header[aria-expanded="true"] .team-chevron i {
    transform: none;
}

.team-card-body {
    background-color: white;
    padding: 1rem;
    border-top: none;
}

.next-match-container {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
}

.next-match-header {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.75rem;
    text-align: center;
}

.next-match-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.next-match-details .team-a,
.next-match-details .team-b {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
}

.next-match-details .team-a {
    text-align: left;
}

.next-match-details .team-b {
    text-align: right;
}

.next-match-details .match-status {
    flex-shrink: 0;
}

.next-match-date {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
}

.next-match-loading {
    text-align: center;
    color: #666;
    padding: 0.5rem;
}

.team-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.team-actions .btn {
    flex: 1;
    min-width: 200px;
}

.ranking-position {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: #e9ecef;
    border-radius: 4px;
    font-weight: 600;
}

.ranking-position.top-three {
    background-color: #ffc107;
    color: #212529;
}

@media (max-width: 767.98px) {
    .team-card-header {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .team-rank {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .team-name {
        font-size: 0.9rem;
    }

    .team-division {
        font-size: 0.7rem;
    }

    .team-results {
        max-width: 70px;
    }

    .result-bullet {
        width: 10px;
        height: 10px;
    }

    .next-match-details {
        flex-direction: column;
        text-align: center;
    }

    .next-match-details .team-a,
    .next-match-details .team-b {
        text-align: center;
        width: 100%;
    }

    .team-actions {
        flex-direction: column;
    }

    .team-actions .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .team-card-header {
        flex-wrap: wrap;
    }

    .team-results {
        order: 4;
        max-width: none;
        width: 100%;
        justify-content: flex-start;
        margin-top: 0.5rem;
    }
}
