/* Tournament detail page styles */

.tournament-hero {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
}

.th-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.th-status.comenzado {
    background-color: rgba(46, 213, 115, 0.15);
    color: var(--accent-success);
}

.th-status.proximo {
    background-color: rgba(108, 99, 255, 0.15);
    color: var(--accent-primary);
}

.th-status.finalizado {
    background-color: rgba(108, 108, 136, 0.15);
    color: var(--text-muted);
}

.tournament-hero h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.th-meta p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}

.th-description {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    font-style: italic;
}

/* Categories grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}

.category-card {
    padding: 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.category-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.cat-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-details span {
    font-size: 12px;
    padding: 2px 8px;
    background-color: var(--bg-input);
    border-radius: 12px;
    color: var(--text-secondary);
}

.cat-teams {
    font-size: 12px;
    color: var(--text-secondary);
}

.cat-teams b {
    font-size: 14px;
}

/* Teams grid */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.team-card {
    padding: 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
/*    text-align: center;*/
    position: relative;
}

.team-head {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.team-seed {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-primary);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.team-card h3 {
    font-size: 15px;
    margin-top: 1rem;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.team-group {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    background-color: rgba(108, 99, 255, 0.1);
    color: var(--accent-primary);
    border-radius: 12px;
    margin-bottom: 6px;
}

.team-players {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-size: 14px;
}

.team-record {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

/* Phase blocks */
.phase-block {
    margin-bottom: 24px;
}

.phase-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 18px;
    color: var(--text-secondary);
}

.phase-badge {
    font-size: 11px;
    padding: 3px 10px;
    background-color: rgba(108, 99, 255, 0.1);
    color: var(--accent-primary);
    border-radius: 12px;
    font-weight: 600;
}

.phase-sets {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: normal;
}

/* Matches table */
.matches-table {
    font-size: 14px;
}

.matches-table .winner {
    font-weight: 700;
    color: var(--accent-success);
}

.date-cell i {
    font-size: 10px;
    color: var(--text-secondary);
}

.team-cell {
    min-width: 120px;
}

.team-cell i {
    color: var(--text-secondary);
}

.vs-cell {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    width: 40px;
}

.score-cell {
    font-weight: 600;
    text-align: center;
    min-width: 100px;
}

.set-score {
    display: inline-block;
    margin: 0 2px;
    padding: 2px 6px;
    background-color: var(--bg-input);
    border-radius: 4px;
    font-size: 12px;
}

.status-cell {
    font-size: 12px;
    text-align: center;
}

.status-cell small {
    color: var(--text-muted);
}

.match-row.finalizado td {
    opacity: 0.9;
}

.match-row.finalizado .team-cell.winner {
    opacity: 1;
}

/* Leaderboard table */
.actions-head {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

.leaderboard-table {
    font-size: 14px;
}

.leaderboard-table th {
    text-align: center;
}

.leaderboard-table td {
    text-align: center;
}

.rank-cell {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 16px;
}

.lb-row:nth-child(1) .rank-cell {
    color: #ffd700;
}

.lb-row:nth-child(2) .rank-cell {
    color: #c0c0c0;
}

.lb-row:nth-child(3) .rank-cell {
    color: #cd7f32;
}

@media (max-width: 768px) {
    .tournament-hero {
        padding: 20px;
    }

    .tournament-hero h1 {
        font-size: 22px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .matches-table {
        font-size: 12px;
    }

    .team-cell {
        min-width: 80px;
    }

    .leaderboard-table {
        font-size: 12px;
    }
}
