/* --- PORTAL DE LIGAS (HUB) --- */
.hub-container {
    padding: 4rem 5%;
    max-width: 1100px;
    margin: 0 auto;
    min-height: 80vh;
}

.hub-header {
    text-align: center;
    margin-bottom: 4rem;
}

.hub-header h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.hub-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Cuadrícula de selección */
.sports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.sport-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sport-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 204, 230, 0.15);
}

.sport-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background-color: rgba(0, 204, 230, 0.05);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(0, 204, 230, 0.2);
    transition: transform 0.3s ease;
}

.sport-card:hover .sport-icon {
    transform: scale(1.1);
    background-color: rgba(0, 204, 230, 0.1);
}

.sport-card h3 {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.sport-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.sport-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

:root {
    --primary-color: #00cce6;
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-light);
    line-height: 1.6;
}

/* --- CABECERA DE LA LIGA --- */
.league-header {
    background-color: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-co h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sport-badge {
    background-color: rgba(0, 204, 230, 0.15);
    color: var(--primary-color);
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.powered-by {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-back {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.btn-back:hover {
    color: #fff;
}

/* --- PANEL DE CONTROL (DASHBOARD) --- */
.dashboard-container {
    padding: 2rem 5%;
    display: grid;
    grid-template-columns: 2fr 1fr; /* La tabla ocupa más espacio que la barra lateral */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.dashboard-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* --- TABLA DE POSICIONES --- */
.table-responsive {
    overflow-x: auto; /* Permite scroll horizontal en móviles si es necesario */
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    padding: 1rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    text-align: left; /* Alinea el nombre del jugador a la izquierda */
}

.data-table td {
    padding: 1rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

.player-name {
    font-weight: 600;
    color: var(--text-light);
}

.top-rank td {
    color: var(--primary-color);
}

/* --- CALENDARIO (TARJETAS DE PARTIDOS) --- */
.match-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.match-card {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.match-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.match-players {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.vs {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.match-court {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- JUGADOR DESTACADO (MVP) --- */
.mvp-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mvp-avatar {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--bg-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.mvp-info h4 {
    margin-bottom: 0.2rem;
}

.mvp-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- RESPONSIVE (MÓVILES) --- */
@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr; /* Apila todo en una sola columna */
    }
}

/* --- VENTANA EMERGENTE (MODAL) --- */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.85); /* Fondo oscuro transparente */
    backdrop-filter: blur(4px); /* Efecto cristal en el fondo */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--primary-color);
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 204, 230, 0.2);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #ef4444; /* Rojo al pasar el mouse */
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.modal-avatar {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: var(--bg-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-rank {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-stats {
    display: flex;
    justify-content: space-between;
    text-align: center;
}

.stat-box h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.stat-box p {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
}

.highlight-text {
    color: var(--primary-color) !important;
}

/* Reutilizamos el estilo del botón de las tarjetas */
.btn-card {
    display: inline-block;
    text-align: center;
    padding: 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-card:hover {
    background-color: var(--primary-color);
    color: var(--bg-main);
    border-color: var(--primary-color);
}