/* Panel de estadísticas lateral */
.stats-panel {
    position: fixed;
    left: -280px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-panel.expanded {
    left: 0;
}

.stats-panel-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Contenido del panel */
.stats-panel-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    border: 2px solid #dc3545;
    border-left: none;
    border-radius: 0 15px 15px 0;
    padding: 20px;
    width: 280px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(220, 53, 69, 0.3);
}

/* Botón de toggle - se mueve con el panel */
.stats-toggle-btn {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    border: 2px solid #dc3545;
    border-left: none;
    border-radius: 0 10px 10px 0;
    width: 40px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.2rem;
    box-shadow: 2px 0 10px rgba(220, 53, 69, 0.4);
}

.stats-toggle-btn:hover {
    background: linear-gradient(135deg, #b02a37 0%, #8b1f2e 100%);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 2px 0 15px rgba(220, 53, 69, 0.6);
}

.stats-toggle-btn i {
    transition: transform 0.3s ease;
}

.stats-panel.expanded .stats-toggle-btn i {
    transform: rotate(180deg);
}

/* Sección de contador */
.stats-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(220, 53, 69, 0.3);
}

.stats-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.stats-title {
    color: #ff8c00;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-value {
    color: #dc3545;
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-value i {
    font-size: 1.5rem;
}

/* Lista de motos más vistas */
.top-motos-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-moto-item {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 10px;
    align-items: center;
}

.top-moto-item:hover {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.top-moto-rank {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    flex-shrink: 0;
}

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

.top-moto-name {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-moto-views {
    color: #ff8c00;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-moto-views i {
    font-size: 0.7rem;
}

/* Scrollbar personalizado */
.stats-panel-content::-webkit-scrollbar {
    width: 6px;
}

.stats-panel-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.stats-panel-content::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 3px;
}

.stats-panel-content::-webkit-scrollbar-thumb:hover {
    background: #b02a37;
}

/* Responsive - móvil */
@media (max-width: 768px) {
    .stats-panel {
        left: -240px;
    }

    .stats-panel-content {
        width: 240px;
        padding: 15px;
    }

    .stats-toggle-btn {
        right: -35px;
        width: 35px;
        height: 70px;
        font-size: 1rem;
    }

    .stats-value {
        font-size: 1.5rem;
    }

    .stats-title {
        font-size: 0.8rem;
    }

    .top-moto-name {
        font-size: 0.75rem;
    }

    .top-moto-views {
        font-size: 0.7rem;
    }
}
