/* Layout general */
:root {
    --panel-card-title-size: 1.7rem;
    --panel-card-text-size: 1.5rem;
}

.panel-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1rem;
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    margin-top:10px !important;
}
@media (min-width: 768px) {
  .panel-container {
    padding: 2rem 2rem;
    max-width: 900px;
  }
}
.panel-container section {
    padding-top: 20px;
}

.panel-filters-section {
    background: #ffffff;
    padding: 1rem;
}

.section-header-with-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header-with-filter h2 {
    margin: 0;
}

.panel-filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
}

.panel-filters .filter-label {
    font-weight: 600;
    color: #1f2937;
    font-size: var(--panel-card-text-size);
    border: 0;
}

/* Ocultar label del filtro en móviles */
@media (max-width: 767px) {
    .panel-filters .filter-label {
        display: none;
    }
}

.panel-filters .filter-select {
    min-width: 125px;
    padding: 0.5rem 0.75rem;
    border: 0.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 1.2rem;
    color: #111827;
    background-color: #ffffff;
    transition: border-color 0.2s ease;
}

.panel-filters .filter-select:focus {
    outline: none;
    border-color: #1976ff;
    box-shadow: 0 0 0 3px rgba(25, 118, 255, 0.15);
}

/* 🟦 Resumen general en tarjetas */
.resumen-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.card {
    background: #f0f4ff;
    border: 1px solid #c3dafe;
    border-radius: 8px;
    padding: 16px;  
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-weight: 600;
    text-align: center;
    font-size: var(--panel-card-text-size);
}

/* Bloques temáticos */
.bloques-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bloques-header {
    display: none;
    grid-template-columns: minmax(200px, 2fr) 220px 120px 140px;
    gap: 12px;
    padding: 0 22px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #6b7280;
}

.bloques-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bloques-empty {
    margin: 0;
    padding: 16px;
    background-color: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    text-align: center;
    color: #6b7280;
}

.bloques-toggle-btn {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding: 8px 16px;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    color: #374151;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.bloques-toggle-btn:hover {
    background-color: #e5e7eb;
    border-color: #cbd5f5;
    color: #1f2937;
}

.bloques-toggle-icon {
    font-size: 1.2rem;
}

