.gkaladders-tabs-container {
    width: 100%;
    overflow: visible; /* Cambiar de hidden a visible */
    font-family: Arial, sans-serif;
    clear: both; /* Limpiar floats */
}

/* Asegurar que no haya elementos flotantes interfiriendo */
.gkaladders-tabs-list::before,
.gkaladders-tabs-list::after {
    content: "";
    display: table;
    clear: both;
}

.gkaladders-tabs-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    border-bottom: 2px solid #ddd;
    margin-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gkaladders-tab {
    padding: 10px 15px;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    max-width: 150px;
    margin-right: 5px;
    height: auto;
    border-radius: 5px 5px 0 0;
    flex-shrink: 0; /* Evita que las pestañas se compriman */
    white-space: nowrap; /* Evita que el texto se rompa */
}

.gkaladders-tab:hover {
    background-color: #e0e0e0;
}

.gkaladders-tab.gkaladders-active {
    background-color: #fff;
    border-bottom-color: #fff;
}

.gkaladders-tab-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9em;
    text-align: center;
    word-wrap: break-word;
    hyphens: auto;
    width: 100%;
}

.gkaladders-tab-gender {
    font-size: 0.75em;
    color: #666;
    text-align: center;
    width: 100%;
}

.gkaladders-tab-panel {
    display: none;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
}

.gkaladders-tab-panel.gkaladders-active {
    display: block;
}

.gkaladders-last-tab-btn {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.9em;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    cursor: pointer;
    margin-top: 10px;
}

/* Estilos para dispositivos móviles */
@media (max-width: 768px) {
    .gkaladders-tabs-list {
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .gkaladders-tab {
        min-width: 80px;
        max-width: 120px;
        padding: 8px 10px;
        flex: 0 0 auto;
    }

    .gkaladders-tab-name {
        font-size: 0.8em;
    }

    .gkaladders-tab-gender {
        font-size: 0.7em;
    }

    .gkaladders-heat-header {
        flex-direction: row;
        align-items: center;
    }

    .gkaladders-global-heat {
        float: none;
        margin-top: 0;
    }
}

/* Estilos para los rounds */
.gkaladders-rounds {
    margin-top: 20px;
}

.gkaladders-round {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
}

.gkaladders-round h4 {
    margin-top: 0;
    color: #333;
}

.gkaladders-round p {
    margin: 5px 0;
    color: #666;
}

/* Estilos para pestañas de rounds */
.gkaladders-rounds-tabs-container {
    margin-top: 20px;
    width: 100%;
}

.gkaladders-rounds-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #ddd;
    /*margin-bottom: 15px;*/
}

.gkaladders-round-tab {
    padding: 8px 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    margin-right: 5px;
    margin-bottom: -1px;
    transition: background-color 0.3s;
    font-size: 0.9em;
    font-weight: bold;
}

.gkaladders-round-tab:hover {
    background-color: #e0e0e0;
}

.gkaladders-round-tab.gkaladders-round-active {
    background-color: #fff;
    border-bottom-color: #fff;
}

.gkaladders-round-tab-panel {
    display: none;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
}

.gkaladders-round-tab-panel.gkaladders-round-active {
    display: block;
}

@media (max-width: 768px) {
    .gkaladders-rounds-tabs {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    
    .gkaladders-round-tab {
        flex: 0 0 auto;
        font-size: 0.8em;
        padding: 6px 12px;
    }
}

/* Estilos para los heats */
.gkaladders-heats {
    margin-top: 10px;
    padding-left: 0;
}

.gkaladders-heat {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
}

.gkaladders-heat h5 {
    margin-top: 0;
    color: #333;
}

.gkaladders-heat p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #666;
}

/* Estilos para los riders */
.gkaladders-heat-riders {
    margin-top: 10px;
}

