/* Retos Page Styles */

.main-content.retos-main {
    padding-top: 140px;
    align-items: flex-start;
    min-height: 100vh;
}

.retos-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* Header */
.retos-header {
    text-align: center;
    margin-bottom: 40px;
}

.retos-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.retos-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Main Tabs (Tienda y Ranking) */
.main-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.main-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.main-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.main-tab.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.main-tab .material-symbols-outlined {
    font-size: 22px;
}

/* Search tab specific styles */
.main-tab.search-tab {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.main-tab.search-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.main-tab.search-tab .material-symbols-outlined {
    color: rgba(255, 255, 255, 0.9);
}

/* Category Tabs */
.category-tabs-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    gap: 12px;
    width: 100%;
    position: relative;
}

/* Container for sticky tab + scrollable tabs */
.category-tabs-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 8px;
    overflow: hidden;
    flex: 1;
    max-width: 100%;
    position: relative;
}

/* Sticky "Todos" tab */
.category-tab-sticky {
    position: sticky;
    left: 0;
    z-index: 10;
    background: rgba(20, 20, 20, 0.95) !important;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    margin-right: 8px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
}

.category-tab-sticky.active {
    background: rgba(30, 30, 30, 0.95) !important;
}

.category-nav-arrow {
    display: none; /* Hidden by default, shown on desktop */
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.category-nav-arrow:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: scale(1.1);
}

.category-nav-arrow:active {
    transform: scale(0.95);
}

.category-nav-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

.category-nav-arrow .material-symbols-outlined {
    font-size: 24px;
}

/* Show arrows on desktop */
@media (min-width: 769px) {
    .category-nav-arrow {
        display: flex;
    }
}