.bloque-item {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.bloque-item.is-open {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.bloque-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 18px 22px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: inherit;
}

.bloque-toggle:focus-visible {
    outline: 2px solid #1976ff;
    outline-offset: -2px;
}

.bloque-summary {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bloque-summary-main {
    display: grid;
    grid-template-columns: minmax(200px, 2fr) minmax(220px, 2fr) 140px 32px;
    grid-auto-rows: auto;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.bloque-nombre {
    font-weight: 600;
    font-size: var(--panel-card-title-size);
    color: #111827;
    grid-column: 1;
    grid-row: 1 / span 2;
}

.bloque-summary-bar {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bloque-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.bloque-progress-row .progress-bar-container {
    flex: 1 1 auto;
    height: 8px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 999px;
}

.bloque-progress-row .progress-bar {
background: linear-gradient(90deg, #63A4FF, #1976FF, #0049C6);
}

.bloque-porcentaje {
    font-weight: 300;
    min-width: 48px;
    text-align: right;
    white-space: nowrap;
    font-size: 12px;
    color: #4b5563;

}

.bloque-progress-info {
    font-size: 1.2rem;
    color: #4b5563;
    white-space: nowrap;
}

.bloque-score {
    font-weight: 700;
    color: #2e7d32;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    text-align: right;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bloque-score-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    font-size: 1.6rem;
}

.bloque-score-text {
    display: inline-block;
    color: inherit;
    
    
}

.bloque-summary-main .bloque-toggle-icon {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
    align-self: start;
}



.bloque-detalle {
    display: none;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid #e5e7eb;
    padding: 0 22px 18px;
    background-color: #f9fafb;
}

.bloque-item.is-open .bloque-detalle {
    display: flex;
}

.tema-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
}

.tema-item-link {
    cursor: pointer;
}

.tema-item-link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.tema-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    background-color: #1976ff;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tema-link-btn i {
    font-size: 1.8rem;
    color: inherit;
}

.tema-link-btn:hover,
.tema-link-btn:focus-visible {
    background-color: #1258c7;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.15);
    outline: none;
}

.tema-link-btn:hover i,
.tema-link-btn:focus-visible i {
    color: #ffffff;
}

.tema-link-spacer {
    visibility: hidden;
}

.tema-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    color: #374151;
}

.tema-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tema-nombre {
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tema-tests {
    justify-self: start;
}

.tema-score {
    font-weight: 600;
    color: #35a73b;
}

.tema-empty {
    margin: 0;
    padding: 16px 0;
    color: #6b7280;
    font-size: 1.3rem;
}

@media (max-width: 767px) {
    .bloque-toggle {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 16px;
    }

    .bloque-summary-main {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 6px;
        row-gap: 8px;
        align-items: center;
    }

    .bloque-nombre {
        grid-column: 1 / span 3;
        grid-row: 1;
    }

    .bloque-summary-main .bloque-toggle-icon {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: start;
    }

    .bloque-progress-info {
        grid-column: 1;
        grid-row: 2;
        justify-self: flex-start;
    }

    .bloque-summary-bar {
        grid-column: 2;
        grid-row: 2;
        min-width: 150px;
    }

    .bloque-progress-row {
        gap: 10px;
        align-items: center;
    }

    .bloque-summary-bar .progress-bar-container {
        background: #f3f4f6;
    }

    .bloque-summary-bar .progress-bar {
        background: linear-gradient(90deg, #63A4FF, #1976FF, #0049C6);
    }

    .bloque-porcentaje {
        min-width: 48px;
        text-align: right;
    }

    .bloque-score {
        grid-column: 3;
        grid-row: 2;
        text-align: right;
    }

    .progress-bar-container--compact {
        width: 100%;
        max-width: 220px;
        height: 14px;
        border-radius: 999px;
    }
}

@media (min-width: 768px) {
    .bloques-header {
        display: grid;
        align-items: center;
    }

    .bloque-summary-main {
        grid-template-columns: minmax(200px, 2fr) minmax(240px, 2fr) 140px 32px;
        gap: 8px;
    }

    .bloque-progress-info {
        justify-self: flex-start;
        margin-top: 0;
    }

    .bloque-score {
        justify-self: end;
    }

    .tema-item {
        padding-left: 16px;
    }

    .tema-header {
        display: grid;
        grid-template-columns: minmax(200px, 2fr) minmax(150px, 1fr) 120px 140px;
    gap: 12px;
    align-items: center;
}

    .tema-tests {
        text-align: center;
    }

    .tema-score {
        text-align: right;
    }

    .tema-link-btn {
        justify-self: end;
    }
}

/* Botón de test sugerido */
.test-btn {
    background-color: #1976ff;
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.test-btn:hover {
    background-color: #1258c7;
    color: #fff;
}

/* 📘 Gráfico de psicotécnicos */
#grafico-psicos {
    max-width: 400px;
    margin: 1rem auto;
}

/* 📥 Sugerencias */
#sugerencias {
    background-color: #f9fafb;
    padding: 1rem;
    border-left: 4px solid #3b82f6;
    font-size: var(--panel-card-text-size);
    line-height: 1.5;
}

#sugerencias p {
    margin-bottom: 0.75rem;
}

/* Barra de progreso */
.progress-bar-container {
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 16px;
    width: 100%;
}

.progress-bar-container--compact {
    width: 100%;
    max-width: 240px;
    height: 8px;
    border-radius: 999px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #63A4FF, #1976FF, #0049C6);
    transition: width 0.6s ease;
    border-radius: 10px 0 0 10px;
}

/* 🧾 Historial de tests */
.historial-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 1rem;
}

.preguntas-grid {
    gap: 16px;
    margin-top: 0;
}

.historial-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 1rem;
}