.gkaladders-rider {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gkaladders-rider p {
    display: flex;
    align-items: center;
}

.gkaladders-rider p:first-child {
    font-weight: bold;
}

.gkaladders-rider p:last-child {
    font-weight: bold;
    color: #333;
}

/* Estilos para la información de depuración */
.gkaladders-debug {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    padding: 10px;
    margin: 10px 0;
    font-size: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.gkaladders-debug h6 {
    margin-top: 0;
    color: #333;
}

/* Estilos para el Global Heat */
.gkaladders-heat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gkaladders-heat-header h5 {
    margin: 0;
    flex-grow: 1;
}

.gkaladders-global-heat {
    font-weight: normal;
    color: #666;
    float: right;
}

.gkaladders-flag {
    width: 20px; /* Ajusta este valor según tus preferencias */
    height: auto;
    vertical-align: middle;
    margin-right: 5px;
}

/* Estilos para el botón "Details" */
.gkaladders-details-button {
    display: block;
    margin: 10px auto;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.gkaladders-details-button:hover {
    background-color: #0056b3;
}

/* Estilos para el modal */
.gkaladders-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.gkaladders-modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 95%;
    max-width: 1400px;
}

.gkaladders-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.gkaladders-modal-close:hover,
.gkaladders-modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Estilos para la tabla de detalles de riders */
.gkaladders-heat-details {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Esto asegura que todas las columnas tengan el mismo ancho */
}

.gkaladders-heat-details td,
.gkaladders-heat-details th {
    width: 25%; /* Ajusta este valor según el número de riders que quieras mostrar por fila */
    padding: 10px;
    vertical-align: top;
    text-align: center;
}

.gkaladders-rider-image-container {
    width: 80px; /* Reducido de 100px */
    height: 80px; /* Reducido de 100px */
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
}

.gkaladders-rider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gkaladders-rider-details {
    text-align: center;
}

.gkaladders-rider-flag {
    margin-bottom: 5px;
}

.gkaladders-flag {
    width: 30px;
    height: auto;
}

.gkaladders-rider-name,
.gkaladders-rider-lastname {
    font-weight: bold;
    word-wrap: break-word; /* Permite que los nombres largos se ajusten */
}

.gkaladders-rider-id {
    font-size: 0.8em;
    color: #666;
}

.gkaladders-tricks-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.gkaladders-trick-item {
    margin-bottom: 5px;
    padding: 5px;
    border-radius: 4px;
}

.gkaladders-trick-points {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 2px;
    text-align: center; /* Añadido para asegurar el centrado */
}

.gkaladders-trick-name {
    font-size: 0.9em;
    text-align: center; /* Añadido para asegurar el centrado */
}

@media (max-width: 768px) {
    .gkaladders-heat-details td,
    .gkaladders-heat-details th {
        width: 50%; /* En móviles, muestra 2 riders por fila */
    }
    
    .gkaladders-flag {
        width: 25px;
    }
    
    .gkaladders-trick-item {
        font-size: 0.8em;
    }
    
    .gkaladders-trick-points {
        font-size: 1.1em;
    }
    
    .gkaladders-trick-name {
        font-size: 0.8em;
    }
}

.gkaladders-debug-info {
    margin-top: 20px;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    font-size: 12px;
}

.gkaladders-debug-info pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.gkaladders-rider-total-points {
    font-weight: bold;
    color: #007bff; /* O cualquier color que prefieras */
    margin-top: 5px;
    font-size: 1.2em; /* Aumentado el tamaño */
}

/* Estilo para heats activos */
.gkaladders-heat-active {
    background-color: #e0ffeb !important; /* Verde claro */
    border: 1px solid #a2e5b5 !important;
    box-shadow: 0 0 5px rgba(0, 200, 83, 0.2);
}

/* Estilo para la etiqueta de estado */
.gkaladders-heat-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    margin: 5px 0;
    font-weight: 600;
}

.gkaladders-status-active {
    background-color: #4caf50; /* Verde más intenso para el texto */
    color: white;
}

/* Estilos para los controles de actualización */
.gkaladders-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 10px;
    padding: 4px 8px;
}

.gkaladders-last-update {
    font-size: 0.8em;
    color: #666;
    font-style: italic;
    background-color: #f9f9f9;
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid #eee;
    cursor: default;
    transition: color 0.3s;
}

/* Destacar las pestañas de rounds con heats activos */
.gkaladders-round-tab.gkaladders-round-has-active {
    background-color: #e0ffeb;
    border-color: #a2e5b5;
    position: relative;
}