/* Category Search Modal - Improved Design */
.category-search-modal {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    max-width: 480px;
    width: 90%;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    padding: 32px 28px;
    box-shadow: 
        0 24px 80px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.search-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.search-modal-header .material-symbols-outlined {
    font-size: 32px;
    color: rgba(255, 255, 255, 0.8);
}

.search-modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.search-input-wrapper .material-symbols-outlined {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.search-input-wrapper:focus-within .material-symbols-outlined {
    color: rgba(255, 255, 255, 0.9);
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.search-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-results {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 350px;
    padding-right: 4px;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.search-result-icon {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.search-result-icon .material-symbols-outlined {
    font-size: 24px;
}

.search-result-icon i {
    font-size: 24px;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.search-result-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

.search-empty .material-symbols-outlined {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.search-empty p {
    font-size: 15px;
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
}

.category-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    flex: 1;
    /* Smooth scroll */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-right: 8px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0; /* Prevent tabs from shrinking */
}

.category-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.category-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.category-tab .material-symbols-outlined {
    font-size: 18px;
}

.category-tab i {
    font-size: 16px;
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.category-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Retos Grid */
.retos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.retos-grid.hidden {
    display: none;
}

/* Tema Card */
.tema-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tema-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.tema-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, rgba(30, 30, 30, 1), rgba(20, 20, 20, 1));
    overflow: hidden;
}

.tema-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tema-card:hover .tema-preview img {
    transform: scale(1.05);
}

.tema-preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
}

.tema-preview-placeholder .material-symbols-outlined {
    font-size: 48px;
    color: rgba(59, 130, 246, 0.5);
}

.tema-niveles {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.tema-niveles .material-symbols-outlined {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.tema-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.tema-category {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

.tema-category .material-symbols-outlined {
    font-size: 14px;
}

.tema-category i {
    font-size: 14px;
}

.tema-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tema-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 50px;
}

.tema-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 12px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
    flex: 1;
}

.btn-iniciar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-iniciar:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-iniciar .material-symbols-outlined {
    font-size: 18px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

.empty-state .material-symbols-outlined {
    font-size: 72px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 18px;
    margin: 0 0 8px 0;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state .empty-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

.empty-state.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content.retos-main {
        padding-top: 80px;
    }

    .retos-container {
        padding: 0 16px 40px;
    }

    .retos-header {
        margin-bottom: 24px;
    }

    .retos-title {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .retos-subtitle {
        font-size: 0.9rem;
    }

    .main-tabs {
        gap: 8px;
        margin-bottom: 20px;
    }

    .main-tab {
        padding: 12px 24px;
        font-size: 14px;
        border-radius: 12px;
    }

    .main-tab .material-symbols-outlined {
        font-size: 20px;
    }

    .category-tabs-wrapper {
        margin-bottom: 24px;
        gap: 8px;
    }

    .category-tabs-container {
        padding: 6px;
        border-radius: 16px;
    }

    .category-tab-sticky {
        margin-right: 4px;
    }

    .category-nav-arrow {
        display: none !important; /* Hide arrows on mobile */
    }

    .category-tabs {
        gap: 6px;
        padding-right: 6px;
    }

    .category-tab {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 12px;
    }

    .retos-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tema-card {
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .retos-header {
        margin-bottom: 20px;
    }

    .retos-title {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }

    .main-tabs {
        flex-direction: row;
        gap: 6px;
        justify-content: center;
    }

    .main-tab {
        flex: 1;
        padding: 10px 16px;
        font-size: 13px;
        justify-content: center;
    }
    
    /* Hide search text on mobile */
    .main-tab.search-tab .search-text {
        display: none;
    }
    
    .main-tab.search-tab {
        flex: 0;
        padding: 10px 14px;
    }

    .category-tabs-wrapper {
        margin-bottom: 20px;
        gap: 6px;
    }

    .category-tabs-container {
        padding: 6px;
    }

    .category-tab-sticky {
        margin-right: 2px;
    }

    .category-tab {
        padding: 8px 12px;
        font-size: 12px;
    }

    .category-tab .material-symbols-outlined,
    .category-tab i {
        font-size: 14px;
    }

    .tab-count {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }
}


/* User Stats */
.tienda-user-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tienda-user-stats.hidden {
    display: none;
}

.tienda-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    color: #fff;
}

.tienda-stat.coins {
    color: #FFC107;
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
}

.tienda-stat.pistas {
    color: #2196F3;
    background: rgba(33, 150, 243, 0.1);
    border-color: rgba(33, 150, 243, 0.2);
}

.tienda-stat.energia {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.2);
}

.tienda-stat .material-symbols-outlined {
    font-size: 22px;
}

/* Tienda Tab - same style as other tabs */
.tienda-tab {
    /* Uses default category-tab styles */
}

.tienda-tab:hover {
    /* Uses default category-tab hover styles */
}

.tienda-tab.active {
    /* Uses default category-tab active styles */
}

/* Tienda Section */
.tienda-section {
    width: 100%;
}

.tienda-section.hidden {
    display: none;
}

.tienda-header {
    text-align: center;
    margin-bottom: 40px;
}

.tienda-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}

.tienda-header p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Tienda Grid - Nuevo diseño */
.tienda-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Tienda Categoria */
.tienda-categoria {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
}

.tienda-categoria-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tienda-categoria-header .material-symbols-outlined {
    font-size: 24px;
}

.tienda-categoria-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* Tienda Items Row */
.tienda-items-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

/* Tienda Card - Estilo similar a la imagen */
.tienda-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.tienda-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-color, rgba(255, 255, 255, 0.2));
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.tienda-card.destacado {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.15), rgba(233, 30, 99, 0.05));
    border-color: rgba(233, 30, 99, 0.4);
}

.tienda-card.cant-afford {
    opacity: 0.5;
    pointer-events: none;
}

/* Icon Circle */
.tienda-card-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.icon-circle .material-symbols-outlined {
    font-size: 32px;
    color: #fff;
}

.cantidad-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #333;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Card Content */
.tienda-card-nombre {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
}

.tienda-card-duracion {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.tienda-card-duracion .material-symbols-outlined {
    font-size: 14px;
}

.tienda-card-ahorro {
    display: block;
    font-size: 11px;
    color: #4CAF50;
    font-weight: 600;
    margin-bottom: 8px;
}

.tienda-card-precio {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #FFC107;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 12px;
}

.tienda-card-precio .material-symbols-outlined {
    font-size: 18px;
}

/* Botón Comprar Card */
.btn-comprar-card {
    width: 100%;
    padding: 10px 16px;
    background: var(--card-color, #FFC107);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
}

.btn-comprar-card:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2);
}

.btn-comprar-card:active:not(:disabled) {
    transform: translateY(3px);
    box-shadow: none;
}

.btn-comprar-card:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    box-shadow: none;
}

/* Preview Icon Circle en Modal */
.preview-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.preview-icon-circle .material-symbols-outlined {
    font-size: 40px;
    color: #fff;
}

.comprar-item-preview {
    margin-bottom: 20px;
    background: transparent;
}

/* Modals - Diseño Glass Blanco y Negro */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    display: flex;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.modal-body {
    padding: 32px 24px;
    text-align: center;
}

/* Preview del item en modal */
.comprar-item-preview {
    margin: 0 auto 24px;
    background: transparent;
}

.preview-icon-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.preview-icon-circle .material-symbols-outlined {
    font-size: 48px;
    color: #fff;
}

/* Mensaje de compra */
.comprar-mensaje {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Precio en modal */
.comprar-precio {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: #fff;
    font-weight: 700;
    font-size: 20px;
}

.comprar-precio .material-symbols-outlined {
    font-size: 26px;
    color: #FFC107;
}

/* Acciones del modal */
.modal-actions {
    display: flex;
    gap: 12px;
    padding: 20px 24px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-cancel {
    flex: 1;
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-comprar {
    flex: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: #fff;
    border: none;
    border-radius: 14px;
    color: #000;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-comprar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.btn-comprar .material-symbols-outlined {
    font-size: 20px;
}

/* Modal Exito - Glass Effect */
.modal-exito {
    text-align: center;
    padding: 48px 32px;
}

.exito-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.exito-icon .material-symbols-outlined {
    font-size: 52px;
    color: #4CAF50;
}

.modal-exito h2 {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px 0;
}

.modal-exito p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 28px 0;
    line-height: 1.5;
}

.btn-continuar {
    padding: 16px 48px;
    background: #fff;
    border: none;
    border-radius: 14px;
    color: #000;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-continuar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* Responsive Tienda */
@media (max-width: 768px) {
    .tienda-header h2 {
        font-size: 1.5rem;
    }

    .tienda-categoria {
        padding: 16px;
    }

    .tienda-items-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .tienda-card {
        padding: 16px 12px;
    }

    .icon-circle {
        width: 56px;
        height: 56px;
    }

    .icon-circle .material-symbols-outlined {
        font-size: 26px;
    }

    .tienda-card-nombre {
        font-size: 12px;
    }

    .tienda-card-precio {
        font-size: 14px;
    }

    .tienda-user-stats {
        gap: 8px;
    }

    .tienda-stat {
        padding: 8px 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .tienda-items-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .tienda-card {
        padding: 12px 8px;
    }

    .icon-circle {
        width: 48px;
        height: 48px;
    }

    .icon-circle .material-symbols-outlined {
        font-size: 22px;
    }

    .cantidad-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    .tienda-card-nombre {
        font-size: 11px;
    }

    .tienda-card-precio {
        font-size: 13px;
    }

    .btn-comprar-card {
        padding: 8px 12px;
        font-size: 11px;
    }
}


/* ============ ENERGIA INFINITA EN TIENDA ============ */
.tienda-stat.energia.infinite {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.2), rgba(156, 39, 176, 0.15));
    border-color: rgba(233, 30, 99, 0.4);
    color: #E91E63;
    animation: infinitePulseTienda 2s ease-in-out infinite;
}

.tienda-stat.energia.infinite .material-symbols-outlined {
    color: #E91E63;
}

@keyframes infinitePulseTienda {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(233, 30, 99, 0.2);
    }
    50% { 
        box-shadow: 0 0 20px rgba(233, 30, 99, 0.4);
    }
}

.infinite-timer {
    font-size: 12px;
    opacity: 0.8;
    margin-left: 4px;
}


/* ============ PISTAS INFINITAS EN TIENDA ============ */
.tienda-stat.pistas.infinite {
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.2), rgba(0, 151, 167, 0.15));
    border-color: rgba(0, 188, 212, 0.4);
    color: #00BCD4;
    animation: infinitePulseTienda 2s ease-in-out infinite;
}

