/* Estadísticas - Estilos */

.main-content {
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

/* Grid para leaderboards */
.leaderboards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

/* Header de Estadísticas */
.estadisticas-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 15px;
    color: white;
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.3);
}

.estadisticas-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.estadisticas-header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Contenedor del Leaderboard */
.leaderboard-container {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    height: fit-content;
    display: flex;
    flex-direction: column;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    padding: 12px;
    margin: -15px -15px 12px -15px;
    border-radius: 12px 12px 0 0;
}

.leaderboard-header h2 {
    font-size: 1rem;
    color: white;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.leaderboard-header h2 i {
    color: #f39c12;
    font-size: 0.9rem;
}

.leaderboard-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.7rem;
    font-weight: 400;
}

/* Lista del Leaderboard */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    border-left: 3px solid #34495e;
}



.leaderboard-item:hover {
    transform: translateX(3px);
    background: #ecf0f1;
}

/* Rankings especiales */
.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border-left-color: #d68910;
    font-weight: 600;
    color: white;
}



.leaderboard-item.rank-2 {
    background: #bdc3c7;
    border-left-color: #95a5a6;
    font-weight: 500;
    color: #2c3e50;
}



.leaderboard-item.rank-3 {
    background: #d4a574;
    border-left-color: #b8864e;
    font-weight: 500;
    color: #2c3e50;
}



/* Badge de Ranking */
.rank-badge {
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.rank-badge i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.rank-1 .rank-badge i {
    color: #f1c40f;
    font-size: 1.1rem;
}

.rank-2 .rank-badge i {
    color: #95a5a6;
    font-size: 1rem;
}

.rank-3 .rank-badge i {
    color: #b8864e;
    font-size: 0.95rem;
}

.rank-number {
    font-size: 0.85rem;
    font-weight: bold;
    color: #34495e;
}

/* Información del Usuario */
.user-info {
    flex: 1;
    margin-right: 20px;
}

.username {
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
}



.username i {
    font-size: 0.75rem;
    color: #34495e;
}

.rank-1 .username,
.rank-1 .username i {
    color: white;
}

/* Estadísticas de Tiempo */
.stats-info {
    text-align: right;
    min-width: 80px;
}

.time-display {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 5px;
    margin-bottom: 5px;
}

.time-main {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2c3e50;
}

.rank-1 .time-main {
    color: white;
}

.time-unit {
    font-size: 0.65rem;
    color: #666;
    font-weight: 500;
}

.rank-1 .time-unit {
    color: rgba(255, 255, 255, 0.95);
}

.time-detail {
    font-size: 0.65rem;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}

.rank-1 .time-detail {
    color: rgba(255, 255, 255, 0.9);
}

/* Sin Datos */
.no-data {
    text-align: center;
    padding: 25px 15px;
    color: #999;
}

.no-data i {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.no-data p {
    font-size: 0.8rem;
}

/* Cards de Estadísticas Adicionales */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border-left: 5px solid #34495e;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.stat-content h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 1400px) {
    .leaderboards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        max-width: 95%;
    }
}

