/* Grid de 3 columnas */
.global-grid {
    display: grid;
    grid-template-columns: 330px 330px 330px;
    gap: 9px;
    margin-bottom: 40px;
}

/* Cada sección */
.global-section {
    border: 1px solid rgba(198, 123, 62, 0.25);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(10, 10, 10, 0.6);
    box-shadow: 0 0 40px rgba(198, 123, 62, 0.07), 0 8px 32px rgba(0,0,0,0.5);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.global-section:nth-child(1) { animation-delay: 1.0s; }
.global-section:nth-child(2) { animation-delay: 1.2s; }
.global-section:nth-child(3) { animation-delay: 1.4s; }

/* Header de cada sección */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(198, 123, 62, 0.08);
    border-bottom: 1px solid rgba(198, 123, 62, 0.3);
    flex-direction: column;
}

.section-icon {
    font-size: 1rem;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--bronze-glow);
    flex: 1;
}

.section-ver-mas {
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ash-grey);
    text-decoration: none;
    border: 1px solid rgba(141,141,141,0.2);
    border-radius: 3px;
    padding: 3px 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.section-ver-mas:hover {
    color: var(--gold-highlight);
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.06);
}
.player-link {
    display: inline-block;  /* <-- imprescindible */
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.player-link[title]:hover::after {
    content: attr(title);
    position: absolute;
    background: var(--iron-grey);
    border: 1px solid rgba(198, 123, 62, 0.4);
    color: var(--smoke-white);
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 100;
}

/* Badge de tipo de ranking (ícono clickeable al lado del nombre) */
.rank-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    margin-right: 6px;
    text-decoration: none;
    border-radius: 3px;
    background: rgba(198, 123, 62, 0.08);
    border: 1px solid rgba(198, 123, 62, 0.25);
    transition: all 0.3s;
    vertical-align: middle;
}

.rank-type-badge:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.5);
    transform: scale(1.2);
}
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;  /* <-- clave */
}
.ranking-table td {
    overflow: hidden;
    max-width: 0;  /* <-- fuerza al contenido a respetar el ancho de la columna */
}
.ranking-table td:first-child {
    width: 60%;
}

.ranking-table td:last-child {
    width: 40%;
}

.global-section-tournament {
    justify-self: center;
}

.global-section-tournament .ranking-table {
    table-layout: fixed;
}

.global-section-tournament .ranking-table td {
    max-width: 0;
}

.tournament-preview-table th,
.tournament-preview-table td {
    padding: 9px 4px;
    font-size: 0.68rem;
    line-height: 1.2;
}

.tournament-preview-table th {
    letter-spacing: 1px;
}

.tournament-preview-table th:nth-child(1),
.tournament-preview-table td:nth-child(1) {
    width: 29%;
}

.tournament-preview-table th:nth-child(2),
.tournament-preview-table td:nth-child(2),
.tournament-preview-table th:nth-child(3),
.tournament-preview-table td:nth-child(3) {
    width: 21%;
}

.tournament-preview-table th:nth-child(4),
.tournament-preview-table td:nth-child(4) {
    width: 14%;
}

.tournament-preview-table th:nth-child(5),
.tournament-preview-table td:nth-child(5) {
    width: 15%;
}

.tournament-preview-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--smoke-white);
}

.tournament-preview-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    padding: 1px 4px;
    border-radius: 999px;
    font-size: 0.62rem;
    line-height: 1.1;
}

.tournament-preview-state-resolved {
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.34);
    background: rgba(212, 175, 55, 0.08);
}

.tournament-preview-state-pending,
.tournament-preview-state-walkover {
    color: #c67b3e;
    border: 1px solid rgba(198, 123, 62, 0.34);
    background: rgba(198, 123, 62, 0.08);
}

.tournament-preview-state-warning,
.tournament-preview-state-cancelled {
    color: #f2b8a0;
    border: 1px solid rgba(242, 184, 160, 0.34);
    background: rgba(242, 184, 160, 0.08);
}

@media (max-width: 430px) {
    .global-section-tournament {
        width: min(350px, calc(100vw - 20px));
        max-width: none;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .global-grid {
        grid-template-columns: 1fr;
    }
}