.tienda-stat.pistas.infinite .material-symbols-outlined {
    color: #00BCD4;
}


/* ============ CATEGORIAS INFINITAS ============ */
.tienda-categoria.infinita {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.08), rgba(233, 30, 99, 0.05));
    border-color: rgba(156, 39, 176, 0.2);
}

.tienda-categoria.infinita .tienda-categoria-header {
    border-bottom-color: rgba(156, 39, 176, 0.2);
}

.categoria-badge {
    margin-left: auto;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

/* Cards infinitas */
.tienda-card.infinita {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-style: dashed;
}

.tienda-card.infinita:hover {
    border-style: solid;
}

.tienda-card.infinita .icon-circle {
    animation: infiniteGlow 3s ease-in-out infinite;
}

@keyframes infiniteGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 255, 255, 0.2);
    }
}

/* Responsive para más items */
@media (min-width: 1200px) {
    .tienda-items-row {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .tienda-items-row {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .tienda-items-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .tienda-items-row {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ============ RANKING TAB ============ */
/* Uses default category-tab styles */

/* ============ RANKING SECTION ============ */
.ranking-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.ranking-section.hidden {
    display: none;
}

.ranking-header {
    text-align: center;
    margin-bottom: 30px;
}

.ranking-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}

.ranking-header p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 24px 0;
}

/* Ranking Controls */
.ranking-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Ranking Type Tabs */
.ranking-tabs {
    display: flex;
    gap: 8px;
}

.ranking-tabs .ranking-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ranking-tabs .ranking-tab:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff;
}

.ranking-tabs .ranking-tab.active {
    background: #fff !important;
    border-color: #fff !important;
    color: #000 !important;
}

.ranking-tabs .ranking-tab .material-symbols-outlined {
    font-size: 20px;
}

/* Ranking Search */
.ranking-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 250px;
}