.historial-actions .test-repeat-btn {
    flex: 1;
}

.historial-card {
    background-color: #f8f9fc;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-align: left;
}

.historial-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: -16px -16px 12px;
    padding: 10px 16px;
    background: #e8f1ff;
    border-bottom: 1px solid #cfe0ff;
    border-radius: 8px 8px 0 0;
}

.historial-header-row .historial-meta-fecha {
    font-size: 1.1rem;
    color: #4b5563;
}

.historial-header-row .test-repeat-btn {
    margin-top: 0;
    flex-shrink: 0;
}

.historial-empty {
    margin: 0;
    padding: 18px;
    background-color: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    color: #6b7280;
    text-align: center;
}

.pregunta-card {
    border-left: 4px solid #d32f2f;
}

.pregunta-tema {
    margin: 0;
    font-size: 1.4rem;
    color: #1f2937;
}

.pregunta-titulo-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.pregunta-texto {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.5;
    color: #374151;
    white-space: pre-line;
}

.pregunta-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 0;
    border: none;
    background: none;
    color: #1976ff;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
}

.pregunta-toggle:hover {
    text-decoration: underline;
}

.pregunta-toggle:focus-visible {
    outline: 2px solid #1976ff;
    outline-offset: 2px;
}

.pregunta-toggle-icon {
    font-size: 1.2rem;
}

.pregunta-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
}

.pregunta-fallos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: #fee2e2;
    color: #b91c1c;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
}