@media (max-width: 1024px) {
    .leaderboards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .estadisticas-header {
        padding: 25px 15px;
        margin-bottom: 40px;
    }
    
    .estadisticas-header h1 {
        font-size: 2.2rem;
    }
    
    .leaderboard-container {
        padding: 12px;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 30px 15px;
    }
    
    .leaderboards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .estadisticas-header {
        padding: 20px 15px;
        margin-bottom: 30px;
        border-radius: 10px;
    }
    
    .estadisticas-header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .estadisticas-header p {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    .leaderboard-container {
        padding: 10px;
    }
    
    .leaderboard-header {
        padding: 10px;
        margin: -10px -10px 10px -10px;
    }
    
    .leaderboard-header h2 {
        font-size: 0.95rem;
        gap: 6px;
    }
    
    .leaderboard-subtitle {
        font-size: 0.65rem;
    }
    
    .leaderboard-list {
        gap: 8px;
    }

    .leaderboard-item {
        padding: 12px 10px;
    }
    
    .rank-badge {
        min-width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .username {
        font-size: 0.8rem;
    }
    
    .username i {
        font-size: 0.7rem;
    }
    
    .time-main {
        font-size: 0.85rem;
    }
    
    .time-unit {
        font-size: 0.6rem;
    }
    
    .time-detail {
        font-size: 0.6rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 30px;
    }
    
    .stat-card {
        padding: 20px;
        gap: 15px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stat-content h3 {
        font-size: 1.1rem;
    }
    
    .stat-content p {
        font-size: 0.85rem;
    }
    
    /* Modal en tablet/móvil */
    .modal-usuario-content {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
    }
    
    .usuario-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .usuario-stat-item {
        padding: 12px;
    }
    
    .usuario-stat-item i {
        font-size: 20px;
    }
    
    .usuario-stat-item strong {
        font-size: 20px;
    }
    
    .usuario-stat-item span {
        font-size: 12px;
    }
    
    .usuario-logros-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-usuario-header h2 {
        font-size: 22px;
    }
    
    .modal-usuario-header i {
        font-size: 40px;
    }
    
    .modal-usuario-logros h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 10px;
    }
    
    .estadisticas-header {
        padding: 15px 10px;
        margin-bottom: 20px;
    }
    
    .estadisticas-header h1 {
        font-size: 1.5rem;
    }
    
    .estadisticas-header h1 i {
        font-size: 1.2rem;
    }
    
    .estadisticas-header p {
        font-size: 0.9rem;
    }
    
    .leaderboard-container {
        padding: 8px;
    }
    
    .leaderboard-header {
        padding: 8px;
        margin: -8px -8px 8px -8px;
    }
    
    .leaderboard-header h2 {
        font-size: 0.85rem;
        gap: 5px;
    }
    
    .leaderboard-header h2 i {
        font-size: 0.8rem;
    }
    
    .leaderboard-subtitle {
        font-size: 0.6rem;
    }
    
    .leaderboard-item {
        padding: 10px 8px;
        gap: 8px;
    }
    
    .rank-badge {
        min-width: 22px;
        height: 22px;
        font-size: 0.75rem;
        margin-right: 8px;
    }
    
    .rank-1 .rank-badge i,
    .rank-2 .rank-badge i,
    .rank-3 .rank-badge i {
        font-size: 0.85rem;
    }
    
    .user-info {
        margin-right: 10px;
    }
    
    .username {
        font-size: 0.75rem;
        gap: 4px;
    }
    
    .stats-info {
        min-width: 70px;
    }
    
    .time-main {
        font-size: 0.8rem;
    }
    
    .time-unit {
        font-size: 0.55rem;
    }
    
    .time-detail {
        font-size: 0.55rem;
        gap: 2px;
    }
    
    .stat-card {
        padding: 15px;
        gap: 12px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        margin: 0 auto;
    }
    
    .stat-content h3 {
        font-size: 1rem;
    }
    
    .stat-content p {
        font-size: 0.8rem;
    }
    
    .no-data {
        padding: 20px 10px;
    }
    
    .no-data i {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .no-data p {
        font-size: 0.75rem;
    }
    
    /* Modal en móviles pequeños */
    .modal-usuario-content {
        width: 98%;
        padding: 15px;
        border-radius: 15px;
    }
    
    .modal-usuario-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }
    
    .modal-usuario-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .modal-usuario-header i {
        font-size: 35px;
        margin-bottom: 10px;
    }
    
    .modal-usuario-header h2 {
        font-size: 18px;
    }
    
    .usuario-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .usuario-stat-item {
        padding: 10px;
    }
    
    .usuario-stat-item i {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .usuario-stat-item strong {
        font-size: 18px;
    }
    
    .usuario-stat-item span {
        font-size: 11px;
    }
    
    .modal-usuario-logros {
        margin-top: 20px;
    }
    
    .modal-usuario-logros h3 {
        font-size: 16px;
        margin-bottom: 15px;
        gap: 8px;
    }
    
    .modal-usuario-logros h3 span {
        font-size: 14px;
    }
    
    .usuario-logros-grid {
        gap: 10px;
    }
    
    .modal-logro-item {
        padding: 12px;
        gap: 12px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .modal-logro-item img {
        width: 50px;
        height: 50px;
    }
    
    .modal-logro-info strong {
        font-size: 14px;
    }
    
    .modal-logro-info p {
        font-size: 12px;
    }
    
    .modal-logro-rareza {
        padding: 3px 8px;
        font-size: 11px;
        margin-top: 3px;
    }
    
    /* Coronita easter egg en móvil */
    .coronita-easter-egg {
        width: 60px;
        height: 60px;
    }
}

/* Dark Theme Support */
body.dark-theme .leaderboard-container,
body.dark-theme .stat-card {
    background: #2d2d2d;
}

body.dark-theme .leaderboard-header h2,
body.dark-theme .username {
    color: #e0e0e0;
}

body.dark-theme .leaderboard-subtitle,
body.dark-theme .time-unit,
body.dark-theme .time-detail {
    color: #b0b0b0;
}

body.dark-theme .leaderboard-item {
    background: linear-gradient(135deg, #3a3a3a 0%, #2d2d2d 100%);
}

body.dark-theme .stat-content h3 {
    color: #e0e0e0;
}

body.dark-theme .stat-content p {
    color: #b0b0b0;
}

/* Easter Egg - Coronita */
.coronita-easter-egg {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.coronita-easter-egg.visible {
    opacity: 1;
    pointer-events: auto;
}

.coronita-easter-egg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: pulse-coronita 2s ease-in-out infinite;
}

.coronita-easter-egg:hover img {
    transform: scale(1.15);
    filter: brightness(1.2);
}

@keyframes pulse-coronita {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slide-coronita {
    0% {
        left: -100px;
    }
    100% {
        left: calc(100% + 100px);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Modal de Usuario */
.modal-usuario {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-usuario-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-usuario-content {
    position: relative;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    animation: modalAppear 0.3s ease-out;
}

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

.modal-usuario-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-usuario-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-usuario-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-usuario-header i {
    font-size: 50px;
    color: #f39c12;
    margin-bottom: 15px;
}

.modal-usuario-header h2 {
    color: white;
    font-size: 28px;
    margin: 0;
}

/* Grid de Estadísticas del Usuario */
.usuario-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.usuario-stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.usuario-stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.usuario-stat-item i {
    font-size: 24px;
    color: #f39c12;
    margin-bottom: 10px;
}

.usuario-stat-item strong {
    display: block;
    color: white;
    font-size: 24px;
    margin: 5px 0;
}

.usuario-stat-item span {
    display: block;
    color: #bdc3c7;
    font-size: 13px;
}

/* Sección de Logros del Modal */
.modal-usuario-logros {
    margin-top: 30px;
}

.modal-usuario-logros h3 {
    color: white;
    font-size: 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-usuario-logros h3 i {
    color: #f39c12;
}

.modal-usuario-logros h3 span {
    color: #95a5a6;
    font-size: 18px;
}

.usuario-logros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.modal-logro-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.modal-logro-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-logro-item img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.modal-logro-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.modal-logro-info strong {
    color: white;
    font-size: 16px;
}

.modal-logro-info p {
    color: #bdc3c7;
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
}

.modal-logro-rareza {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
}

.modal-logro-rareza i {
    font-size: 10px;
}

/* Username clickeable */
.username-link {
    transition: all 0.3s ease;
    color: inherit;
}

.username-link:hover {
    color: #f39c12 !important;
    text-decoration: underline;
}

/* Scrollbar del modal */
.modal-usuario-content::-webkit-scrollbar {
    width: 8px;
}

.modal-usuario-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.modal-usuario-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.modal-usuario-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Responsive para modal MEJORADO */
@media (max-width: 768px) {
    .modal-usuario-content {
        width: 95%;
        padding: 20px;
    }
    
    .usuario-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .usuario-logros-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-usuario-header h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .modal-usuario-content {
        width: 98%;
        padding: 15px;
    }
    
    .usuario-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   WIDGET DE NIVEL EN MODAL
   ============================================ */
.modal-nivel-widget {
    background: #2c3e50;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    color: #e0e0e0;
    border: 1px solid #34495e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-nivel-widget .nivel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-nivel-widget .nivel-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-nivel-widget .nivel-badge {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 18px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-nivel-widget .nivel-numero {
    font-size: 1rem;
    font-weight: 700;
    color: #e0e0e0;
}

.modal-nivel-widget .nivel-texto h4 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #e0e0e0;
}

.modal-nivel-widget .xp-actual {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    color: #b0b0b0;
}

/* ============================================
   CATEGORÍAS EN MODAL
   ============================================ */
.categorias-container {
    margin-top: 15px;
}

.categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.categoria-card {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.categoria-card:hover {
    transform: translateY(-3px);
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.categoria-imagen {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ddd;
}

.categoria-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.categoria-info h4 {
    font-size: 0.95rem;
    margin: 8px 0;
    color: #2c3e50;
}

.categoria-progreso {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.logros-categoria-container {
    margin-top: 15px;
}

.categoria-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.categoria-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.btn-volver {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-volver:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Responsive para categorías */
@media (max-width: 768px) {
    .categorias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categoria-imagen {
        width: 70px;
        height: 70px;
    }
    
    .modal-nivel-widget {
        padding: 15px;
    }
    
    .modal-nivel-widget .nivel-texto h4 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .categorias-grid {
        grid-template-columns: 1fr;
    }
}