/* ==========================================================================
   Competition Rankings
   ========================================================================== */

.competition-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 25px;
}

.section-title {
    color: var(--primary-color);
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
    margin-top: 0;
    margin-bottom: 15px;
}

.section-hint {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.hint-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hint-item {
    display: flex;
    align-items: center;
}

.hint-item::before {
    content: "•";
    margin-right: 8px;
    color: var(--primary-color);
    font-weight: bold;
}

.rankings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .rankings-grid {
        grid-template-columns: 1fr;
    }
}

.ranking-card {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 15px;
}

.ranking-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e0e0e0;
}

.attack-title {
    color: #e74c3c;
}

.defence-title {
    color: #27ae60;
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.ranking-position {
    width: 25px;
    text-align: center;
    font-weight: bold;
    color: #7f8c8d;
    margin-right: 10px;
    flex-shrink: 0;
}

.ranking-name {
    flex-grow: 1;
    margin-right: 15px;
    min-width: 0; /* Allows text truncation if needed */
}

.ranking-number {
    width: 30px;
    text-align: right;
    font-size: 0.85em;
    color: #7f8c8d;
    margin-right: 10px;
    flex-shrink: 0;
}

.ranking-team {
    width: 80px;
    font-size: 0.85em;
    color: #7f8c8d;
    margin-right: 10px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-score {
    font-weight: bold;
    text-align: right;
    width: 50px;
    flex-shrink: 0;
}

.attack-score {
    color: #e74c3c;
}

.defence-score {
    color: #27ae60;
}

.rankings-link {
    margin-top: 15px;
    text-align: center;
}