.pregunta-respuestas-wrapper {
    display: none;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.pregunta-respuestas {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pregunta-respuesta {
    background-color: #f3f4f6;
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid transparent;
}

.pregunta-respuesta--correcta {
    border-color: #1b5e20;
    background-color: #c8f5d2;
    box-shadow: inset 0 0 0 1px rgba(27, 94, 32, 0.15);
}

.pregunta-respuesta--ultima {
    border-color: #f59e0b;
}

.pregunta-respuesta--ultima-correcta {
    border-color: #35a73b;
}

.pregunta-respuesta-etiquetas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pregunta-respuesta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 600;
}

.pregunta-respuesta-badge--correcta {
    background-color: #35a73b;
    color: #ffffff;
}

.pregunta-respuesta-badge--ultima {
    background-color: #fde68a;
    color: #78350f;
}

.pregunta-respuesta-texto {
    font-size: 1.3rem;
    color: #1f2937;
    white-space: pre-line;
}

.option-letter {
    font-weight: 600;
    margin-right: 6px;
}

.pregunta-ultima {
    margin: 10px 0 0;
    font-size: 1.2rem;
    color: #4b5563;
}

.pregunta-ultima--correcta {
    color: #2e7d32;
    font-weight: 600;
}

.pregunta-ultima--incorrecta {
    color: #b91c1c;
    font-weight: 600;
}

.preguntas-empty {
    margin: 0;
    padding: 18px;
    background-color: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    color: #6b7280;
    text-align: center;
}

.historial-card h3 {
    margin-bottom: 8px;
    font-size: var(--panel-card-title-size);
    font-weight: 600;
}

.historial-card p {
    font-size: var(--panel-card-text-size);
}

.test-repeat-btn {
    margin-top: 12px;
    background-color: #1976ff;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 1.4rem;
}

.test-repeat-btn:hover {
    background-color: #1258c7;
}

.test-repeat-btn i {
    font-size: 1.4rem;
    color: inherit;
    line-height: 1;
}
.test-summary-line {
    margin-top: 8px;
    color: #444;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: var(--panel-card-text-size);
}

.test-summary-line span + span {
    margin-left: 12px;
}

.test-summary-line .bloque-score-text {
    margin-left: 2px;
}

.historial-meta-score {
    font-weight: 700;
    color: #2e7d32;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.historial-meta-line {
    margin-top: 8px;
    color: #4b5563;
    font-size: var(--panel-card-text-size);
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.historial-meta-bloque {
    font-size: 1.18rem;
    color: #6b7280;
}

.test-summary-line .acierto {
    color: #2e7d32; /* verde */
    
}

.test-summary-line .fallo {
    color: #d32f2f; /* rojo */
    font-weight: bold;
}

.test-summary-line .blanco {
    color: #666; /* gris neutro */
    
}

/* prueba 1 */

.nivel-section {
  background-color: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-top: 2rem;
}

.panel-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.panel-title {
  margin: 0;
  font-size: 2.2rem;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.panel-alias {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background-color: #eef2ff;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 1.3rem;
}

.panel-alias-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.panel-alias-text {
  font-weight: 700;
  color: #111827;
}

.panel-alias-edit {
  border: none;
  background: transparent;
  color: #1d4ed8;
  cursor: pointer;
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.panel-alias-edit:hover,
.panel-alias-edit:focus-visible {
  color: #1e40af;
  outline: none;
}

.nivel-sub {
  color: #6b7280;
  font-size: var(--panel-card-text-size);
  margin-bottom: 1.5rem;
}

.nivel-game-stats {
  margin-bottom: 2rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 1.5rem;
}

.game-card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}
.game-card p{
    color: #6b7280;
    font-size: 1.2rem;
}

.game-card-mobile {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  min-height: auto;
}

.game-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #e8f1ff;
  color: #1d4ed8;
  font-size: 1.4rem;
}

.game-card h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #111827;
}

.game-card-streak {
  gap: 8px;
}

.game-score-value {
  font-size: 3rem;
  font-weight: 700;
  color: #111827;
}

.game-stat-value {
  font-size: 2.6rem;
  font-weight: 700;
  color: #111827;
}

.game-meter {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background-color: #e5e7eb;
  overflow: hidden;
}

.game-meter-fill {
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  transition: width 0.3s ease;
}

.game-card-meta {
  margin: 0;
  color: #6b7280;
  font-size: 1.25rem;
}

.game-card-effort .game-meter-fill {
  background: linear-gradient(90deg, #34d399, #059669);
}

.game-card-precision .game-meter-fill {
  background: linear-gradient(90deg, #f97316, #ea580c);
}

.game-card-score .game-meter-fill {
  background: linear-gradient(90deg, #facc15, #eab308);
}

.game-streak-values {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 1.4rem;
  color: #111827;
}

.game-streak-current {
  font-weight: 700;
  font-size: 2rem;
}

.game-streak-max {
  color: #6b7280;
  font-size: 1.2rem;
}

.game-card-mobile .game-card-header {
  margin-bottom: 4px;
}

.game-card-header--mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.game-mobile-score-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.game-mobile-score-group .game-card-icon {
  margin-bottom: 2px;
}

.game-card-mobile h3 {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 1.6rem;
  margin: 0;
  color: #111827;
}

.game-card-mobile h3 .game-mobile-score {
  font-size: 3rem;
  font-weight: 700;
  color: #111827;
}

.game-mobile-meter {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background-color: #e5e7eb;
  overflow: hidden;
}

.game-mobile-meter-fill {
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #facc15, #eab308);
  transition: width 0.3s ease;
}

.game-mobile-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-mobile-stat {
  background: #eef2ff;
  border: 1px solid #dbe3ff;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.game-mobile-stat-label {
  font-size: 1.2rem;
  color: #4b5563;
  font-weight: 600;
  text-align: left;
}

.game-mobile-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  text-align: right;
}

.game-mobile-meta {
  font-size: 1.2rem;
  color: #4b5563;
  text-align: center;
}

.game-ranking {
  background: #ffc00859;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
}

.game-ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
  color: #1f2937;
}

.game-ranking-title {
  font-weight: 600;
  font-size: 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.game-ranking-title i {
  color: #1d4ed8;
}

.game-ranking-total {
  color: #6b7280;
  font-size: 1.2rem;
}

.game-ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}



.game-ranking-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  color: #1f2937;
  margin-top: 0 !important;
  margin-bottom: 0;
  padding-left: 8px !important;
  line-height: 1.2;
}

.game-ranking-item--empty {
  justify-content: center;
  text-align: center;
  font-size: 1.2rem;
  color: #6b7280;
}

.game-ranking-item.is-self {
  border: 1px solid #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.game-ranking-pos {
  font-weight: 700;
  font-size: 1.2rem;
  color: #2563eb;
  text-align: center;
}

.game-ranking-name {
  font-weight: 600;
  font-size: 1.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-ranking-score {
  font-weight: 600;
  font-size: 1.4rem;
  color: #111827;
}

.game-ranking-user {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  color: #f59e0b; 
  font-weight: 600;
  font-size: 1.3rem;
}

/* .game-ranking-user.is-self {
  border: 1px solid #f59e0b;
} */

.nivel-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nivel-card {
  flex: 1;
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  position: relative;
  background: #fafafa;
}
.nivel-card-aciertos{
  background-color: #48e65023;
}
.nivel-card-fallos{
  background-color: #e6484823;
}

.nivel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.nivel-icon {
  font-size: 1.5rem;
}

.nivel-card h3 {
  font-size: var(--panel-card-title-size);
  font-weight: 600;
  margin-right: auto;
}

.nivel-card p {
  margin: 0.25rem 0;
  color: #374151;
  font-size: var(--panel-card-text-size);
}

.nivel-avance {
  color: #9ca3af;
}

.nivel-percent {
  position: absolute;
  font-weight: 700;
  font-size: 2rem;
  color: #111827;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.nivel-percent-mobile {
  display: none;
  margin-left: auto;
  font-weight: 700;
  font-size: 2rem;
  color: #111827;
}

.donut-chart {
  width: 80px;
  height: 80px;
  margin-top: 0.5rem;
}
.chart-wrapper {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767px) {
  .game-grid {
    display: none;
  }

  .game-card {
    align-items: flex-start;
  }

  .game-card-mobile {
    display: grid;
  }

  .game-card-mobile h3 .game-mobile-score {
    font-size: 2.6rem;
  }

  .game-mobile-stat {
    padding: 8px 10px;
  }

  .game-mobile-stat-value {
    font-size: 1.6rem;
  }

  .game-ranking {
    padding: 12px;
  }

  .game-ranking-item {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    padding: 4px 8px;
  }

  .nivel-card {
    align-items: center;
    text-align: center;
  }

  .nivel-percent {
    display: none;
  }

  .nivel-percent-mobile {
    display: inline-block;
    font-size: 2.6rem;
  }

  .chart-wrapper {
    display: none;
  }
}

@media (min-width: 768px) {
  .nivel-cards {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .nivel-card {
    min-width: 220px;
  }

  .nivel-percent-mobile {
    display: none;
  }
}

@media (min-width: 1024px) {
  .nivel-card {
    min-width: 280px;
  }
}
.bloque-toggle-icon {
    font-size: 1.6rem;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.bloque-item.is-open .bloque-toggle-icon {
    transform: rotate(-180deg);
}

/* Resetear progreso */
.reset-progress {
    background-color: #fff5f5;
    border: 2px solid #fecaca;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.reset-progress h3 {
    margin: 0 0 12px 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #991b1b;
}

.reset-progress p {
    margin: 0 0 20px 0;
    font-size: var(--panel-card-text-size);
    color: #7f1d1d;
}

.reset-progress-btn {
    background-color: #dc2626;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.reset-progress-btn:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
}

.reset-progress-btn:active {
    transform: translateY(0);
}

.new-sticker-icon {
    display: inline;
    height: 1.4em;
    width: auto;
    vertical-align: middle;
    margin-left: 0.3em;
}