.ranking-search .material-symbols-outlined {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.4);
}

.ranking-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14px;
}

.ranking-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Mi Ranking Card */
.mi-ranking {
    margin-bottom: 30px;
}

.mi-ranking.hidden {
    display: none;
}

.mi-ranking-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
}

.mi-ranking-pos {
    min-width: 60px;
}

.pos-number {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
}

.mi-ranking-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.mi-ranking-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mi-ranking-avatar .material-symbols-outlined {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.5);
}

.mi-ranking-info {
    flex: 1;
}

.mi-nombre {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.mi-stats {
    display: flex;
    gap: 20px;
}

.mi-xp, .mi-racha {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.mi-xp .material-symbols-outlined {
    font-size: 18px;
    color: #FFD700;
}

.mi-racha .material-symbols-outlined {
    font-size: 18px;
    color: #FF6B35;
}

/* ============ RANKING CONTENT - TWO COLUMNS ============ */
.ranking-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.ranking-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ranking-section-title .material-symbols-outlined {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.4);
}

/* ============ PODIUM WRAPPER ============ */
.ranking-podium-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
}

/* ============ PODIUM CARDS ============ */
.ranking-podium {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.podium-card {
    display: grid;
    grid-template-columns: 50px 60px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.podium-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

.podium-card.current-user {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Position 1 - Gold */
.podium-card.pos-1 {
    background: rgba(255, 215, 0, 0.08);
    border-color: rgba(255, 215, 0, 0.25);
}

.podium-card.pos-1 .podium-avatar {
    border-color: #FFD700;
}

.podium-card.pos-1 .podium-value {
    color: #FFD700;
}

/* Position 2 - Silver */
.podium-card.pos-2 {
    background: rgba(192, 192, 192, 0.06);
    border-color: rgba(192, 192, 192, 0.2);
}

.podium-card.pos-2 .podium-avatar {
    border-color: #C0C0C0;
}

.podium-card.pos-2 .podium-value {
    color: #C0C0C0;
}

/* Position 3 - Bronze */
.podium-card.pos-3 {
    background: rgba(205, 127, 50, 0.06);
    border-color: rgba(205, 127, 50, 0.2);
}

.podium-card.pos-3 .podium-value {
    color: #CD7F32;
}

/* Podium Medal - Just the emoji, no position number */
.podium-medal {
    font-size: 32px;
    line-height: 1;
    text-align: center;
}

/* Podium Avatar */
.podium-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.podium-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.podium-avatar .avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
}

.podium-avatar .material-symbols-outlined {
    font-size: 26px;
    color: rgba(255, 255, 255, 0.4);
}

/* Podium Info */
.podium-info {
    flex: 1;
    min-width: 0;
}

.podium-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podium-stats {
    display: flex;
    gap: 14px;
}

.podium-xp, .podium-racha {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.podium-xp .material-symbols-outlined {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

.podium-racha .material-symbols-outlined {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

/* Podium Value */
.podium-value {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    text-align: right;
}

.podium-value .value-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 4px;
}

/* Podium Empty */
.podium-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

.podium-empty .material-symbols-outlined {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.podium-empty p {
    font-size: 14px;
    margin: 0;
}

/* ============ RANKING LIST WRAPPER ============ */
.ranking-list-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    max-height: 500px;
    overflow-y: auto;
}

.ranking-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

.ranking-list-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.ranking-list-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* ============ RANKING LIST ============ */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 36px 40px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ranking-item.current-user {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.ranking-pos {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
}

.ranking-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.ranking-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ranking-avatar .avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ranking-avatar .material-symbols-outlined {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.3);
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.ranking-stats .material-symbols-outlined {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

.ranking-value {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

/* Ranking More Empty */
.ranking-more-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.4);
}

.ranking-more-empty .material-symbols-outlined {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.ranking-more-empty p {
    font-size: 14px;
    margin: 0;
}

/* Ranking Loading */
.ranking-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.ranking-loading.hidden {
    display: none;
}

.ranking-loading .material-symbols-outlined {
    font-size: 48px;
    margin-bottom: 16px;
}

.rotating {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Ranking Empty/Error */
.ranking-empty, .ranking-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.ranking-empty .material-symbols-outlined,
.ranking-error .material-symbols-outlined {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.ranking-empty p, .ranking-error p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 8px 0;
}

.ranking-empty span {
    font-size: 14px;
}

/* ============ RESPONSIVE RANKING ============ */
@media (max-width: 1100px) {
    .ranking-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .ranking-podium-wrapper {
        order: 1;
    }
    
    .ranking-list-wrapper {
        order: 2;
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .ranking-header h2 {
        font-size: 1.5rem;
    }
    
    .ranking-tabs {
        flex-direction: row;
        gap: 8px;
    }
    
    .ranking-tabs .ranking-tab {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .mi-ranking-card {
        flex-wrap: wrap;
        padding: 14px;
        gap: 12px;
    }
    
    .mi-ranking-pos {
        min-width: auto;
    }
    
    .pos-number {
        font-size: 22px;
    }
    
    .mi-ranking-avatar {
        width: 44px;
        height: 44px;
    }
    
    .mi-nombre {
        font-size: 15px;
    }
    
    .mi-stats {
        gap: 12px;
    }
    
    .podium-card {
        grid-template-columns: auto auto 1fr auto;
        padding: 14px 16px;
        gap: 14px;
    }
    
    .podium-medal {
        font-size: 28px;
    }
    
    .podium-avatar {
        width: 54px;
        height: 54px;
    }
    
    .podium-name {
        font-size: 15px;
    }
    
    .podium-stats {
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .podium-xp, .podium-racha {
        font-size: 12px;
    }
    
    .podium-value {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .ranking-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .ranking-avatar {
        width: 36px;
        height: 36px;
    }
    
    .ranking-name {
        font-size: 13px;
    }
    
    .ranking-value {
        font-size: 13px;
    }
}

/* XP stat color in resultado */
.resultado-stat.xp {
    color: #FFD700;
}

.resultado-stat.xp .material-symbols-outlined {
    color: #FFD700;
}


/* Alert Modal - Glass Effect with Black & White */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    display: none;
    opacity: 0;
}

.alert-modal {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow: 
        0 24px 80px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: rotate(90deg);
}

.modal-close-btn .material-symbols-outlined {
    font-size: 20px;
}

.alert-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 28px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.alert-icon .material-symbols-outlined {
    font-size: 36px;
    color: #fff;
}

.alert-icon.warning .material-symbols-outlined {
    color: #fff;
}

.alert-icon.error .material-symbols-outlined {
    color: #fff;
}

.alert-icon.success .material-symbols-outlined {
    color: #fff;
}

.alert-modal h3 {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.alert-modal p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.alert-modal .btn-primary {
    flex: 1;
    padding: 16px 20px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.alert-modal .btn-primary:hover {
    background: #e5e5e5;
    transform: translateY(-1px);
}

.alert-modal .btn-primary:active {
    transform: translateY(0);
}

.alert-modal .btn-secondary {
    flex: 1;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.alert-modal .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.alert-modal .btn-secondary:active {
    transform: scale(0.98);
}

/* Responsive buttons */
@media (max-width: 480px) {
    .modal-buttons {
        flex-direction: column;
    }
    
    .alert-modal .btn-primary,
    .alert-modal .btn-secondary {
        width: 100%;
    }
}

/* Devicon styles - Force white color for non-colored icons */
.category-tab i[class*="devicon-"]:not(.colored),
.tema-category i[class*="devicon-"]:not(.colored) {
    color: #fff !important;
    filter: brightness(0) invert(1);
}

.category-tab i[class*="devicon-"].colored,
.tema-category i[class*="devicon-"].colored {
    filter: none;
}

/* Ensure GitHub and other plain icons are white */
.category-tab i.devicon-github-plain,
.tema-category i.devicon-github-plain,
.category-tab i.devicon-nextjs-plain,
.tema-category i.devicon-nextjs-plain,
.category-tab i.devicon-vercel-plain,
.tema-category i.devicon-vercel-plain,
.category-tab i.devicon-linux-plain,
.tema-category i.devicon-linux-plain,
.category-tab i.devicon-apple-original,
.tema-category i.devicon-apple-original,
.category-tab i.devicon-django-plain,
.tema-category i.devicon-django-plain,
.category-tab i.devicon-flask-original,
.tema-category i.devicon-flask-original,
.category-tab i.devicon-express-original,
.tema-category i.devicon-express-original,
.category-tab i.devicon-rust-plain,
.tema-category i.devicon-rust-plain,
.category-tab i.devicon-unity-original,
.tema-category i.devicon-unity-original,
.category-tab i.devicon-unrealengine-original,
.tema-category i.devicon-unrealengine-original {
    color: #fff !important;
    filter: brightness(0) invert(1);
}