.gkaladders-round-tab.gkaladders-round-has-active::after {
    content: "•";
    color: #4caf50;
    position: absolute;
    top: 0;
    right: 5px;
    font-size: 18px;
    font-weight: bold;
}

.gkaladders-round-tab.gkaladders-round-has-active.gkaladders-round-active {
    background-color: #fff;
    border-bottom-color: #fff;
}

.gkaladders-round-tab.gkaladders-round-has-active.gkaladders-round-active::after {
    content: "•";
    color: #4caf50;
}

/* Estilos para la pestaña RESULTS */
.gkaladders-round-tab.gkaladders-results-tab {
    background-color: #f7f7f7;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0056b3;
}

.gkaladders-round-tab.gkaladders-results-tab:hover {
    background-color: #e7f0ff;
}

.gkaladders-round-tab.gkaladders-results-tab.gkaladders-round-active {
    background-color: #fff;
    color: #007bff;
    border-bottom-color: #fff;
}

/* Estilos para la tabla de resultados */
.gkaladders-results-header {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.4em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gkaladders-rankings-table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.gkaladders-rankings-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    table-layout: fixed;
}

.gkaladders-rankings-table th {
    background-color: #f5f5f5;
    color: #333;
    padding: 12px 15px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
    white-space: nowrap;
}

.gkaladders-rankings-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.gkaladders-rankings-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.gkaladders-ranking-row:hover {
    background-color: #f0f8ff !important;
}

/* Filas para los primeros puestos */
.gkaladders-ranking-gold {
    background-color: rgba(255, 215, 0, 0.05) !important;
}

.gkaladders-ranking-silver {
    background-color: rgba(192, 192, 192, 0.05) !important;
}

.gkaladders-ranking-bronze {
    background-color: rgba(205, 127, 50, 0.05) !important;
}

/* Columna de posición */
.gkaladders-ranking-pos {
    width: 60px;
    text-align: center;
}

.gkaladders-position-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-weight: bold;
    background-color: #eee;
    color: #333;
}

.gkaladders-position-circle.pos-1 {
    background-color: gold;
    color: #333;
}

.gkaladders-position-circle.pos-2 {
    background-color: silver;
    color: #333;
}

.gkaladders-position-circle.pos-3 {
    background-color: #cd7f32; /* bronce */
    color: #fff;
}

/* Columna de rider */
.gkaladders-ranking-rider {
    text-align: left;
}

.gkaladders-rider-info {
    display: flex;
    align-items: center;
}

.gkaladders-ranking-rider-image {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.gkaladders-ranking-placeholder {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    background-color: #e0e0e0;
}

.gkaladders-rider-name {
    font-weight: 500;
}

/* Columna de país */
.gkaladders-ranking-country {
    width: 80px;
    text-align: center;
}

.gkaladders-flag {
    width: 26px;
    height: auto;
    vertical-align: middle;
    border: 1px solid #eee;
}

/* Columnas de seed y puntos */
.gkaladders-ranking-seed {
    width: 80px;
    text-align: center;
    color: #666;
}

.gkaladders-ranking-points {
    width: 80px;
    text-align: center;
    font-weight: bold;
    color: #007bff;
}

/* Responsive para la tabla de rankings */
@media (max-width: 768px) {
    .gkaladders-rankings-table {
        table-layout: auto;
    }
    
    .gkaladders-rankings-table th,
    .gkaladders-rankings-table td {
        padding: 8px 6px;
        font-size: 0.9em;
    }
    
    .gkaladders-ranking-pos {
        width: 40px;
    }
    
    .gkaladders-position-circle {
        width: 30px;
        height: 30px;
        font-size: 0.9em;
    }
    
    .gkaladders-ranking-rider-image,
    .gkaladders-ranking-placeholder {
        width: 25px;
        height: 25px;
        margin-right: 5px;
    }
    
    .gkaladders-ranking-country {
        width: 40px;
    }
    
    .gkaladders-ranking-seed,
    .gkaladders-ranking-points {
        width: auto;
    }
    
    .gkaladders-flag {
        width: 20px;
    }
}
